diff options
Diffstat (limited to 'src/game_entity.cpp')
-rw-r--r-- | src/game_entity.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/game_entity.cpp b/src/game_entity.cpp index 1b4e7e3..8acf8cd 100644 --- a/src/game_entity.cpp +++ b/src/game_entity.cpp @@ -1,5 +1,13 @@ #include "game_entity.h" +#include <sstream> GameEntity::GameEntity(int x, int y) :_x(x), _y(y) {} + +std::string GameEntity::coords() const +{ + std::stringstream ss; + ss << "(" << _x << ", " << _y << ")"; + return ss.str(); +} |