Exemple #1
0
 public void testPieceNotInWay() throws Exception {
   Ferz ferz = new Ferz(0, 2, true);
   Board chessBoard = new Board(8, 8);
   Game game = new Game();
   assertFalse(ferz.PieceNotInWay(1, 3, true, chessBoard, game));
   Ferz ferz2 = new Ferz(4, 5, true);
   assertTrue(ferz2.PieceNotInWay(4, 6, true, chessBoard, game));
 }
Exemple #2
0
 @Test
 /*
  * Tests if the validMove function is working as expected.
  */
 public void testValidMove() throws Exception {
   Ferz ferz = new Ferz(1, 1, true);
   assertTrue(ferz.validMove(0, 0, true));
   assertFalse(ferz.validMove(1, 0, true));
   assertFalse(ferz.validMove(-7, 0, false));
   assertTrue(ferz.validMove(2, 2, true));
 }