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 
GameStateGame
This represents the actual game taking place.
Definition: GameStateGame.hpp:29
GameStateGame::unload
int unload()
Destroys anything builded during the game.
Definition: GameStateGame.cpp:41
GameState::StateCode
StateCode
All possible transitions between states.
Definition: GameState.hpp:39
GameStateGame::load
void load(int stack=0)
Constructs everything necessary for the game.
Definition: GameStateGame.cpp:15
GameStateGame::draw
void draw()
Shows everything onscreen;.
Definition: GameStateGame.cpp:80
GameState
Abstract definition of a game state.
Definition: GameState.hpp:31
GameStateGame::update
GameState::StateCode update()
Updates all possible things on the game.
Definition: GameStateGame.cpp:47
Game
Definition: Game.hpp:16