Commit 6d1a22af authored by Constantin's avatar Constantin
Browse files

small fixes

parent 9bb21fa1
......@@ -26,11 +26,11 @@ class Labyrinth:
assert self.groundtype != Labyrinth.GroundType.WALL
def neighbor(self,dy,dx):
self.labyrinth.getTileAt(self.row + dy, self.column + dx)
return self.labyrinth.getTileAt(self.row + dy, self.column + dx)
def isWalkable(self):
# this may be more complicated in the future
return self.groundtype == Labyrinth.GroundType.FLOOR
def toString(self):
def __str__(self):
# always starts with there is/there are
if self.groundtype == Labyrinth.GroundType.WALL:
return "there is a wall"
......@@ -105,4 +105,5 @@ class Labyrinth:
def createThing (self, thing, field):
thing.field = field
\ No newline at end of file
\ No newline at end of file
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment