Пример #1
0
 @Test
 public void testConstructor() {
   Othello o = new Othello();
   assertEquals(Piece.NONE, o.getEntry(7, 7));
   assertEquals(Piece.NONE, o.getEntry(0, 0));
   assertEquals(Piece.NONE, o.getEntry(3, 4));
 }
Пример #2
0
 @Test
 public void testPieceFlip() {
   Othello o = new Othello();
   o.restart(Piece.BLACK);
   o.move(2, 3);
   assertEquals(Piece.BLACK, o.getEntry(3, 3));
 }
Пример #3
0
 @Test
 public void testRestart() {
   Othello o = new Othello();
   o.restart(Piece.BLACK);
   assertTrue(o.getTurn().equals(Piece.BLACK));
   assertEquals(o.getEntry(3, 4), Piece.BLACK);
   assertEquals(o.getEntry(3, 3), Piece.WHITE);
 }
Пример #4
0
 @Test
 public void testSetEntry() {
   Othello o = new Othello();
   o.setEntry(Piece.WHITE, 1, 2);
   assertEquals(Piece.WHITE, o.getEntry(1, 2));
 }