Commit 1ae6e89e authored by Ralf's avatar Ralf
Browse files

bunch of small fixes

parent 45beb26f
...@@ -27,7 +27,6 @@ class Game: ...@@ -27,7 +27,6 @@ class Game:
self.labyrinth.createThing(player,tile) self.labyrinth.createThing(player,tile)
self.players.append(player) self.players.append(player)
self.sel.register(conn, selectors.EVENT_READ, player.read) self.sel.register(conn, selectors.EVENT_READ, player.read)
self.showAdmins()
def removePlayer(self, player): def removePlayer(self, player):
assert player in self.players assert player in self.players
......
...@@ -72,7 +72,7 @@ class Labyrinth: ...@@ -72,7 +72,7 @@ class Labyrinth:
result = "" result = ""
for row in self.tiles: for row in self.tiles:
for field in row: for field in row:
if field.groundtype == Labyrinth.GroundType.FLOOR: if field.groundtype == Labyrinth.GroundType.WALL:
result += "#" result += "#"
else: else:
if not field.things: if not field.things:
......
...@@ -110,7 +110,7 @@ class Player(Thing): ...@@ -110,7 +110,7 @@ class Player(Thing):
elif verb in sayVerbs: elif verb in sayVerbs:
msg = " ".join(words[1:]) msg = " ".join(words[1:])
for dx, dy in directionOffsets.values(): for dx, dy in directionOffsets.values():
for thing in self.field.neighbor(dx=dx, dy=dy): for thing in self.field.neighbor(dx=dx, dy=dy).things:
if isinstance(thing, Player) and thing != self: if isinstance(thing, Player) and thing != self:
thing.send("You hear someone saying: "+msg) thing.send("You hear someone saying: "+msg)
for admin in self.game.admins: for admin in self.game.admins:
......
Markdown is supported
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