mirror of
https://github.com/dcs-retribution/dcs-retribution.git
synced 2025-11-10 15:41:24 +00:00
Use set instead of dict
This commit is contained in:
parent
61ecdfc48c
commit
c54f6ba4d2
@ -262,10 +262,10 @@ class Game:
|
||||
persistency.autosave(self)
|
||||
|
||||
def check_win_loss(self):
|
||||
cps = {i.captured: i for i in self.theater.controlpoints}
|
||||
if True not in cps.keys():
|
||||
captured_states = {i.captured for i in self.theater.controlpoints}
|
||||
if True not in captured_states:
|
||||
return TurnState.LOSS
|
||||
if False not in cps.keys():
|
||||
if False not in captured_states:
|
||||
return TurnState.WIN
|
||||
return TurnState.CONTINUE
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user