diff options
Diffstat (limited to 'weatbag/tiles')
| -rw-r--r-- | weatbag/tiles/centre.py | 2 | ||||
| -rw-r--r-- | weatbag/tiles/e1.py | 5 | ||||
| -rw-r--r-- | weatbag/tiles/n2.py | 2 |
3 files changed, 5 insertions, 4 deletions
diff --git a/weatbag/tiles/centre.py b/weatbag/tiles/centre.py index 4aa9a30..c2709d7 100644 --- a/weatbag/tiles/centre.py +++ b/weatbag/tiles/centre.py @@ -5,7 +5,7 @@ class Tile: self.contents = {'rope': 1} def describe(self): - print("You are in a sizeable clearing in the forest. Paths lead off in" + print("You are in a sizeable clearing in the forest. 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'): diff --git a/weatbag/tiles/e1.py b/weatbag/tiles/e1.py index 909f1b3..486a98f 100644 --- a/weatbag/tiles/e1.py +++ b/weatbag/tiles/e1.py @@ -1,4 +1,5 @@ from weatbag import words +from weatbag.utils import transfer class Tile: def __init__(self): @@ -17,9 +18,7 @@ class Tile: print("Sorry, I don't understand.") def take_berries(self, player): - if self.contents['berries'] > 0: - self.contents['berries'] -= 1 - player.give('berries') + if transfer('berries', self.contents, player.inventory): print("Reaching up, you pick the berries.") else: print("There are no berries here.") diff --git a/weatbag/tiles/n2.py b/weatbag/tiles/n2.py index a9bca43..32e3ce4 100644 --- a/weatbag/tiles/n2.py +++ b/weatbag/tiles/n2.py @@ -26,3 +26,5 @@ class Tile: else: print("Sorry, I don't understand") + +test_items = ['unlit torch'] |
