Refactor round 1

This commit is contained in:
2021-07-12 15:04:10 -07:00
parent 223f5be854
commit 8b45b976d4
24 changed files with 653 additions and 508 deletions

View File

@ -7,14 +7,24 @@
#pragma once
#include "../libs.h"
#include "bet.h"
#include "dealer.h"
#include "card.h"
#include "../display/texture.h"
#include "../display/primitive.h"
#include "../display/tileset.h"
/** How many cards a player can hold in their hand */
#define POKER_PLAYER_HAND 2
/** How many players in a poker game (excludes dealer) */
#define POKER_PLAYER_COUNT 5
////////////////////////////////////////////////////////////////////////////////
// Player States
////////////////////////////////////////////////////////////////////////////////
/** State for whether or not a player has folded */
#define POKER_PLAYER_STATE_FOLDED 0x01
@ -27,6 +37,11 @@
/** The index that the player who is the human... is */
#define POKER_PLAYER_HUMAN_INDEX 0x02
////////////////////////////////////////////////////////////////////////////////
// Player Definition
////////////////////////////////////////////////////////////////////////////////
/** Poker Player State */
typedef struct {
/** Cards in the players' hand */
@ -42,10 +57,11 @@ typedef struct {
/** Current bet in current round player has placed */
uint32_t currentBet;
// Rendering assets
texture_t bodyTexture;
primitive_t bodyPrimitive;
texture_t faceTexture;
primitive_t facePrimitive;
primitive_t facePrimitive;
} pokerplayer_t;