diff options
| author | Kleopatra Angelidi <akleop@gmail.com> | 2013-05-26 23:47:41 +0300 |
|---|---|---|
| committer | Kleopatra Angelidi <akleop@gmail.com> | 2013-05-26 23:47:41 +0300 |
| commit | 74288b83d9e99f790ef4a96fe7bfc96814bcb3d6 (patch) | |
| tree | 7845c107d6bfe9def38fbbc4af13fa36d68d1c74 /weatbag/tiles | |
| parent | 069a838975c7c1ce58f8b98678ee2005e4410d8c (diff) | |
PEP 8
Diffstat (limited to 'weatbag/tiles')
| -rw-r--r-- | weatbag/tiles/n1w5.py | 4 | ||||
| -rw-r--r-- | weatbag/tiles/n3w5.py | 3 | ||||
| -rw-r--r-- | weatbag/tiles/n5w7.py | 35 |
3 files changed, 23 insertions, 19 deletions
diff --git a/weatbag/tiles/n1w5.py b/weatbag/tiles/n1w5.py index 4b2c1d4..634b4f7 100644 --- a/weatbag/tiles/n1w5.py +++ b/weatbag/tiles/n1w5.py @@ -10,8 +10,8 @@ class Tile: def describe(self): if self.contents['mice']: print("As you walk the rocky path at the edge of the cliff you " - "hear a squeaking sound and you notice two mouse traps on the " - "ground. Each has one mouse trapped inside.\n" + "hear a squeaking sound and you notice two mouse traps on " + "the ground. Each has one mouse trapped inside.\n" "You could take the silly rodents but really... what the " "hell are you gonna do with them?\n") else: diff --git a/weatbag/tiles/n3w5.py b/weatbag/tiles/n3w5.py index e117bcf..eec9779 100644 --- a/weatbag/tiles/n3w5.py +++ b/weatbag/tiles/n3w5.py @@ -36,7 +36,8 @@ class Tile: "The lid opens and you see a brand new army knife!\n") self.challenge_completed = True - elif (do[0] in words.take) and ('knife' in do) and self.challenge_completed: + elif ((do[0] in words.take) and ('knife' in do) + and self.challenge_completed): self.take_knife(player, do) else: print("Sorry, I don't understand.") diff --git a/weatbag/tiles/n5w7.py b/weatbag/tiles/n5w7.py index e12f28c..b371ea9 100644 --- a/weatbag/tiles/n5w7.py +++ b/weatbag/tiles/n5w7.py @@ -8,20 +8,21 @@ class Tile: def describe(self): if self.trapped: - print("You are inside the lighthouse. You hear a clicking sound and " - "the door closes behind you.\nIt is dark, and an enormous cat " - "sits on a computer compiling felinux kernels.\n" - "You try to open the door and leave but you realize it is " - "locked.\n" - "The cat turns at you and hisses loudly.\n" - "She grawls and because you now speak cat, you understand what " - "she says.\n\n" - "Puny human, how dare you disturb my peace!\n" - "If you tell a lie I will hang you; if you tell the truth I will " - "shoot you.\n\n" - "It looks like you are condemned... Though if you think a bit " - "more there is an appropriate answer that gets your ass out of " - "this hell!\n") + print("You are inside the lighthouse. You hear a clicking sound " + "and the door closes behind you.\n" + "It is dark, and an enormous cat sits on a computer " + "compiling felinux kernels.\n" + "You try to open the door and leave but you realize it is " + "locked.\n" + "The cat turns at you and hisses loudly.\n" + "She grawls and because you now speak cat, you understand " + "what she says.\n\n" + "Puny human, how dare you disturb my peace!\n" + "If you tell a lie I will hang you; " + "if you tell the truth I will shoot you.\n\n" + "It looks like you are condemned... Though if you think a " + "bit more there is an appropriate answer that gets your ass " + "out of this hell!\n") # The exact answer is 'You will hang me'. If she hangs him, then the # statement was true and she could only hang him for telling a lie. @@ -50,7 +51,7 @@ class Tile: "Ah huh you think... lolpython fibonacci. Crazy catworks. " "Nothing to do here!\n") -# http://www.dalkescientific.com/writings/diary/archive/2007/06/01/lolpython.html +#http://www.dalkescientific.com/writings/diary/archive/2007/06/01/lolpython.html def action(self, player, do): if self.trapped: @@ -60,7 +61,9 @@ class Tile: elif do == ["you","will","not","shoot","me"]: print("You dirty little human, I can only let you go now!\n") self.trapped = False - elif player.has("catfood") and (do[0] in words.use or do[0] in words.give) and "catfood" in do: + elif (player.has("catfood") + and (do[0] in words.use or do[0] in words.give) + and "catfood" in do): print("Do you think that if you bribe me with catfood I'll let " "you leave?\nCatfood will not save you this time.\n" "The fat cat steals one catfood and eats it. You should " |
