aboutsummaryrefslogtreecommitdiff
path: root/include/game.hpp
diff options
context:
space:
mode:
authorCharles <sircharlesaze@gmail.com>2020-03-21 03:56:19 +0100
committerCharles <sircharlesaze@gmail.com>2020-03-21 03:56:19 +0100
commit88f5eb3447073fc6a87786da6a9b6b788f9bde66 (patch)
tree2fb30f59e539b08cb53c4b7d7336238acc4ca1ed /include/game.hpp
parent166c06083212a5657fcaf03328bf530f9eb8b0d8 (diff)
downloadmario_sokoban-88f5eb3447073fc6a87786da6a9b6b788f9bde66.tar.gz
mario_sokoban-88f5eb3447073fc6a87786da6a9b6b788f9bde66.tar.bz2
mario_sokoban-88f5eb3447073fc6a87786da6a9b6b788f9bde66.zip
Added basic game init with string and game display
Diffstat (limited to 'include/game.hpp')
-rw-r--r--include/game.hpp37
1 files changed, 36 insertions, 1 deletions
diff --git a/include/game.hpp b/include/game.hpp
index 017d21b..fcdd2c1 100644
--- a/include/game.hpp
+++ b/include/game.hpp
@@ -1,11 +1,46 @@
#ifndef GAME_HPP
# define GAME_HPP
+#include <string>
+#include <algorithm>
+
class Game
{
public:
- Game();
+ 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