nsnake
Classic snake game for the terminal
GameStateGame.hpp
1 #ifndef GAMESTATEGAME_H_DEFINED
2 #define GAMESTATEGAME_H_DEFINED
3 
4 #include <Flow/GameState.hpp>
5 #include <Game/Game.hpp>
6 
29 class GameStateGame: public GameState
30 {
31 public:
32  GameStateGame();
33  virtual ~GameStateGame();
34 
36  void load(int stack=0);
37 
39  int unload();
40 
47 
49  void draw();
50 
51 private:
53  Game* game;
54 
56  bool willQuit;
57 };
58 
59 #endif //GAMESTATEGAME_H_DEFINED
60 
This represents the actual game taking place.
void draw()
Shows everything onscreen;.
GameState::StateCode update()
Updates all possible things on the game.
Definition: Game.hpp:16
Abstract definition of a game state.
Definition: GameState.hpp:31
StateCode
All possible transitions between states.
Definition: GameState.hpp:39
void load(int stack=0)
Constructs everything necessary for the game.
int unload()
Destroys anything builded during the game.