Use set instead of dict

This commit is contained in:
walterroach 2020-12-09 18:25:24 -06:00
parent 61ecdfc48c
commit c54f6ba4d2

View File

@ -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