2021-07-28 09:52:29 -07:00

53 lines
1.5 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>
#include "../../display/animation/queue.h"
#include "../dealer.h"
/**
* Shorthand action callback parser. Takes the queue, action and the intended
* turn count to complete the action.
*
* @param queue Queue that fired the action.
* @param action Action that was fired.
* @param count Count of cards to turn over from the deck.
*/
void _pokerActionFlopDo(queue_t *queue, queueaction_t *action, uint8_t count);
/** Callbacks for River, Turn and Flop Actions */
void _pokerActionFlopOnStart(queue_t *queue, queueaction_t *action, uint8_t i);
void _pokerActionTurnOnStart(queue_t *queue, queueaction_t *action, uint8_t i);
void _pokerActionRiverOnStart(queue_t *queue, queueaction_t *action, uint8_t i);
/**
* Queues a flop action onto the queue.
*
* @param queue Queue to add to.
* @param poker Poker game instance to flop.
* @return The queued action.
*/
queueaction_t * pokerActionFlopAdd(queue_t *queue, poker_t *poker);
/**
* Queues a turn action onto the queue.
*
* @param queue Queue to add to.
* @param poker Poker game instance to turn.
* @return The queued action.
*/
queueaction_t * pokerActionTurnAdd(queue_t *queue, poker_t *poker);
/**
* Queues a river action onto the queue.
*
* @param queue Queue to add to.
* @param poker Poker game instance to river.
* @return The queued action.
*/
queueaction_t * pokerActionRiverAdd(queue_t *queue, poker_t *poker);