From 7499b7e16fe2f3b20d40963a58114574f11fb530 Mon Sep 17 00:00:00 2001 From: Vincent Le Gallic Date: Wed, 16 May 2012 17:24:49 +0200 Subject: [PATCH] =?utf8?q?certains=20mots=20ont=20des=20parenth=C3=A8ses?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- hung.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/hung.py b/hung.py index ea2a64c..5c7a672 100755 --- a/hung.py +++ b/hung.py @@ -281,7 +281,7 @@ class Hung(ircbot.SingleServerIRCBot): indice = random.randrange(0,len(mots)) mot,definition=mots[indice],defs[indice] # ' et - sont considérés comme déjà devinés - mot = [(lettre,lettre in "'-") for lettre in list(mot)] + mot = [(lettre,lettre in "'-()") for lettre in list(mot)] self.play_status[canal]=[mot,definition,{}] self.affiche_mot(serv, canal, begin="Devinez") @@ -338,8 +338,8 @@ class Hung(ircbot.SingleServerIRCBot): liste=self.play_status[canal][0] listeapres=[(lettre[0],lettre[1] or lettre[0]==giv_let) for lettre in liste] if liste!=listeapres: - nbtrouvees=(sum([lettre[1] for lettre in listeapres if not lettre[0] in "'-"]) - - sum([lettre[1] for lettre in liste if not lettre[0] in "'-"])) + nbtrouvees=(sum([lettre[1] for lettre in listeapres if not lettre[0] in "'-()"]) + - sum([lettre[1] for lettre in liste if not lettre[0] in "'-()"])) if self.play_status[canal][2].has_key(auteur): self.play_status[canal][2][auteur]+= nbtrouvees else: -- 2.39.2