Refactor almost finished.

This commit is contained in:
2021-09-19 22:49:52 -07:00
parent a2c269ab33
commit b3e06a3837
25 changed files with 56 additions and 31 deletions

View File

@ -15,6 +15,7 @@ void _pokerActionRoundOnStart(queue_t *queue, queueaction_t *action ,uint8_t i){
poker = (poker_t *)action->data;
// Update game state.
poker->state = POKER_STATE_STARTING_ROUND;
// Prepare the initial game state

View File

@ -11,6 +11,7 @@
#include "../dealer.h"
#include "../bet.h"
#include "../player.h"
#include "../poker.h"
/** Callback for when the poker round start aciton begins. */
void _pokerActionRoundOnStart(queue_t *queue, queueaction_t *action, uint8_t i);

View File

@ -29,7 +29,7 @@ void pokerBetPlayer(pokerbet_t *bet, pokerplayer_t *player, int32_t chips) {
}
void pokerBetResetBetter(
pokerbet_t *poker, pokerplayer_t *players, uint8_t roundSmallBlind
pokerbet_t *bet, pokerplayer_t *players, uint8_t roundSmallBlind
) {
uint8_t i;
pokerplayer_t *player;
@ -37,6 +37,7 @@ void pokerBetResetBetter(
player = players + i;
player->state = flagOff(player->state, POKER_PLAYER_STATE_ROUND_MOVE);
}
bet->better = pokerBetGetRoundPlayerDefault(roundSmallBlind);
}

View File

@ -6,6 +6,7 @@
#pragma once
#include "../libs.h"
#include "player.h"
#include "../util/math.h"
/** How many chips each player has by defautl */
#define POKER_BET_PLAYER_CHIPS_DEFAULT 10000