Made strings a bit better.

This commit is contained in:
2022-01-09 10:18:45 -08:00
parent d9281cffe2
commit 29215a3b6f
10 changed files with 59 additions and 53 deletions

View File

@@ -18,6 +18,9 @@ uint8_t POKER_PLAYER_DEALER;
uint8_t POKER_PLAYER_SMALL_BLIND;
uint8_t POKER_PLAYER_BIG_BLIND;
uint16_t POKER_GAME_BLINDS_CURRENT;
uint16_t POKER_GAME_POT;
void pokerInit() {
uint8_t i;
@@ -30,6 +33,9 @@ void pokerInit() {
// Set up the initial state.
// TODO: Should this be randomized?
POKER_PLAYER_DEALER = 0;
POKER_GAME_POT = 0;
POKER_GAME_BLINDS_CURRENT = 10;
// Reset the round state (For the first round)
pokerNewRound();
@@ -85,4 +91,11 @@ void pokerNewRound() {
POKER_PLAYERS[i].hand[j] = POKER_DECK[POKER_DECK_SIZE--];
}
}
}
void pokerTakeBlinds() {
// TODO: I need to make sure the blind players even have the chips to blind.
POKER_PLAYERS[POKER_PLAYER_SMALL_BLIND].chips -= POKER_GAME_BLINDS_CURRENT;
POKER_PLAYERS[POKER_PLAYER_BIG_BLIND].chips -= (POKER_GAME_BLINDS_CURRENT*2);
POKER_GAME_POT += POKER_GAME_BLINDS_CURRENT * 3;
}

View File

@@ -22,6 +22,11 @@ extern uint8_t POKER_PLAYER_DEALER;
extern uint8_t POKER_PLAYER_SMALL_BLIND;
extern uint8_t POKER_PLAYER_BIG_BLIND;
extern uint16_t POKER_GAME_BLINDS_CURRENT;
extern uint16_t POKER_GAME_POT;
void pokerInit();
void pokerNewRound();
void pokerNewRound();
void pokerTakeBlinds();