nsnake
Classic snake game for the terminal
Loading...
Searching...
No Matches
LayoutGame.hpp
1#ifndef LAYOUTGAMEMODESURVIVAL_H_DEFINED
2#define LAYOUTGAMEMODESURVIVAL_H_DEFINED
3
4#include <Interface/Layout.hpp>
5#include <Interface/Menu/Menu.hpp>
6#include <Interface/WindowGameHelp.hpp>
7#include <Game/Game.hpp>
8
9#include <vector>
10
11class LayoutGame: public Layout
12{
13public:
14 // Telling the compiler (clang) that we're
15 // hiding the parent's virtual function
16 using Layout::draw;
17
18 LayoutGame(Game* game, int width, int height);
19 virtual ~LayoutGame();
20
21 void windowsInit();
22 void windowsExit();
23
24 void draw(Menu* menu);
25
26private:
27 Game* game;
28
29 // On `Layout` we have a `main` Window, where
30 // everything's inside
31
33 Window* gamewin;
34
36 Window* info;
37
38// HACK so we can get width and height to create menu
39// on the Game
40public:
43
46
47private:
48 Window* boardwin;
49
50 WindowGameHelp* helpWindows;
51};
52
53#endif //LAYOUTGAMEMODESURVIVAL_H_DEFINED
54
Definition Game.hpp:17
Window * help
Contains the help screen.
Window * pause
Contains the pause menu.
Interface for how the things are shown on the screen.
Definition Layout.hpp:16
List of selectable items.
Definition Menu.hpp:29
Specific Window that shows Help and other info during Game.
A segment of the terminal screen (2D char matrix).
Definition Window.hpp:17