I’ve implemented state machines now in the game. I have 3 states that can be running at any time: INTRO, ON_FIELD, and OUTRO.
Captcha: This is the intro screen. Yes it is temporary.
INTRO is just a splash screen that pops up and waits for 2 seconds before naturally moving towards the next state, ON_FIELD. There is no logic or event handling that happens in INTRO. There isn’t even a primitive game loop.
Captcha: The Thrashball game we all know and love.
ON_FIELD is what was previously known as the entirety of Thrashball. Only now, when the user quits, they are taken to the OUTRO state.
OUTRO is just another screen, only it requires a key to be pressed or a mouse button to be pressed before it moves to the QUIT state.
QUIT simply quits the program.