checkmate complete

This commit is contained in:
2022-06-10 21:53:05 -05:00
parent dabdb6c6b0
commit 2dcc6ca417
7 changed files with 53 additions and 66 deletions

View File

@@ -6,5 +6,14 @@ namespace Shogi.Domain
{
public static bool IsKing(this Piece self) => self.WhichPiece == WhichPiece.King;
public static bool IsBetween(this float self, float min, float max)
{
return self >= min && self <= max;
}
public static bool IsInsideBoardBoundary(this Vector2 self)
{
return self.X.IsBetween(0, 8) && self.Y.IsBetween(0, 8);
}
}
}