Split the bet tests out.

This commit is contained in:
2021-10-14 22:40:33 -07:00
parent 4d43f837cf
commit 588be5827c
17 changed files with 266 additions and 301 deletions

View File

@ -10,15 +10,6 @@
#include "fuck.h"
#include "poker.h"
/**
* Returns the index of the first player that remains to bet for the current
* round.
*
* @param poker Poker game instance.
* @return The player index of the remaining player, otherwise 0xFF.
*/
uint8_t pokerBetGetRemainingPlayer(poker_t *poker);
/**
* Returns the index of the first player that remains to bet for the current
* round. This is based on whatever current better player index you provide.
@ -29,24 +20,13 @@ uint8_t pokerBetGetRemainingPlayer(poker_t *poker);
*/
uint8_t pokerBetGetNextPlayer(poker_t *poker);
/**
* Get the bet necessary for a specific player to make a call. This takes the
* players current bet and the bet necessary to call into the pot and will
* return the difference.
*
* @param poker Poker game instance.
* @param player Player instance to get the call value for.
* @return The count of chips needed to call into the current active pot.
*/
int32_t pokerPlayerGetCallBet(poker_t *poker, pokerplayer_t *player);
/**
* Returns the count of players remaining to bet.
*
* @param poker Poker game instance.
* @return Count of players left to bet.
*/
uint8_t pokerBetGetRemainingPlayerCount(poker_t *poker);
uint8_t pokerBetGetRemainingBetterCount(poker_t *poker);
/**
* Let a player bet chips into the pot.
@ -75,4 +55,15 @@ void pokerBetForPlayer(poker_t *poker, uint8_t playerIndex, int32_t chips);
* @param poker Poker game instance.
* @return Chips necessary to call the current bet.
*/
int32_t pokerBetGetCurrentCallValue(poker_t *poker);
int32_t pokerBetGetCurrentCallValue(poker_t *poker);
/**
* Get the bet necessary for a specific player to make a call. This takes the
* players current bet and the bet necessary to call into the pot and will
* return the difference.
*
* @param poker Poker game instance.
* @param player Player instance to get the call value for.
* @return The count of chips needed to call into the current active pot.
*/
int32_t pokerPlayerGetCallBet(poker_t *poker, pokerplayer_t *player);