X-Git-Url: http://gitweb.pimeys.fr/?a=blobdiff_plain;f=hung.py;h=9582bc0fe27cc763ad154e15e7f23e361a8aa60e;hb=d8dc10f1a6c439f8f21b1fe0b1a044a6b517c609;hp=0ad4a372620cdeea003f2cb0ad2d0ddbca3c3155;hpb=4e3d1abd20d837a4693decb7ee70e792a9aeaf2a;p=bots%2Fhung.git diff --git a/hung.py b/hung.py index 0ad4a37..9582bc0 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: