From eee531f2bce194b9eea741cc64d02dcba498d639 Mon Sep 17 00:00:00 2001 From: Ben Date: Fri, 7 Aug 2020 18:10:06 +0100 Subject: [PATCH] Tick down to -1 on match making interface so that opponents are shown --- houdini/handlers/games/match.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/houdini/handlers/games/match.py b/houdini/handlers/games/match.py index 6620d8b..dab4fda 100644 --- a/houdini/handlers/games/match.py +++ b/houdini/handlers/games/match.py @@ -42,13 +42,14 @@ class MatchMaking: async def tick(self): for i in range(0, len(self._penguins) - len(self._penguins) % 2, self._max_players): matched = self._penguins[i:i+self._max_players] - if any(mm.tick == 0 for mm in matched): + if any(mm.tick == -1 for mm in matched): matched_penguins = [mm.penguin for mm in matched] self._matched_penguins.update({ mm.penguin.id: matched_penguins for mm in matched}) self._penguins = [mm for mm in self._penguins if mm not in matched] + await self._on_tick(matched) await self._on_matched(matched) else: await self._on_tick(matched)