mirror of
https://github.com/dcs-retribution/dcs-retribution.git
synced 2025-11-10 15:41:24 +00:00
Require all bases to be captured to win/lose
This commit is contained in:
parent
8973100f95
commit
7eb652b970
10
game/game.py
10
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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user