summaryrefslogtreecommitdiffstats
path: root/weatbag/tiles/centre.py
diff options
context:
space:
mode:
authorThomas <thomas@study-old.(none)>2012-12-29 19:36:19 +0000
committerThomas <thomas@study-old.(none)>2012-12-29 19:36:19 +0000
commitba2ade314b07f7e16b7860afc621df02f3df46b8 (patch)
tree3299a91636c0dea59d5ae1cea48d091d609aae63 /weatbag/tiles/centre.py
parentdfa96fc3a20785d1d405003748a368e5b2ac3aec (diff)
Create initial game framework.
Diffstat (limited to 'weatbag/tiles/centre.py')
-rw-r--r--weatbag/tiles/centre.py25
1 files changed, 25 insertions, 0 deletions
diff --git a/weatbag/tiles/centre.py b/weatbag/tiles/centre.py
new file mode 100644
index 0000000..7ab4d54
--- /dev/null
+++ b/weatbag/tiles/centre.py
@@ -0,0 +1,25 @@
+from weatbag import words
+
+class Tile:
+ def __init__(self):
+ self.contents = {'rope': 1}
+
+ def describe(self):
+ print("You are in a sizeable clearing in the forest. At your feet, you see "
+ "a mysterious trap door, with three golden keyholes. Paths lead off "
+ "in four directions, which your unerring sense of direction tells you "
+ "correspond to the four compass points.")
+ if self.contents.get('rope'):
+ print("A short length of rope is lying on the floor.")
+
+ def action(self, player, do):
+ if (do[0] in words.take) and ('rope' in do):
+ if self.contents['rope'] > 0:
+ self.contents['rope'] -= 1
+ player.give('rope')
+ print("You put the rope in your bag. That could come in handy.")
+ else:
+ print("You already collected the rope.")
+
+ else:
+ print("Sorry, I don't understand.")