Made betting work correctly.

This commit is contained in:
2021-08-29 22:03:18 -07:00
parent 954b676f07
commit 063c7b12ed
8 changed files with 72 additions and 11 deletions

View File

@ -7,6 +7,7 @@
#pragma once
#include "../libs.h"
#include "player.h"
/** How many chips each player has by defautl */
#define POKER_BET_PLAYER_CHIPS_DEFAULT 10000
@ -17,6 +18,16 @@
/** 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;