nsnake
Classic snake game for the terminal
|
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... | |
Giga-class that switches from game states.
It makes the transitions between them, assuring each one is properly initialized.
Short and simple explanation:
Definition at line 22 of file StateManager.hpp.
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.