From fa1fe48abbe25e70a7b6e07136f5efa4cda22e49 Mon Sep 17 00:00:00 2001 From: Marcin Kostrzewski Date: Sat, 16 May 2020 09:59:53 +0200 Subject: [PATCH] Added __str__ method --- src/entities/Entity.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/entities/Entity.py b/src/entities/Entity.py index b2b86be..8b8ecf0 100644 --- a/src/entities/Entity.py +++ b/src/entities/Entity.py @@ -247,3 +247,6 @@ class Entity(pygame.sprite.Sprite): self.movementTimer += self.pygameTimer.tick() # If A* has ben called, move the entity self.updateEntityCoords() + + def __str__(self): + return "Entity - ID:{}, pos:({}x, {}y)".format(self.id, self.x, self.y)