/** * Copyright (c) 2021 Dominic Masters * * This software is released under the MIT License. * https://opensource.org/licenses/MIT */ #pragma once #include "../libs.h" #include "poker.h" #define POKER_TURN_TYPE_OUT 0x00 #define POKER_TURN_TYPE_FOLD 0x01 #define POKER_TURN_TYPE_BET 0x02 #define POKER_TURN_TYPE_CALL 0x03 #define POKER_TURN_TYPE_ALL_IN 0x04 #define POKER_TURN_TYPE_CHECK 0x05 /** The turn that a player/the AI decided to do for its turn */ typedef struct { /** What type of action the turn is */ uint8_t type; /** How many chips they did in their turn (if applicable) */ int32_t chips; /** How confident the AI is about their turn. */ float confidence; } pokerturn_t; /** * Returns the AI result for a turn done by a non human player. * * @param poker Poker game instance to use. * @param playerIndex Player index to get the turn for. * @return Some information about the move the player is trying to perform. */ pokerturn_t pokerTurnGet(poker_t *poker, uint8_t playerIndex); /** * Perform the turn's action. * * @param poker Poker game instance. * @param player Player instance. * @param turn Turn to action. */ void pokerTurnAction(poker_t *poker, pokerplayer_t *player, pokerturn_t *turn);