Fixed more betting bugs.
This commit is contained in:
@ -31,7 +31,7 @@ void _pokerGameActionBetOnUpdate(
|
|||||||
|
|
||||||
// Are they human?
|
// Are they human?
|
||||||
player = game->poker.players + game->poker.bet.better;
|
player = game->poker.players + game->poker.bet.better;
|
||||||
isHuman = game->poker.bet.better == POKER_PLAYER_HUMAN_INDEX;
|
isHuman = game->poker.bet.better == POKER_PLAYER_HUMAN_INDEX && false;
|
||||||
|
|
||||||
// Handle as an AI
|
// Handle as an AI
|
||||||
if(isHuman) {
|
if(isHuman) {
|
||||||
|
@ -22,21 +22,24 @@ void _pokerGameActionFlopOnStart(
|
|||||||
// Add the actual flop action.
|
// Add the actual flop action.
|
||||||
next = pokerActionNextFlopAdd(queue, &game->poker);
|
next = pokerActionNextFlopAdd(queue, &game->poker);
|
||||||
|
|
||||||
|
// Reset all the players
|
||||||
|
|
||||||
// Is there any flop "left to do" ?
|
// Is there any flop "left to do" ?
|
||||||
if(next != NULL) {
|
if(next != NULL) {
|
||||||
// Talk about it.
|
// Talk about it.
|
||||||
discussion.reason = POKER_DISCUSSION_REASON_FLOP;
|
discussion.reason = POKER_DISCUSSION_REASON_FLOP;
|
||||||
pokerDiscussionQueue(&discussion);
|
pokerDiscussionQueue(&discussion);
|
||||||
|
|
||||||
|
// Reset the better to the betting round initial.
|
||||||
|
pokerBetResetBetter(
|
||||||
|
&game->poker.bet, game->poker.players, game->poker.roundSmallBlind
|
||||||
|
);
|
||||||
|
|
||||||
// Now, get the count of players left to bet. If "everyone is all in" then
|
// 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.
|
// this will be 0 and no actual betting needs to happen.
|
||||||
if(pokerBetGetRemainingPlayerCount(
|
if(pokerBetGetRemainingPlayerCount(
|
||||||
&game->poker.bet, game->poker.players
|
&game->poker.bet, game->poker.players
|
||||||
) > 1) {
|
) > 1) {
|
||||||
// Reset the better to the betting round initial.
|
|
||||||
pokerBetResetBetter(
|
|
||||||
&game->poker.bet, game->poker.players, game->poker.roundSmallBlind
|
|
||||||
);
|
|
||||||
|
|
||||||
// Begin betting.
|
// Begin betting.
|
||||||
pokerGameActionLookAdd(game, game->poker.bet.better);
|
pokerGameActionLookAdd(game, game->poker.bet.better);
|
||||||
|
@ -92,6 +92,13 @@ void pokerDiscussionGet(
|
|||||||
discussion->emotions[0] = VN_CHARACTER_EMOTION_ANIME_MOM;
|
discussion->emotions[0] = VN_CHARACTER_EMOTION_ANIME_MOM;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case POKER_DISCUSSION_REASON_BETTING_DONE:
|
||||||
|
discussion->count++;
|
||||||
|
discussion->messages[0] = "Winner Winner Chicken Dinner";
|
||||||
|
discussion->players[0] = POKER_DEALER_INDEX;
|
||||||
|
discussion->emotions[0] = VN_CHARACTER_EMOTION_SMUG_VERY;
|
||||||
|
break;
|
||||||
|
|
||||||
// Fallback
|
// Fallback
|
||||||
default:
|
default:
|
||||||
discussion->count++;
|
discussion->count++;
|
||||||
|
@ -14,6 +14,8 @@ void pokerGameWin(poker_t *poker) {
|
|||||||
int32_t chipsRounded, chipsDifferent;
|
int32_t chipsRounded, chipsDifferent;
|
||||||
float chipsEach;
|
float chipsEach;
|
||||||
|
|
||||||
|
poker->state = POKER_STATE_DECIDING_WINNER;
|
||||||
|
|
||||||
// Get the chips each.
|
// Get the chips each.
|
||||||
chipsEach = poker->bet.pot / ((float)poker->winner.winnerCount);
|
chipsEach = poker->bet.pot / ((float)poker->winner.winnerCount);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user