Working on poker logic.

This commit is contained in:
2021-05-31 08:06:43 -07:00
parent 62928b7c69
commit 28e5e86540
26 changed files with 35567 additions and 48 deletions

View File

@ -25,7 +25,7 @@
#define FONT_FILL_MODE 1
/** Passed to STBTT for scaling the font nicely, essentially the font size. */
#define FONT_TEXTURE_SIZE 96
#define FONT_TEXTURE_SIZE 112
// Chars
#define FONT_NEWLINE '\n'

View File

@ -19,16 +19,17 @@
/** Rounds that the game can be in */
#define POKER_ROUND_MATCH 0x00
#define POKER_ROUND_DEAL 0x01
#define POKER_ROUND_START 0x01
#define POKER_ROUND_BLINDS 0x02
#define POKER_ROUND_BET0 0x03
#define POKER_ROUND_FLOP 0X04
#define POKER_ROUND_BET1 0x05
#define POKER_ROUND_TURN 0x06
#define POKER_ROUND_BET2 0x07
#define POKER_ROUND_RIVER 0x08
#define POKER_ROUND_BET3 0x09
#define POKER_ROUND_WINNER 0x10
#define POKER_ROUND_DEAL 0x03
#define POKER_ROUND_BET0 0x04
#define POKER_ROUND_FLOP 0X05
#define POKER_ROUND_BET1 0x06
#define POKER_ROUND_TURN 0x07
#define POKER_ROUND_BET2 0x08
#define POKER_ROUND_RIVER 0x09
#define POKER_ROUND_BET3 0x0A
#define POKER_ROUND_WINNER 0x0B
/** How many cards the dealer can hold in their hand */
#define POKER_DEALER_HAND 5
@ -49,6 +50,13 @@
/** GUI Height fix (To keep gui scaling nicely we use a fixed height) */
#define POKER_GUI_HEIGHT 2160
/** How many cards to deal each player during the deal round */
#define POKER_DEAL_CARD_EACH 2
#define POKER_FLOP_CARD_COUNT 3
#define POKER_TURN_CARD_COUNT 1
#define POKER_RIVER_CARD_COUNT 1
typedef struct {
//////////////////////////////////////////////////////////////////////////////
// Poker Logic Variables
@ -77,15 +85,22 @@ typedef struct {
/** The current player that is the dealer */
uint8_t roundDealer;
uint8_t roundSmallBlind;
uint8_t roundBigBlind;
/** Current pot of chips */
uint32_t pot;
/** The current buy-in bet size. */
uint32_t roundBet;
//////////////////////////////////////////////////////////////////////////////
// Round variables
//////////////////////////////////////////////////////////////////////////////
uint32_t roundTextCounter;
/** For Betting round, which player is currently betting */
uint8_t roundBetCurrent;
//////////////////////////////////////////////////////////////////////////////
// Rendering Assets
// Rendering Variables
//////////////////////////////////////////////////////////////////////////////
/** Frames to hold the world and GUI render outputs */

View File

@ -8,4 +8,5 @@
#pragma once
#include "../libs.h"
#define POKER_TALK_MATCH_START "The game is no-limits Texas Hold'em."
#define POKER_TALK_MATCH_START "The game is no-limits Texas Hold'em."
#define POKER_TALK_MATCH_BUYIN "The buy-in for this match is $10,000."