Alpha-Beta move generator can look 2 plays (4 plies) ahead on a 4x4 board and blocks every possible attempt by the player to connect 3.
It should be possible to play on larger boards when the computers 'move' is changed from playing a tile to picking the player's next available color.
This commit is contained in:
@@ -11,7 +11,9 @@ public class BoardTest {
|
||||
|
||||
@Test
|
||||
public void testConstructor() {
|
||||
new Board();
|
||||
Board board = new Board();
|
||||
assertTrue(board.isPlayerTurn());
|
||||
assertFalse(board.isTerminalState());
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -19,10 +21,10 @@ public class BoardTest {
|
||||
Board board = new Board();
|
||||
Board copy = new Board(board);
|
||||
|
||||
board.setTile(new CellPointer(1,2), TileColor.BLUE);
|
||||
board.playTile(new CellPointer(1,2), TileColor.BLUE);
|
||||
|
||||
assertFalse(board.equals(copy));
|
||||
copy.setTile(new CellPointer(1,2),TileColor.BLUE);
|
||||
copy.playTile(new CellPointer(1,2),TileColor.BLUE);
|
||||
assertTrue(board.equals(copy));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user