Working on poker logic.
This commit is contained in:
@ -116,20 +116,24 @@ void _pokerGameActionBetOnEnd(
|
||||
// Not waiting, restack and do next action.
|
||||
printf("Not waiting on anything!\n");
|
||||
|
||||
// No! Begin the next flop.
|
||||
next = pokerActionNextFlopAdd(queue, &game->poker);
|
||||
if(next != NULL) {
|
||||
discussion.reason = POKER_DISCUSSION_REASON_FLOP;
|
||||
pokerDiscussionQueue(&discussion);
|
||||
// Is there a next round, or did someone just win?
|
||||
if(pokerBetGetRemainingPlayerCount(&game->poker.bet,game->poker.players) > 1){
|
||||
// No! Begin the next flop.
|
||||
next = pokerActionNextFlopAdd(queue, &game->poker);
|
||||
if(next != NULL) {
|
||||
discussion.reason = POKER_DISCUSSION_REASON_FLOP;
|
||||
pokerDiscussionQueue(&discussion);
|
||||
|
||||
pokerBetResetBetter(
|
||||
&game->poker.bet, game->poker.players, game->poker.roundSmallBlind
|
||||
);
|
||||
pokerGameActionRestackAdd(game);
|
||||
pokerGameActionLookAdd(game, game->poker.bet.better);
|
||||
pokerGameActionBetAdd(game);
|
||||
return;
|
||||
pokerBetResetBetter(
|
||||
&game->poker.bet, game->poker.players, game->poker.roundSmallBlind
|
||||
);
|
||||
pokerGameActionRestackAdd(game);
|
||||
pokerGameActionLookAdd(game, game->poker.bet.better);
|
||||
pokerGameActionBetAdd(game);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Done betting
|
||||
printf("All betting is done, reveal\n");
|
||||
|
Reference in New Issue
Block a user