Actually commit stuff from ages ago
[progcomp2013.git] / qchess / src / graphics.py
index 041b137..8d95db8 100644 (file)
@@ -59,7 +59,7 @@ class GraphicsThread(StoppableThread):
                        pygame.display.flip()
 
                        for event in pygame.event.get():
-                               if event.type == pygame.QUIT:
+                               if event.type == pygame.QUIT or (event.type == pygame.KEYDOWN and event.key == pygame.K_q):
                                        if isinstance(game, GameThread):
                                                with game.lock:
                                                        game.final_result = ""

UCC git Repository :: git.ucc.asn.au