[Sugar-devel] [PATCH Maze] Avoid K_ESCAPE to quit the game SL #3461

Manuel Kaufmann humitos at gmail.com
Thu May 31 19:36:12 EDT 2012


This is an old pygame behavior that we don't need in Sugar.

Signed-off-by: Manuel Kaufmann <humitos at gmail.com>
---
 game.py |    4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/game.py b/game.py
index 85f6d7f..4f904d5 100644
--- a/game.py
+++ b/game.py
@@ -175,9 +175,7 @@ class MazeGame:
         if event.type == pygame.QUIT:
             self.running = False
         elif event.type == pygame.KEYDOWN:
-            if event.key == pygame.K_ESCAPE:
-                self.running = False
-            elif event.key in (pygame.K_PLUS, pygame.K_EQUALS):
+            if event.key in (pygame.K_PLUS, pygame.K_EQUALS):
                 self.harder()
             elif event.key == pygame.K_MINUS:
                 self.easier()
-- 
1.7.10



More information about the Sugar-devel mailing list