I am currently writing a simple board game app.
I have written some basic states which are more to do with global state of the game.
Currently they are just enums, they don't really do anything nor is there a manager.
Something like this;
enum {
GameStateInitialize = 0,
GameStatePlaying = 1,
GameStatePaused = 2,
GameStateEndGameConditionMet = 4
}
Most board games I've played have a linear list of "phases", my own digital board game tries to replicate this. During the GameStatePlaying the board game has various phases, sequentially driven; again these are just enums for now.
enum {
PhaseBuying,
PhaseProduction,
PhaseSelling,
PhaseTaxes,
PhaseUpdateDemand,
PhaseUpdatePlayerTurnOrder
}
During PhaseTaxes
it will check for whether a game end condition has occurred; if it has it needs to trigger the GameStateGameEndConditionMet
Here's the problem I'm having.
Could game-phases, and game-states be combined? I'm really not sure how to make sure that it doesn't do a certain phase if the game end condition has been met?
Should gamePhase and gameState the same?
Thanks