Even more refactoring.
This commit is contained in:
@ -13,7 +13,12 @@ void _pokerActionBlindsOnStart(queue_t *queue,queueaction_t *action,uint8_t i) {
|
||||
|
||||
poker->state = POKER_STATE_TAKING_BLINDS;
|
||||
|
||||
pokerBetTakeBlinds(poker);
|
||||
pokerBetTakeBlinds(
|
||||
&poker->bet,
|
||||
poker->players,
|
||||
poker->roundSmallBlind,
|
||||
poker->roundBigBlind
|
||||
);
|
||||
printf("Taken Blinds\n");
|
||||
queueNext(queue);
|
||||
}
|
||||
|
@ -6,9 +6,10 @@
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
#include "../bet.h"
|
||||
#include "../poker.h"
|
||||
#include "../../libs.h"
|
||||
#include "../../display/animation/queue.h"
|
||||
#include "../bet.h"
|
||||
|
||||
/** Callback for the blinds action */
|
||||
void _pokerActionBlindsOnStart(queue_t *queue,queueaction_t *action,uint8_t i);
|
||||
|
@ -17,7 +17,7 @@ void _pokerActionDealOnStart(queue_t *queue, queueaction_t *action, uint8_t i) {
|
||||
cardShuffle(poker->dealer.deck, CARD_DECK_SIZE);
|
||||
|
||||
// Deal 2 card to each player
|
||||
pokerDealerDealAll(poker, POKER_DEAL_CARD_EACH);
|
||||
pokerDealerDealAll(&poker->dealer, poker->players, POKER_DEAL_CARD_EACH);
|
||||
|
||||
printf("Cards Dealt\n");
|
||||
queueNext(queue);
|
||||
|
@ -9,6 +9,7 @@
|
||||
#include "../../libs.h"
|
||||
#include "../../display/animation/queue.h"
|
||||
#include "../dealer.h"
|
||||
#include "../poker.h"
|
||||
|
||||
/** Callback for the deal action */
|
||||
void _pokerActionDealOnStart(queue_t *queue, queueaction_t *action, uint8_t i);
|
||||
|
@ -9,6 +9,8 @@
|
||||
#include "../../libs.h"
|
||||
#include "../../display/animation/queue.h"
|
||||
#include "../dealer.h"
|
||||
#include "../poker.h"
|
||||
#include "../turn.h"
|
||||
|
||||
/**
|
||||
* Shorthand action callback parser. Takes the queue, action and the intended
|
||||
|
@ -7,6 +7,7 @@
|
||||
#include "../../libs.h"
|
||||
#include "../../display/animation/queue.h"
|
||||
#include "../bet.h"
|
||||
#include "../poker.h"
|
||||
|
||||
/** Callback for when the poker match aciton starts */
|
||||
void _pokerActionMatchOnStart(queue_t *queue, queueaction_t *action, uint8_t i);
|
||||
|
@ -6,7 +6,7 @@
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
#include <dawn/dawn.h>
|
||||
#include "../../libs.h"
|
||||
#include "../../display/animation/queue.h"
|
||||
#include "../dealer.h"
|
||||
#include "../bet.h"
|
||||
|
@ -64,9 +64,8 @@ uint8_t pokerBetGetRemainingPlayer(
|
||||
|
||||
void pokerBetTakeBlinds(
|
||||
pokerbet_t *bet, pokerplayer_t *players,
|
||||
uint8_t roundSmallBlind, uint8_t roundBigBlind,
|
||||
int32_t blindSmall, int32_t blindBig
|
||||
uint8_t roundSmallBlind, uint8_t roundBigBlind
|
||||
) {
|
||||
pokerBetPlayer(bet, players + roundSmallBlind, blindSmall);
|
||||
pokerBetPlayer(bet, players + roundBigBlind, blindBig);
|
||||
pokerBetPlayer(bet, players + roundSmallBlind, bet->blindSmall);
|
||||
pokerBetPlayer(bet, players + roundBigBlind, bet->blindBig);
|
||||
}
|
@ -102,6 +102,5 @@ uint8_t pokerBetGetRemainingPlayer(
|
||||
*/
|
||||
void pokerBetTakeBlinds(
|
||||
pokerbet_t *bet, pokerplayer_t *players,
|
||||
uint8_t roundSmallBlind, uint8_t roundBigBlind,
|
||||
int32_t blindSmall, int32_t blindBig
|
||||
uint8_t roundSmallBlind, uint8_t roundBigBlind
|
||||
);
|
Reference in New Issue
Block a user