예제 #1
0
 public bool SelectChessPiece(int x, int y)
 {
     if (selectedChessPiece == null && chessBoard[x, y] == null)
     {
         return(false);
     }
     else if (chessBoard[x, y].Color != playerTurn)
     {
         return(false);
     }
     selectedChessPiece       = chessBoard[x, y];
     highlightChessPieceMoves = selectedChessPiece.PossibleMove(chessBoard); // ChessPiece[,] chessBoard.
     return(true);
 }