Incremental updates. Work in progress to augment Board, Referee, add score for computer player, implement Monte-Carlo simulation.

Renamed Player implementations and changed Player to interface, with the goal of using abstraction to make the human and computer interactions with the game identical for ease of simulation.
This commit is contained in:
Woody Folsom
2012-04-08 17:25:10 -04:00
parent e0f42531e7
commit 9619f9a96d
13 changed files with 178 additions and 58 deletions

View File

@@ -1,5 +1,10 @@
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 {
@@ -8,4 +13,16 @@ public class BoardTest {
public void testConstructor() {
new Board();
}
@Test
public void testCopyConstructor() {
Board board = new Board();
Board copy = new Board(board);
board.setTile(new CellPointer(1,2), TileColor.BLUE);
assertFalse(board.equals(copy));
copy.setTile(new CellPointer(1,2),TileColor.BLUE);
assertTrue(board.equals(copy));
}
}