42 lines
1.1 KiB
C
42 lines
1.1 KiB
C
/**
|
|
* Copyright (c) 2022 Dominic Masters
|
|
*
|
|
* This software is released under the MIT License.
|
|
* https://opensource.org/licenses/MIT
|
|
*/
|
|
|
|
#pragma once
|
|
#include "../libs.h"
|
|
#include "../util.h"
|
|
#include "card.h"
|
|
#include "player.h"
|
|
#include "pot.h"
|
|
#include "turn.h"
|
|
|
|
#define POKER_COMMUNITY_SIZE_MAX 5
|
|
#define POKER_HUMAN_INDEX 0x00
|
|
|
|
#define POKER_COUNT_FLOP 0x03
|
|
#define POKER_COUNT_TURN 0x01
|
|
#define POKER_COUNT_RIVER 0x01
|
|
|
|
extern uint8_t POKER_DECK[];
|
|
extern uint8_t POKER_DECK_SIZE;
|
|
extern uint8_t POKER_COMMUNITY[];
|
|
extern uint8_t POKER_COMMUNITY_SIZE;
|
|
|
|
extern uint8_t POKER_PLAYER_DEALER;
|
|
extern uint8_t POKER_PLAYER_SMALL_BLIND;
|
|
extern uint8_t POKER_PLAYER_BIG_BLIND;
|
|
extern uint8_t POKER_PLAYER_BETTER;
|
|
|
|
extern uint16_t POKER_GAME_BLINDS_CURRENT;
|
|
|
|
void pokerInit();
|
|
void pokerNewRound();
|
|
inline void pokerBet(uint8_t player, uint16_t amount);
|
|
inline uint8_t pokerGetCallBet(uint8_t player);
|
|
inline bool pokerCanPlayerCheck(uint8_t player);
|
|
inline bool pokerDoesPlayerNeedToBet(uint8_t playerIndex);
|
|
inline uint8_t pokerGetRemainingBetterCount();
|
|
void pokerAi(uint8_t player, pokerturn_t *turn); |