Improving tests.
This commit is contained in:
@ -13,7 +13,6 @@ void _pokerGameActionFlopOnStart(
|
||||
pokergame_t *game = (pokergame_t *)action->data;
|
||||
pokerdiscussiondata_t discussion;
|
||||
queueaction_t *next;
|
||||
uint8_t nextBetter;
|
||||
|
||||
// Prep convo
|
||||
discussion.poker = game;
|
||||
@ -23,7 +22,8 @@ void _pokerGameActionFlopOnStart(
|
||||
// Add the actual flop action.
|
||||
next = pokerActionNextFlopAdd(queue, &game->poker);
|
||||
|
||||
// Reset all the players
|
||||
// Reset all the players
|
||||
pokerResetBettingRound(&game->poker);
|
||||
|
||||
// Is there any flop "left to do" ?
|
||||
if(next != NULL) {
|
||||
@ -31,14 +31,12 @@ void _pokerGameActionFlopOnStart(
|
||||
discussion.reason = POKER_DISCUSSION_REASON_FLOP;
|
||||
pokerDiscussionQueue(&discussion);
|
||||
|
||||
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(pokerPlayerGetRemainingBetterCount(&game->poker) > 0x01) {
|
||||
// Begin betting.
|
||||
game->poker.better = nextBetter;
|
||||
pokerGameActionLookAdd(game, nextBetter);
|
||||
game->poker.better = pokerPlayerGetRemainingBetter(&game->poker);
|
||||
pokerGameActionLookAdd(game, game->poker.better);
|
||||
pokerGameActionBetAdd(game);
|
||||
} else {
|
||||
//No actual players to bet, so add the following flop instead.
|
||||
|
@ -12,7 +12,7 @@
|
||||
#include "restack.h"
|
||||
#include "winner.h"
|
||||
#include "bet.h"
|
||||
#include "../../poker/actions/flop.h"
|
||||
#include "../../../poker/actions/flop.h"
|
||||
|
||||
/** Callback that is fired when the flop action starts */
|
||||
void _pokerGameActionFlopOnStart(
|
||||
|
@ -6,6 +6,7 @@
|
||||
#pragma once
|
||||
#include "../../../libs.h"
|
||||
#include "../../../poker/actions/blinds.h"
|
||||
#include "../../../poker/actions/deal.h"
|
||||
#include "action.h"
|
||||
#include "../pokerdiscussion.h"
|
||||
#include "bet.h"
|
||||
|
@ -160,6 +160,7 @@ uint8_t pokerPlayerAdd(poker_t *poker) {
|
||||
player->chips = 0;
|
||||
player->currentBet = 0;
|
||||
player->state = POKER_PLAYER_STATE_OUT;
|
||||
player->timesRaised = 0;
|
||||
|
||||
return i;
|
||||
}
|
||||
|
Reference in New Issue
Block a user