X-Git-Url: http://gitweb.pimeys.fr/?p=bots%2Fhung.git;a=blobdiff_plain;f=hung.py;h=5c7a672ec4470bd59ee42dff6a4b864948fdccc6;hp=ea2a64c843dec47a3a0bd5ad2a333de08d8c8b1a;hb=7499b7e16fe2f3b20d40963a58114574f11fb530;hpb=6868fbffcd492c84cc8066080cf9669c74f99e23 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: