Fixed betting bugs.
This commit is contained in:
@@ -10,9 +10,7 @@
|
||||
void _pokerActionBlindsOnStart(queue_t *queue,queueaction_t *action,uint8_t i) {
|
||||
poker_t *poker;
|
||||
poker = (poker_t *)action->data;
|
||||
|
||||
poker->state = POKER_STATE_TAKING_BLINDS;
|
||||
|
||||
pokerBetTakeBlinds(
|
||||
&poker->bet,
|
||||
poker->players,
|
||||
|
@@ -11,9 +11,9 @@ void _pokerActionDealOnStart(queue_t *queue, queueaction_t *action, uint8_t i) {
|
||||
poker_t *poker;
|
||||
poker = (poker_t *)action->data;
|
||||
|
||||
poker->state = POKER_STATE_DEALING;
|
||||
|
||||
// Shuffle the deck
|
||||
poker->state = POKER_STATE_DEALING;
|
||||
cardShuffle(poker->dealer.deck, CARD_DECK_SIZE);
|
||||
|
||||
// Deal 2 card to each player
|
||||
|
@@ -30,13 +30,14 @@ void _pokerActionRoundOnStart(queue_t *queue, queueaction_t *action ,uint8_t i){
|
||||
// Decide on the dealer
|
||||
poker->roundDealer = (poker->roundDealer+1) % POKER_PLAYER_COUNT;
|
||||
|
||||
// Find the players.
|
||||
// Find (and kill) the players.
|
||||
j = poker->roundDealer;
|
||||
foundDealer = false;
|
||||
foundSmallBlind = false;
|
||||
while(true) {
|
||||
player = poker->players + j;
|
||||
if(!pokerPlayerIsAlive(player)) continue;
|
||||
|
||||
if(!pokerPlayerIsInRound(player)) continue;
|
||||
if(!foundDealer) {
|
||||
indexDealer = j;
|
||||
foundDealer = true;
|
||||
|
Reference in New Issue
Block a user