More often than not, an application will provide different “stages”. On stage could be the moment when you’re in the game lobby. Another could be the actual game, or the stage where you pick your character. There won’t be much shared code code in the update and draw functions in all those states.
Esenthel provides one application state by default. It consists out of the functions Init(), Shut(), Update() and Draw(). When a state becomes active, its Init() function is executed. After that, the Update() and Draw() function are constantly alternated until you close the application or switch to a different state. At the moment, the Shut() function is called.