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.
29 lines
539 B
Java
29 lines
539 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() {
|
|
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));
|
|
}
|
|
}
|