Files
cs8803p4/test/model/BoardTest.java
Woody Folsom d9ec72d0fb 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.
2012-04-14 15:36:02 -04:00

31 lines
631 B
Java

package model;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
import model.Board.TileColor;
import org.junit.Test;
public class BoardTest {
@Test
public void testConstructor() {
Board board = new Board();
assertTrue(board.isPlayerTurn());
assertFalse(board.isTerminalState());
}
@Test
public void testCopyConstructor() {
Board board = new Board();
Board copy = new Board(board);
board.playTile(new CellPointer(1,2), TileColor.BLUE);
assertFalse(board.equals(copy));
copy.playTile(new CellPointer(1,2),TileColor.BLUE);
assertTrue(board.equals(copy));
}
}