Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/library
diff options
context:
space:
mode:
Diffstat (limited to 'library')
-rw-r--r--library/pippy/scholar/scholar.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/library/pippy/scholar/scholar.py b/library/pippy/scholar/scholar.py
index c2c141b..0f50f65 100644
--- a/library/pippy/scholar/scholar.py
+++ b/library/pippy/scholar/scholar.py
@@ -95,3 +95,16 @@ def opposite_exit(side):
else:
return side
+
+def examine(player, obj):
+ # TODO: "If obj in player.inventory" - or something like that
+ if obj in player.position.contains or obj == player.position:
+ print obj.description
+
+# TODO: The option to move without typing "go", just "west", "up"...
+def go(player, side):
+ if player.position.exits.has_key(side):
+ player.position = player.position.exits[side]
+ examine(player, player.position)
+ else:
+ print "No such exit."