Begin refactor.

This commit is contained in:
2021-09-18 23:13:05 -07:00
parent df53c646a2
commit 2b7446b818
143 changed files with 1706 additions and 2345 deletions

View File

@@ -6,4 +6,45 @@
*/
#pragma once
#include <dawn/dawn.h>
#include "../libs.h"
/** How many cards to deal each player during the deal round */
#define POKER_DEAL_CARD_EACH 2
/** How many cards are dealt for the flop, turn and river */
#define POKER_FLOP_CARD_COUNT 3
#define POKER_TURN_CARD_COUNT 1
#define POKER_RIVER_CARD_COUNT 1
#define POKER_STATE_NULL 0x00
#define POKER_STATE_STARTING_MATCH 0x01
#define POKER_STATE_STARTING_ROUND 0x02
#define POKER_STATE_TAKING_BLINDS 0x03
#define POKER_STATE_DEALING 0x04
#define POKER_STATE_CARDS_FLOPPING 0x05
#define POKER_STATE_BETTING 0x06
#define POKER_STATE_DECIDING_WINNER 0x07
typedef struct {
/** Poker betting state */
pokerbet_t bet;
/** Player States */
pokerdealer_t dealer;
pokerplayer_t players[POKER_PLAYER_COUNT];
/** Winning player states */
pokerwinner_t winner;
/** The current player that is the dealer */
uint8_t roundDealer;
/** Which player is the small blind for this round */
uint8_t roundSmallBlind;
/** Which player is the big blind for this round */
uint8_t roundBigBlind;
uint8_t state;
} poker_t;