Dawn/src/poker/round/flop.c
2021-07-12 15:04:10 -07:00

34 lines
775 B
C

/**
* Copyright (c) 2021 Dominic Masters
*
* This software is released under the MIT License.
* https://opensource.org/licenses/MIT
*/
#include "flop.h"
void pokerFlopInit(poker_t *poker) {
uint8_t count;
if(poker->round == POKER_ROUND_BET0) {
printf("Poker Flop Start\n");
poker->round = POKER_ROUND_FLOP;
count = POKER_FLOP_CARD_COUNT;
} else if(poker->round == POKER_ROUND_BET1) {
printf("Poker Turn\n");
poker->round = POKER_ROUND_TURN;
count = POKER_TURN_CARD_COUNT;
} else if(poker->round == POKER_ROUND_BET2) {
printf("Poker River\n");
poker->round = POKER_ROUND_RIVER;
count = POKER_RIVER_CARD_COUNT;
}
// Burn a card
poker->deckSize--;
// Flops
pokerDealerDeal(poker, count);
pokerBetInit(poker);
}