From 8eebf1079fbed2848ee47cf990f5def5926a0c1f Mon Sep 17 00:00:00 2001 From: Justin Wernick Date: Tue, 19 Apr 2022 21:24:15 +0200 Subject: Refile for merging repos --- 2015-spacebot/src/game_entity.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 2015-spacebot/src/game_entity.cpp (limited to '2015-spacebot/src/game_entity.cpp') diff --git a/2015-spacebot/src/game_entity.cpp b/2015-spacebot/src/game_entity.cpp new file mode 100644 index 0000000..8acf8cd --- /dev/null +++ b/2015-spacebot/src/game_entity.cpp @@ -0,0 +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