I’ve been looking into state machines as a possible way to handle game menus and “gamemodes”. So for example, a main menu, options menu, in game (gamemode 1), in game (gamemode 2), etc.
I found this tutorial: https://www.youtube.com/watch?v=MGEx35FjBuo which explains states very well (source code in the description).
From what I can gather from the video, ATMMachine would be my game, and the different states (HasCard, HasPin) would be my states (main menu, options menu). Whichever state is currently active is the state I would render and update.
I’m just double checking here to make sure I have the right end of the stick.