Improved bet tests.
This commit is contained in:
@ -36,7 +36,7 @@ void pokerBet(
|
||||
player->currentBet += chips;
|
||||
|
||||
pot->chips += chips;
|
||||
pot->call = mathMax(pot->call, chips);
|
||||
pot->call = mathMax(pot->call, player->currentBet);
|
||||
pokerPotAddPlayer(pot, playerIndex);
|
||||
|
||||
player->state |= POKER_PLAYER_STATE_HAS_BET_THIS_ROUND;
|
||||
@ -53,13 +53,14 @@ int32_t pokerBetGetCurrentCallValue(poker_t *poker) {
|
||||
uint8_t i;
|
||||
int32_t call;
|
||||
call = 0;
|
||||
for(i = 0; i < poker->playerCount; i++) {
|
||||
call = mathMax(call, poker->players[i].currentBet);
|
||||
for(i = 0; i < poker->potCount; i++) {
|
||||
call = mathMax(call, poker->pots[i].call);
|
||||
}
|
||||
return call;
|
||||
}
|
||||
|
||||
|
||||
|
||||
//eh
|
||||
int32_t pokerPlayerGetCallBet(poker_t *poker, pokerplayer_t *player) {
|
||||
return pokerBetGetCurrentCallValue(poker) - player->currentBet;
|
||||
|
Reference in New Issue
Block a user