45 lines
1.0 KiB
C
45 lines
1.0 KiB
C
// Copyright (c) 2021 Dominic Masters
|
|
//
|
|
// This software is released under the MIT License.
|
|
// https://opensource.org/licenses/MIT
|
|
|
|
#pragma once
|
|
#include <dawn/dawn.h>
|
|
|
|
/**
|
|
* Initializes/resets the poker bet context.
|
|
*
|
|
* @param bet Poker bet instance.
|
|
*/
|
|
void pokerBetInit(pokerbet_t *bet);
|
|
|
|
/**
|
|
* Resets the bet state (for a new round).
|
|
*
|
|
* @param bet
|
|
*/
|
|
void pokerBetReset(pokerbet_t *bet);
|
|
|
|
/**
|
|
* Let a player bet chips into the pot.
|
|
*
|
|
* @param poker Poker game instance.
|
|
* @param player Poker player instance.
|
|
* @param chips Chips to bet.
|
|
*/
|
|
void pokerBetPlayer(poker_t *poker, pokerplayer_t *player, int32_t chips);
|
|
|
|
/**
|
|
* Reset the current better back to the round/turns default. The better will
|
|
* always be the player to the right of the small blind player.
|
|
*
|
|
* @param poker Poker game to update for.
|
|
*/
|
|
void pokerBetResetBetter(poker_t *poker);
|
|
|
|
/**
|
|
* Takes the current blinds from the correct players.
|
|
*
|
|
* @param poker Poker game to take the blinds from.
|
|
*/
|
|
void pokerBetTakeBlinds(poker_t *poker); |