Exit the game on KeyboardInterrupt (don't log this error)
This commit is contained in:
parent
ac8c7a0a4c
commit
b42f1277b1
|
@ -94,7 +94,11 @@ class Game:
|
||||||
screen.noutrefresh()
|
screen.noutrefresh()
|
||||||
self.display_actions(DisplayActions.REFRESH)
|
self.display_actions(DisplayActions.REFRESH)
|
||||||
curses.doupdate()
|
curses.doupdate()
|
||||||
key = screen.getkey()
|
try:
|
||||||
|
key = screen.getkey()
|
||||||
|
except KeyboardInterrupt:
|
||||||
|
exit(0)
|
||||||
|
return
|
||||||
if key == "KEY_MOUSE":
|
if key == "KEY_MOUSE":
|
||||||
_ignored1, x, y, _ignored2, _ignored3 = curses.getmouse()
|
_ignored1, x, y, _ignored2, _ignored3 = curses.getmouse()
|
||||||
self.display_actions(DisplayActions.MOUSE, y, x)
|
self.display_actions(DisplayActions.MOUSE, y, x)
|
||||||
|
|
Loading…
Reference in New Issue