From fc08c602301a9fa7d4d158fbeb43d8e5b5d618de Mon Sep 17 00:00:00 2001 From: ddorn Date: Sat, 16 May 2020 12:46:14 +0200 Subject: [PATCH] :bug: fix dice collisions --- src/base_tirage.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/base_tirage.py b/src/base_tirage.py index 204d025..a6d626a 100644 --- a/src/base_tirage.py +++ b/src/base_tirage.py @@ -163,7 +163,6 @@ class BaseTirage(yaml.YAMLObject): for t in collisions: dices[t] = None - collisions = [] while None in dices.values(): event = await self.next(int) @@ -176,8 +175,10 @@ class BaseTirage(yaml.YAMLObject): else: await self.warn_twice(int) + collisions = [t for t in teams if list(dices.values()).count(dices[t]) > 1] if collisions: await self.warn_colisions(collisions) + return dices async def make_poules(self):