From d9d5b16dc1c6c0ba39cff8641858bdd0d2642f83 Mon Sep 17 00:00:00 2001 From: Kleopatra Angelidi Date: Thu, 23 May 2013 15:20:06 +0300 Subject: wrote more efficient the words that do[] checks (n5w7) --- weatbag/tiles/n5w7.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/weatbag/tiles/n5w7.py b/weatbag/tiles/n5w7.py index f38501c..face836 100644 --- a/weatbag/tiles/n5w7.py +++ b/weatbag/tiles/n5w7.py @@ -54,10 +54,10 @@ class Tile: def action(self, player, do): if self.trapped: - if do[0]=="you" and do[1]=="will" and do[2]=="hang" and do[3]=="me": + if do == ["you","will","hang","me"]: print("You dirty little human, I can only let you go now!\n") self.trapped = False - elif do[0]=="you" and do[1]=="will" and do[2]=="not" and do[3]=="shoot" and do[4]=="me": + elif do == ["you","will","not","shoot","me"]: print("You dirty little human, I can only let you go now!\n") self.trapped = False else: -- cgit v1.3