GameState betState;
int stack = gameState.getPlayer(actor).getStack();
if (stack == amount) {
betState = new AllInState(gameState, new AllInEvent(actor, amount));
} else if (stack > amount) {
betState = new BetState(gameState, new BetEvent(actor, amount));
} else throw new IllegalStateException("Can't bet amount: "+amount+", with stack: " + stack);
return betState;
}