From 7d35d72b6e9f4eee3c0b339ccc0822ee30bb8f64 Mon Sep 17 00:00:00 2001 From: Cloud <sylvain.maret@hotmail.fr> Date: Wed, 29 May 2019 15:19:00 +0200 Subject: [PATCH] test --- putsch.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/putsch.py b/putsch.py index f9592df..18f6172 100644 --- a/putsch.py +++ b/putsch.py @@ -459,7 +459,9 @@ class Boooob(ircbot.SingleServerIRCBot): serv.privmsg("#lg_putsch", "J'appelle le cupidon... S'il existe !") self.phase2trig = 0 - if self.voleur != "" and self.phase2 == 0 and self.voleurtrig == 1 and len(self.choix) == 0: + if self.voleur != "" and self.phase2 == 0 and self.voleurtrig == 1: + while len(self.choix) > 2: + self.choix.pop() self.choix.append(self.cartes.pop(rand.randint(0, len(self.cartes) -1))) self.choix.append(self.cartes.pop(rand.randint(0, len(self.cartes) - 1))) # on crée une liste de deux choix serv.privmsg(self.voleur, "Tu es le voleur, tes choix sont : " + -- GitLab