Skip to content

Commit

Permalink
Changement des conditions d'apparition du traitre
Browse files Browse the repository at this point in the history
  • Loading branch information
Tailszefox committed Mar 30, 2015
1 parent 8dd7a0b commit c290338
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions loup.py
Expand Up @@ -726,9 +726,17 @@ def verifierRolesRecus(self, serv):
self.addLog('tuteur', irclib.nm_to_n(self.tuteur))

self.debug(u"Nombre final de SV : " + str(len(self.sv)))
if(len(self.sv) >= 3):

# 1 chance sur 2 d'avoir un traitre
randomTraitre = random.randint(0, 10)

self.debug(u"Random traitre : " + str(randomTraitre))
if(len(self.sv) >= 4 and randomTraitre >= 5):
self.traitre = random.sample(self.sv, 1)[0]
self.debug(u"Traitre : " + str(self.traitre))
self.debug(u"Traitre : " + str(self.traitre))
else:
self.traitre = None
self.debug(u"Pas de traitre")

self.statut = "verifierRolesRecus"
self.envoyer(self.chanJeu, "ROLES_ENVOYES")
Expand Down

0 comments on commit c290338

Please sign in to comment.