} else if (aggression == 100) {
// Always go all-in!
//FIXME: Check and bet/raise player's remaining cash.
int amount = (tableType == TableType.FIXED_LIMIT) ? minBet : 100 * minBet;
if (allowedActions.contains(Action.BET)) {
action = new BetAction(amount);
} else if (allowedActions.contains(Action.RAISE)) {
action = new RaiseAction(amount);
} else if (allowedActions.contains(Action.CALL)) {
action = Action.CALL;
} else {
action = Action.CHECK;
}
} else {
int amount = minBet;
if (tableType == TableType.NO_LIMIT) {
int betLevel = aggression / 20;
for (int i = 0; i < betLevel; i++) {
amount *= 2;
}
}
if (currentBet < amount) {
if (allowedActions.contains(Action.BET)) {
action = new BetAction(amount);
} else if (allowedActions.contains(Action.RAISE)) {
action = new RaiseAction(amount);
} else if (allowedActions.contains(Action.CALL)) {
action = Action.CALL;
} else {