Exemplo n.º 1
0
 private boolean isValidMove(Board board, int x, int y) {
   if (x < 0
       || y < 0
       || x >= board.getBoardSize()
       || y >= board.getBoardSize()
       || !board.isEmptyAt(x, y)) {
     return false;
   }
   return true;
 }