Chapter 19
Application States

Now that all parts are ready, we start working on the actual application. In it, there are three application states needed: the initState where the program starts, the gameState in which the actual gameplay takes place and the scoreState which shows you the score when the game is over.

Prepare an application ‘Tetris’ containing a folder ‘states’. In that folder, you create three files: initState, gameState and scoreState.