From 7eb652b9707455961a37598ca259941874dd3407 Mon Sep 17 00:00:00 2001 From: Raffson Date: Mon, 10 Apr 2023 14:10:46 +0200 Subject: [PATCH] Require all bases to be captured to win/lose --- game/game.py | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/game/game.py b/game/game.py index 7b615413..1f7ffef5 100644 --- a/game/game.py +++ b/game/game.py @@ -351,16 +351,10 @@ class Game: persistency.autosave(self) def check_win_loss(self) -> TurnState: - player_airbases = { - cp for cp in self.theater.player_points() if cp.runway_is_operational() - } - if not player_airbases: + if not self.theater.player_points(): return TurnState.LOSS - enemy_airbases = { - cp for cp in self.theater.enemy_points() if cp.runway_is_operational() - } - if not enemy_airbases: + if not self.theater.enemy_points(): return TurnState.WIN return TurnState.CONTINUE