nsnake
Classic snake game for the terminal
Public Member Functions | List of all members
StateManager Class Reference

Giga-class that switches from game states. More...

#include <StateManager.hpp>

Public Member Functions

 StateManager ()
 Initializes pretty much everything.
 
void run ()
 Main entry point and game loop. More...
 

Detailed Description

Giga-class that switches from game states.

It makes the transitions between them, assuring each one is properly initialized.

For developers:

Short and simple explanation:

Definition at line 22 of file StateManager.hpp.

Member Function Documentation

void StateManager::run ( )

Main entry point and game loop.

This is where it all happens. The game never leaves this method, the only thing that's allowed to happen are state-specific methods called inside here.

If we leave this method, the game quits, as seen on main.cpp.

Definition at line 23 of file StateManager.cpp.


The documentation for this class was generated from the following files: