More tweaks and cleanup to the refactored code.

This commit is contained in:
2021-10-11 10:11:30 -07:00
parent 43bef266aa
commit 26d28d6f55
6 changed files with 154 additions and 44 deletions

View File

@ -19,7 +19,7 @@ void _pokerGameActionFlopOnStart(
discussion.poker = game;
// Get how many players are left in the round.
if(pokerInRoundGetCount(game->poker.players) > 1) {// Still more than 1
if(pokerInRoundGetCount(&game->poker) > 1) {// Still more than 1
// Add the actual flop action.
next = pokerActionNextFlopAdd(queue, &game->poker);
@ -31,13 +31,11 @@ void _pokerGameActionFlopOnStart(
discussion.reason = POKER_DISCUSSION_REASON_FLOP;
pokerDiscussionQueue(&discussion);
//TODO: Get the next player here.
nextBetter = pokerPlayerGetRemainingBetter(&game->poker);
// Now, get the count of players left to bet. If "everyone is all in" then
// this will be 0 and no actual betting needs to happen.
if(nextBetter != 0xFF) {
if(pokerPlayerGetRemainingBetterCount(&game->poker) > 0x01) {
// Begin betting.
game->poker.better = nextBetter;
pokerGameActionLookAdd(game, nextBetter);