aboutsummaryrefslogtreecommitdiff
path: root/include/game.hpp
diff options
context:
space:
mode:
authorCharles <sircharlesaze@gmail.com>2020-03-21 13:22:38 +0100
committerCharles <sircharlesaze@gmail.com>2020-03-21 13:22:38 +0100
commitad8ae988ba1928af5063ca1dc7375356e467979b (patch)
tree27a6738ff0172e4ebdaed7174cd7b47cc3ec9d59 /include/game.hpp
parent88f5eb3447073fc6a87786da6a9b6b788f9bde66 (diff)
downloadmario_sokoban-ad8ae988ba1928af5063ca1dc7375356e467979b.tar.gz
mario_sokoban-ad8ae988ba1928af5063ca1dc7375356e467979b.tar.bz2
mario_sokoban-ad8ae988ba1928af5063ca1dc7375356e467979b.zip
Sprites loading and display, player move
Diffstat (limited to 'include/game.hpp')
-rw-r--r--include/game.hpp23
1 files changed, 13 insertions, 10 deletions
diff --git a/include/game.hpp b/include/game.hpp
index fcdd2c1..40ca113 100644
--- a/include/game.hpp
+++ b/include/game.hpp
@@ -26,21 +26,24 @@ public:
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;
+ void move(Direction direction);
+ Cell get(int y, int x) const;
+ size_t getHeight() const;
+ size_t getWidth() const;
+ Position const &getPlayer() const;
+
+private:
+
+ size_t m_width;
+ size_t m_height;
+ Cell **m_grid;
+ Position m_playerPos;
+ Direction m_playerDirection;
};
#endif