From 86656c49420c2d4c8232a7f21ccab6a2f90a77c3 Mon Sep 17 00:00:00 2001 From: Alberto Xamin Date: Wed, 16 Jun 2021 18:14:44 +0200 Subject: [PATCH] wait to close and other quality of life fixes --- backend/bang/game.py | 14 +++++++----- frontend/src/App.vue | 2 +- frontend/src/components/Lobby.vue | 38 +++++++++++++++---------------- 3 files changed, 28 insertions(+), 26 deletions(-) diff --git a/backend/bang/game.py b/backend/bang/game.py index 7c9de12..a964b2a 100644 --- a/backend/bang/game.py +++ b/backend/bang/game.py @@ -449,12 +449,14 @@ class Game: if self.disconnect_bot and self.started: player.is_bot = True if len([p for p in self.players if not p.is_bot]) == 0: - print(f'no players left in game {self.name}, shutting down') - self.shutting_down = True - self.players = [] - self.spectators = [] - self.deck = None - return True + eventlet.sleep(5) + if len([p for p in self.players if not p.is_bot]) == 0: + print(f'no players left in game {self.name}, shutting down') + self.shutting_down = True + self.players = [] + self.spectators = [] + self.deck = None + return True eventlet.sleep(15) # he may reconnect if player.is_bot: if len(player.available_characters) > 0: diff --git a/frontend/src/App.vue b/frontend/src/App.vue index 305afdc..d556899 100644 --- a/frontend/src/App.vue +++ b/frontend/src/App.vue @@ -153,7 +153,7 @@ html { #app { margin: 4pt; margin-top: -16pt; - zoom: 0.8; + zoom: 0.75; } } h1,h2,h3,h4,p,span,b,label{ diff --git a/frontend/src/components/Lobby.vue b/frontend/src/components/Lobby.vue index 9508ff2..3324af6 100644 --- a/frontend/src/components/Lobby.vue +++ b/frontend/src/components/Lobby.vue @@ -17,6 +17,25 @@ + + + +
+

{{$t("expansions")}}

+
+ {{ex.name}} +
+
+

{{$t('mods')}}

+ {{$t('mod_comp')}} +

{{$t('bots')}}

+ + + + +

{{$t('minimum_players')}}

+

+
@@ -42,25 +61,6 @@
- - - -
-

{{$t('minimum_players')}}

-

-

{{$t("expansions")}}

-
- {{ex.name}} -
-
-

{{$t('mods')}}

- {{$t('mod_comp')}} -

{{$t('bots')}}

- - - - -