diff options
| author | Kleopatra Angelidi <akleop@gmail.com> | 2013-04-30 17:39:59 +0300 |
|---|---|---|
| committer | Kleopatra Angelidi <akleop@gmail.com> | 2013-04-30 17:39:59 +0300 |
| commit | 3acd7eb28ff120648a6ea583b89dc0a865e76541 (patch) | |
| tree | 5b0338250ef522e9552ad101a085c40939a1939c | |
| parent | 6625fb75dcb2c1cfc5bb8d4e81225dfc59fc026f (diff) | |
changed boolean name from challenge_not_completed to challenge_completed
| -rw-r--r-- | weatbag/tiles/n2w1.py | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/weatbag/tiles/n2w1.py b/weatbag/tiles/n2w1.py index 5c520ca..5d58f67 100644 --- a/weatbag/tiles/n2w1.py +++ b/weatbag/tiles/n2w1.py @@ -2,13 +2,13 @@ from weatbag import words class Tile: def __init__(self): - self.challenge_not_completed = True + self.challenge_completed = False self.minutes = "40" def describe(self): print("You see two children who you notice now are a boy and a girl.\n" "They are playing and running around a raft.\n") - if self.challenge_not_completed: + if not self.challenge_completed: self.challenge() else: print("\nThe children will take you to the western island!") @@ -29,7 +29,7 @@ class Tile: "For your answer, type a number followed by 'minutes'.\n") def action(self, player, do): - if self.challenge_not_completed: + if not self.challenge_completed: try: if do[1] == "minutes": if do[0] == self.minutes: @@ -37,7 +37,7 @@ class Tile: "\nLet's go!") print("The brother and sister will take you to the " "island.\n") - self.challenge_not_completed = False + self.challenge_completed = True else: print("We're afraid this is not the correct answer. " "Try another one.\n") @@ -49,21 +49,21 @@ class Tile: "We will transport you for free.\n") print("The brother and sister will take you " "to the island!\n") - self.challenge_not_completed = False + self.challenge_completed = True elif (do[0] in words.take) and (do[1] == "brother" or do[1] == "boy"): print("You bastard, put me down!\n" "We will trasnport you for free!\n") print("The brother and sister will take you " "to the island!\n") - self.challenge_not_completed = False - elif (do[0] in words.take) and self.challenge_not_completed: + self.challenge_completed = True + elif (do[0] in words.take) and not self.challenge_completed: print("I told you we won't give you our raft, " "you have to find the correct amount of time!\n") except: print("Please try typing a number, like '42 minutes'\n.") def leave(self, player, direction): - if direction == "w" and self.challenge_not_completed: + if direction == "w" and not self.challenge_completed: print ("You can't go there by swimming, that part is full of " "electric eels.\n") return False |
