From c85ebd55fe327125fd4d53d3b62d2b4f145a07a5 Mon Sep 17 00:00:00 2001 From: Justin Worthe Date: Sat, 6 Jun 2015 15:55:54 +0200 Subject: Added logging of other objects in game state --- src/game_entity.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/game_entity.cpp') 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 GameEntity::GameEntity(int x, int y) :_x(x), _y(y) {} + +std::string GameEntity::coords() const +{ + std::stringstream ss; + ss << "(" << _x << ", " << _y << ")"; + return ss.str(); +} -- cgit v1.2.3