/** * Copyright (c) 2021 Dominic Masters * * This software is released under the MIT License. * https://opensource.org/licenses/MIT */ #pragma once #include "../libs.h" #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 pokerPlayerGetRemainingBetter(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. * * @param poker Poker game instance. * @param current Current better player index. * @return The player index of the next remaining player, otherwise 0xFF. */ uint8_t pokerPlayerGetNextBetter(poker_t *poker, uint8_t current); /** * 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 pokerPlayerGetRemainingBetterCount(poker_t *poker); /** * Let a player bet chips into the pot. * * @param poker Poker game instance. * @param pot Poker pot to bet in to. * @param playerIndex The players' index that is betting. * @param chips The amount of chips the player is betting. */ void pokerPlayerBetPot( poker_t *poker, pokerpot_t *pot, uint8_t playerIndex, int32_t chips ); /** * Let a player bet chips into the current pot. * * @param bet Poker game instance. * @param playerIndex The players' index that is betting. * @param chips The amount of chips the player is betting. */ void pokerPlayerBet(poker_t *poker, uint8_t playerIndex, int32_t chips);