1 2 3 4 5 6 7 8 9 10 11 12 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(); }