Added basic betting, turns, and added queue restacking

This commit is contained in:
2021-08-13 09:32:15 -07:00
parent 82fe9a7e3c
commit eddc5bfafd
14 changed files with 217 additions and 8 deletions

View File

@ -52,6 +52,7 @@
#include "locale/language.h"
// Poker Game Logic
#include "poker/turn.h"
#include "poker/bet.h"
#include "poker/card.h"
#include "poker/dealer.h"

View File

@ -19,11 +19,14 @@
typedef struct {
/** Blinds */
uint32_t blindSmall, blindBig;
int32_t blindSmall, blindBig;
/** How big the current bet is for the round. */
int32_t currentBet;
/** For Betting round, which player is currently betting */
uint8_t better;
/** Current pot of chips */
uint32_t pot;
int32_t pot;
} pokerbet_t;

View File

@ -48,8 +48,8 @@ typedef struct {
uint8_t state;
/** Chips in players' posession */
uint32_t chips;
int32_t chips;
/** Current bet in current round player has placed */
uint32_t currentBet;
int32_t currentBet;
} pokerplayer_t;

19
include/dawn/poker/turn.h Normal file
View File

@ -0,0 +1,19 @@
/**
* Copyright (c) 2021 Dominic Masters
*
* This software is released under the MIT License.
* https://opensource.org/licenses/MIT
*/
#pragma once
#include "../libs.h"
#define POKER_TURN_TYPE_OUT 0x00
#define POKER_TURN_TYPE_FOLD 0x01
#define POKER_TURN_TYPE_BET 0x02
typedef struct {
uint8_t type;
int32_t chips;
float confidence;
} pokerturn_t;