diff options
| author | George Angelopoulos <l4than.d3vers@gmail.com> | 2013-04-21 20:18:27 +0300 |
|---|---|---|
| committer | George Angelopoulos <l4than.d3vers@gmail.com> | 2013-04-21 20:18:27 +0300 |
| commit | b6494a43397a58d4861d715c737b299c9e8fe09b (patch) | |
| tree | 80231453c13fdc68d803e264d6fb0a303f0fb323 /weatbag | |
| parent | 645d51c6c5702313448520513be97433130725bd (diff) | |
Added check for "bugs must be crushed" message.
Now the message shows up only the first time
the player goes South.
Diffstat (limited to 'weatbag')
| -rw-r--r-- | weatbag/tiles/s1e1.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/weatbag/tiles/s1e1.py b/weatbag/tiles/s1e1.py index 86b4758..5dabe3c 100644 --- a/weatbag/tiles/s1e1.py +++ b/weatbag/tiles/s1e1.py @@ -5,6 +5,7 @@ class Tile: def __init__(self): self.contents = {'bug': 1} self.first_visit = True + self.hasnt_gone_south = True pass def describe(self): @@ -27,11 +28,12 @@ class Tile: print("The undergrowth in that direction " "is impassable. You turn back.") return False - elif direction == 's': + elif direction == 's' and hasnt_gone_south: print("Bugs are the enemy and must be crushed!\n" "So you decide to follow the bug upstream.") input() self.first_visit = False + self.hasnt_gone_south = False return True else: if self.first_visit: |
