Ability to abort computer to computer game

This commit is contained in:
MikeTheWatchGuy 2018-12-13 09:19:54 -05:00
parent 66ededa8de
commit 21debfac4d
1 changed files with 7 additions and 0 deletions

View File

@ -1235,6 +1235,13 @@ class Match():
pass
elif turnType == 'Computer':
event, values = Match.window.Read(timeout=0)
if event == '_QUIT_':
if sg.PopupYesNo('Do you really want to quit?') == 'Yes':
self.matchAbort = True
self.matchComplete = True
break
self.elements['Console'] = '{}\'s Turn'.format(self.players[self.turn].getName())
self.drawScreen(self.hideComputerHands)
if not self.simulation: