nsnake
Classic snake game for the terminal
src
Interface
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
11
class
LayoutGame
:
public
Layout
12
{
13
public
:
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
26
private
:
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
40
public
:
42
Window
*
pause
;
43
45
Window
*
help
;
46
47
private
:
48
Window
* boardwin;
49
50
WindowGameHelp
* helpWindows;
51
};
52
53
#endif //LAYOUTGAMEMODESURVIVAL_H_DEFINED
54
Menu
List of selectable items.
Definition:
Menu.hpp:29
Layout
Interface for how the things are shown on the screen.
Definition:
Layout.hpp:16
Window
A segment of the terminal screen (2D char matrix).
Definition:
Window.hpp:17
WindowGameHelp
Specific Window that shows Help and other info during Game.
Definition:
WindowGameHelp.hpp:12
LayoutGame::help
Window * help
Contains the help screen.
Definition:
LayoutGame.hpp:45
LayoutGame::pause
Window * pause
Contains the pause menu.
Definition:
LayoutGame.hpp:42
LayoutGame
Definition:
LayoutGame.hpp:12
Game
Definition:
Game.hpp:17
Generated on Tue Jul 28 2020 00:00:00 for nsnake by
1.8.18