コード例 #1
0
ファイル: Board.cs プロジェクト: peterwenstrom/chess
 public bool IsPieceSameColor(Coordinates position, PlayerColor color)
 {
     return(GameBoard[position.Row, position.Column]?.Owner.Color == color);
 }
コード例 #2
0
ファイル: Board.cs プロジェクト: peterwenstrom/chess
 public void SetPiece(Coordinates position, Piece piece = null)
 {
     GameBoard[position.Row, position.Column] = piece;
 }
コード例 #3
0
ファイル: Board.cs プロジェクト: peterwenstrom/chess
 public bool IsPositionEmpty(Coordinates position)
 {
     return(GameBoard[position.Row, position.Column] == null);
 }
コード例 #4
0
ファイル: Board.cs プロジェクト: peterwenstrom/chess
 public Piece GetPiece(Coordinates position)
 {
     return(GameBoard[position.Row, position.Column]);
 }