コード例 #1
0
 public bool canEat(int x, int y)
 {
     if (BOARD.getPiece(x, y).getClass2() == CheckersPiece.getClass())
     {
         return(true);
     }
     return(false);
 }
コード例 #2
0
 public bool eat(int x, int y)
 {
     if (BOARD.getPiece(x, y).getClass2() == CheckersPiece.getClass())
     {
         if (BOARD.removePiece(x, y))
         {
             if (gameEnded())
             {
                 Console.WriteLine("End game. Winner: " + WINNER);
             }
             return(true);
         }
     }
     return(false);
 }