Refactoring some of the poker game logic again.

This commit is contained in:
2021-07-27 09:49:54 -07:00
parent a63c9d898b
commit 54559e761c
36 changed files with 99 additions and 304 deletions

View File

@ -0,0 +1,23 @@
/**
* Copyright (c) 2021 Dominic Masters
*
* This software is released under the MIT License.
* https://opensource.org/licenses/MIT
*/
#include "pokergame.h"
bool pokerGameInit(game_t *game) {
// Init the game
game->name = POKER_GAME_NAME;
// Hand off to the poker logic.
pokerInit(&game->pokerGame.poker, &game->engine);
}
void pokerGameUpdate(game_t *game) {
}
void pokerGameDispose(game_t *game) {
}

View File

@ -0,0 +1,30 @@
/**
* 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 "../../poker/poker.h"
/**
* Initializes the game state for the poker game.
*
* @param game Game to initialize.
* @returns True if successful, otherwise false.
*/
bool pokerGameInit(game_t *game);
/**
* Updates the poker game instance.
* @param game Game to update for.
*/
void pokerGameUpdate(game_t *game);
/**
* Disposes a previously initialized poker game instance.
* @param game Game to initialize for.
*/
void pokerGameDispose(game_t *game);