Commit a3564202 authored by Ralf's avatar Ralf
Browse files

people can actually look around!

parent 590f6419
......@@ -109,13 +109,13 @@ class Labyrinth:
descr = ""
local = list(filter(lambda thing: thing != player, player.field.things))
if local:
descr += "Next to you, "+describeThings(local)+"\n"
descr += "Next to you, "+describeThings(local)+".\n"
for direction, (dy,dx) in directions.items():
field = player.field.neighbor(dx=dx, dy=dy)
if field is None:
descr += "In the "+direction+", you see a weird kind of void. What could that be? Only time will tell...\n"
elif field.things:
descr += "In the "+direction+", "+describeThings(field.things)+"\n"
descr += "In the "+direction+", "+describeThings(field.things)+".\n"
return descr
def moveThing (self, thing, newField, beforeFinish=None):
......
......@@ -7,6 +7,7 @@ goVerbs = ['go', 'walk', 'run']
sayVerbs = ['say', 'talk', 'scream', 'whisper']
announceVerbs = ['announce']
leaveVerbs = ['leave', 'quit', 'exit', 'suicide']
lookVerbs = ['look']
playerUID = 0
......@@ -124,6 +125,10 @@ class Player(Thing):
elif verb in leaveVerbs:
self.send("Good Bye!")
self.game.removePlayer(self)
elif verb in lookVerbs:
desc = self.game.labyrinth.getDescription(self)
self.send(desc, end="")
elif verb == self.game.adminPW:
self.send("Welcome to the vault, my son")
self.game.makeAdmin(self)
......
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