From 7c9fd51d34ee8fc55444ead7de9773254229e3e3 Mon Sep 17 00:00:00 2001 From: Cloud <sylvain.maret@hotmail.fr> Date: Mon, 3 Jun 2019 14:59:14 +0200 Subject: [PATCH] tried to fix the thief again --- putsch.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/putsch.py b/putsch.py index 18f6172..c6f58aa 100644 --- a/putsch.py +++ b/putsch.py @@ -75,6 +75,7 @@ class Boooob(ircbot.SingleServerIRCBot): self.ingame = 0 self.phase = 0 self.repet = 0 + self.admin = ["Titch","Cloud"] self.phase2trig = 1 self.phase2 = 0 @@ -458,12 +459,15 @@ class Boooob(ircbot.SingleServerIRCBot): serv.privmsg("#lg_putsch", "J'appelle le voleur...S'il existe !") serv.privmsg("#lg_putsch", "J'appelle le cupidon... S'il existe !") self.phase2trig = 0 + print("phase 2") + print(self.choix) if self.voleur != "" and self.phase2 == 0 and self.voleurtrig == 1: - while len(self.choix) > 2: - self.choix.pop() + self.choix = [] # on s'assure que la liste est vide 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 + print("état final") + print(self.choix) serv.privmsg(self.voleur, "Tu es le voleur, tes choix sont : " + ", ".join(self.choix)) self.voleurtrig = 0 -- GitLab