try {
gameControl.deal();
} catch (IllegalActionException e1) {
fail(e1.toString());
}
Game game = gameControl.getGame();
events.add(Events.call, Events.nextPlayer);
events.add(Events.call, Events.nextPlayer);
events.add(Events.raise, Events.nextPlayer);
events.add(Events.call, Events.nextPlayer);
events.add(Events.call, Events.newRound, Events.newCommunityCards, Events.nextPlayer);
// Pre-flop Round
assertEquals(PreFlopRound.class, gameControl.getRound().getClass());
try {
gameControl.call(game.getCurrentPlayer());
gameControl.call(game.getCurrentPlayer());
// Big Blind Raises.
gameControl.raise(game.getCurrentPlayer(), 20);
assertEquals(PreFlopRound.class, gameControl.getRound().getClass());
gameControl.call(game.getCurrentPlayer());
assertEquals(PreFlopRound.class, gameControl.getRound().getClass());
gameControl.call(game.getCurrentPlayer());
} catch (IllegalActionException e) {
fail(e.getMessage());
}
events.add(Events.check, Events.nextPlayer);
events.add(Events.check, Events.nextPlayer);
events.add(Events.check, Events.newRound, Events.newCommunityCards, Events.nextPlayer);
// Flop Round
assertEquals(FlopRound.class, gameControl.getRound().getClass());
try {
gameControl.check(game.getCurrentPlayer());
gameControl.check(game.getCurrentPlayer());
gameControl.check(game.getCurrentPlayer());
} catch (IllegalActionException e) {
fail(e.getMessage());
}
events.add(Events.check, Events.nextPlayer);
events.add(Events.check, Events.nextPlayer);
events.add(Events.check, Events.newRound, Events.newCommunityCards, Events.nextPlayer);
// Turn Round
try {
gameControl.check(game.getCurrentPlayer());
gameControl.check(game.getCurrentPlayer());
gameControl.check(game.getCurrentPlayer());
} catch (IllegalActionException e) {
fail(e.getMessage());
}
events.add(Events.check, Events.nextPlayer);
events.add(Events.check, Events.nextPlayer);
events.add(Events.check);
events.add(Events.showHand, Events.showHand, Events.showHand, Events.winner);
events.ignore();
// Final Round
try {
gameControl.check(game.getCurrentPlayer());
gameControl.check(game.getCurrentPlayer());
gameControl.check(game.getCurrentPlayer());
} catch (IllegalActionException e) {
fail(e.getMessage());
}
}