Begin refactor.
This commit is contained in:
@ -6,6 +6,39 @@
|
||||
#pragma once
|
||||
#include <dawn/dawn.h>
|
||||
|
||||
/** How many chips each player has by defautl */
|
||||
#define POKER_BET_PLAYER_CHIPS_DEFAULT 10000
|
||||
|
||||
/** The default blind cost for the big blind. */
|
||||
#define POKER_BET_BLIND_BIG_DEFAULT 600
|
||||
|
||||
/** The default blind cost for the small blind. (Defaults half big blind) */
|
||||
#define POKER_BET_BLIND_SMALL_DEFAULT (POKER_BET_BLIND_BIG_DEFAULT/2)
|
||||
|
||||
/**
|
||||
* The default betting player for the round.
|
||||
*
|
||||
* @param poker Pointer to the poker instance.
|
||||
* @return The Poker round default betting player.
|
||||
*/
|
||||
#define POKER_BET_ROUND_PLAYER_DEFAULT(poker) ( \
|
||||
((poker)->roundSmallBlind + 1) % POKER_PLAYER_COUNT \
|
||||
)
|
||||
|
||||
typedef struct {
|
||||
/** Blinds */
|
||||
int32_t blindSmall, blindBig;
|
||||
|
||||
/** How big the current bet is for the round. */
|
||||
int32_t currentBet;
|
||||
|
||||
/** For Betting round, which player is currently betting */
|
||||
uint8_t better;
|
||||
|
||||
/** Current pot of chips */
|
||||
int32_t pot;
|
||||
} pokerbet_t;
|
||||
|
||||
/**
|
||||
* Initializes/resets the poker bet context.
|
||||
*
|
||||
|
Reference in New Issue
Block a user