Closed rijkvp closed 3 years ago
I commented out the collision debug because it was not working anymore since the draw & update code are seperated in #33
I think this is done as cleanly as can be done, with code that has been moved to different places. We'll let a newbie remove the commented-out lines 👍
I am unsure, but I do think
StateManager
can also simple be calledGame
, as (1) one can say: 'a game has a state', (2) it feels more expressive to me (what does a manager do exactly?). Maybe we can even get rid of the globals 👍.I leave that up to Rijk and future Issues: these changes on themselves are a cleanly performed architectural next step 👍
A state manager manages the states of the game 😉. In processing you need to implement the setup() and draw() functions so I don't think we can get rid of the globals sadly 🤔. If it was possible to put everything in one game class I should have simply called Game
.
I implemented the state machine pattern and it works nicely! fixes #37