@Test
 public void validMoveTest() {
   board.reset();
   // assertTrue(board.validMove(move1));
   // assertTrue(board.validMove(move2));
   assertFalse(board.validMove(move3));
 }
Beispiel #2
0
 public Map<Point, Tile> getValidMoves(Board board) {
   Map<Point, Tile> moves = new HashMap<Point, Tile>();
   for (Point point : board.getEmptyPoints()) {
     for (Tile tile : getHand()) {
       Map<Point, Tile> move = new HashMap<Point, Tile>();
       move.put(point, tile);
       if (board.validMove(move) == true) {
         moves.put(point, tile);
       }
       move.clear();
     }
   }
   return moves;
 }