Restored some of the rendering

This commit is contained in:
2021-05-22 14:18:23 -07:00
parent 58e86d160e
commit d84e760c34
36 changed files with 813 additions and 331 deletions

42
temp/poker/poker.c Normal file
View File

@ -0,0 +1,42 @@
/**
* Copyright (c) 2021 Dominic Masters
*
* This software is released under the MIT License.
* https://opensource.org/licenses/MIT
*/
#include "poker.h"
void pokerInit(poker_t *poker) {
uint8_t x;
// Prepare the initial game state
poker->round = POKER_ROUND_DEAL;
poker->roundPlayer = 0x00;
poker->roundDealer = 0x00;
poker->blindSmall = 0;
poker->blindBig = 0;
for(x = 0; x < POKER_PLAYER_COUNT; x++) {
poker->players[x].state = 0x00;
poker->players[x].chips = 0;
poker->players[x].cardCount = 0;
poker->players[x].currentBet = 0;
}
pokerRoundInit(poker);
}
void pokerRoundInit(poker_t *poker) {
uint8_t x;
// Refill the deck
cardDeckFill(poker->deck);
poker->deckSize = CARD_DECK_SIZE;
// Reset the players
for(x = 0; x < POKER_PLAYER_COUNT; x++) {
poker->players[x].cardCount = 0;
poker->players[x].currentBet = 0;
}
}