/** * TestMinRaiseSizes for NoLimit: always bigblind at the beginning of a stage, otherwise last * raise-amount */ @Test public void testMinRaiseSizeNoLimit() { PublicGameInfo gameInfo = new PublicGameInfo(); gameInfo.setLimit(PublicGameInfo.NO_LIMIT); gameInfo.setBlinds(5, 10); gameInfo.setNumSeats(3); gameInfo.setPlayer(0, PublicPlayerInfo.create("player0", 200, null)); gameInfo.setPlayer(1, PublicPlayerInfo.create("player1", 200, null)); gameInfo.setPlayer(2, PublicPlayerInfo.create("player2", 200, null)); gameInfo.newHand(0, 1, 2); gameInfo.update(Action.smallBlindAction(5), 1); gameInfo.update(Action.bigBlindAction(10), 2); assertEquals("minraise bigblind", 10, gameInfo.getMinRaise(), 0.001); gameInfo.update(Action.raiseAction(10, 50), 0); assertEquals("minraise 50", 50, gameInfo.getMinRaise(), 0.001); gameInfo.update(Action.foldAction(55), 1); gameInfo.update(Action.callAction(50), 2); gameInfo.nextStage(new Hand("7c 7s 7h")); assertEquals("minraise bigblind", 10, gameInfo.getMinRaise(), 0.001); gameInfo.update(Action.betAction(60), 2); assertEquals("minraise 60", 60, gameInfo.getMinRaise(), 0.001); gameInfo.update(Action.callAction(60), 0); gameInfo.nextStage(new Hand("7d")); assertEquals("minraise bigblind", 10, gameInfo.getMinRaise(), 0.001); }