F
This commit is contained in:
48
src/poker/turn.h
Normal file
48
src/poker/turn.h
Normal file
@ -0,0 +1,48 @@
|
||||
/**
|
||||
* 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"
|
||||
|
||||
/**
|
||||
* Return a turn action for the given player to fold.
|
||||
*
|
||||
* @param poker Poker game instance.
|
||||
* @param player Player index.
|
||||
* @return A turn for a fold action.
|
||||
*/
|
||||
pokerturn_t pokerTurnFold(poker_t *poker, uint8_t player);
|
||||
|
||||
/**
|
||||
* Perform a turn action for betting as a player.
|
||||
*
|
||||
* @param poker Poker game instance.
|
||||
* @param playerIndex Player index who is betting.
|
||||
* @param chips Chips to raise by.
|
||||
* @return A turn for a bet action.
|
||||
*/
|
||||
pokerturn_t pokerTurnBet(poker_t *poker, uint8_t playerIndex, int32_t chips);
|
||||
|
||||
/**
|
||||
* 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 pokerTurnGetForPlayer(poker_t *poker, uint8_t playerIndex);
|
||||
|
||||
/**
|
||||
* Perform the turn's action.
|
||||
*
|
||||
* @param poker Poker game instance.
|
||||
* @param playerIndex Player index.
|
||||
* @param turn Turn to action.
|
||||
*/
|
||||
void pokerTurnAction(poker_t *poker, uint8_t playerIndex, pokerturn_t turn);
|
Reference in New Issue
Block a user