Esempio n. 1
0
 @Test
 public void testCanRollNumber() {
   game.setPhase(TurnTracker.Phase.ROLLING);
   final int turn = game.getCurrentTurn();
   assertTrue(game.canRollNumber(turn));
   try {
     game.getTurnTracker().nextPhase();
   } catch (Exception e) {
     e.printStackTrace();
   }
   assertFalse(game.canRollNumber(turn));
 }
Esempio n. 2
0
 @Test
 public void testRollNumber() throws InvalidDiceRollException {
   final int turn = game.getCurrentTurn();
   try {
     game.getTurnTracker().nextPhase();
     game.getTurnTracker().nextPhase();
   } catch (Exception e) {
     e.printStackTrace();
   }
   final int roll = game.rollDice(turn);
   assertTrue(roll > 1);
   assertTrue(roll <= 12);
 }