Re: Traversable Game State/Engine Code
Posted: 11 Sep 2014, 00:27
Today's bit of programming involved started working out which classes should have which responsibilities and more of how the whole thing fits together, starting with Phases. I've always thought it odd that the PhaseHandler class has the main game loop instead of, well, Game. I'm considering switching the game loop over to Game where it makes more sense and can be tied in closer to the event and action queues, then having PhaseHandler handle only the phases—beginning, ending, and switching them. This is subject to further change as I dig around more.
As far as actual implementation goes, I've ensured that passing priority works as intended. I can now pass on phases and turns will rollover in priority for eternity, since none of the stuff that ends the game is implemented. I'm starting to pull the phase change actions into event and action classes instead so that steps/phases can be undone and redone.
As far as actual implementation goes, I've ensured that passing priority works as intended. I can now pass on phases and turns will rollover in priority for eternity, since none of the stuff that ends the game is implemented. I'm starting to pull the phase change actions into event and action classes instead so that steps/phases can be undone and redone.