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:
@@ -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));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user