blob: fcdd2c10fcde634b09ea94fbe4794f62e2884d14 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
|
#ifndef GAME_HPP
# define GAME_HPP
#include <string>
#include <algorithm>
class Game
{
public:
Game(std::string fmt);
~Game();
enum Direction
{
DirectionUp,
DirectionDown,
DirectionLeft,
DirectionRight,
};
enum Cell
{
CellEmpty = 0,
CellWall,
CellCrate,
CellPayload,
};
Cell get(int y, int x);
size_t getHeight();
size_t getWidth();
private:
struct Position
{
int y, x;
};
size_t m_width;
size_t m_height;
Cell **m_grid;
Position m_playerPos;
};
#endif
|