Added FLOP action

This commit is contained in:
2021-07-28 09:52:29 -07:00
parent c3b0ad7950
commit b89f27f3ec
8 changed files with 140 additions and 10 deletions

View File

@ -12,21 +12,29 @@ bool gameInit(game_t *game) {
engineInit(&game->engine, game);
// Send off to the game instance
return pokerGameInit(game);
#if SETTING_GAME == SETTING_GAME_POKER
return pokerGameInit(game);
#endif
}
bool gameUpdate(game_t *game, float platformDelta) {
// Let the engine do its thing.
engineUpdateStart(&game->engine, game, platformDelta);
// Hand off to the poker logic
pokerGameUpdate(game);
// Hand off to the game's logic
#if SETTING_GAME == SETTING_GAME_POKER
pokerGameUpdate(game);
#endif
// Hand back to the engine.
return engineUpdateEnd(&game->engine, game);
}
void gameDispose(game_t *game) {
pokerGameDispose(game);
// Cleanup the game
#if SETTING_GAME == SETTING_GAME_POKER
pokerGameDispose(game);
#endif
engineDispose(&game->engine, game);
}

View File

@ -6,7 +6,10 @@
#pragma once
#include <dawn/dawn.h>
#include "../engine/engine.h"
#include "poker/pokergame.h"
#if SETTING_GAME == SETTING_GAME_POKER
#include "poker/pokergame.h"
#endif
/**
* Initialize the game context.

View File

@ -25,6 +25,9 @@ bool pokerGameInit(game_t *game) {
pokerActionRoundAdd(&pokerGame->scene.conversation.actionQueue, &pokerGame->poker);
vnConversationTalk(&pokerGame->scene.conversation, "Betting Round", NULL);
vnConversationTalk(&pokerGame->scene.conversation, "Flop Round", NULL);
pokerActionFlopAdd(&pokerGame->scene.conversation.actionQueue, &pokerGame->poker);
// Begin the VN conversation queue.
queueNext(&pokerGame->scene.conversation.actionQueue);

View File

@ -14,6 +14,7 @@
#include "../../poker/actions/match.h"
#include "../../poker/actions/round.h"
#include "../../poker/actions/flop.h"
/**
* Initializes the game state for the poker game.