diff gamelib/gameover.py @ 566:a8dde729000a

Add 'Save and Quit' option to quit dialog. Move game events from engine to constants to ease 'import engine' fun
author Neil Muller <drnlmuller@gmail.com>
date Sat, 28 Nov 2009 19:30:06 +0000
parents fb8ab1ee3eaf
children
line wrap: on
line diff
--- a/gamelib/gameover.py	Sat Nov 28 19:15:56 2009 +0000
+++ b/gamelib/gameover.py	Sat Nov 28 19:30:06 2009 +0000
@@ -9,7 +9,6 @@
 import pygame
 from pygame.locals import KEYDOWN, K_ESCAPE
 
-import engine
 import constants
 import imagecache
 import config
@@ -88,10 +87,10 @@
         scoreboard = ScoreTable(level)
 
         def return_pressed():
-            pygame.event.post(engine.GO_MAIN_MENU)
+            pygame.event.post(constants.GO_MAIN_MENU)
 
         def quit_pressed():
-            pygame.event.post(engine.QUIT)
+            pygame.event.post(constants.DO_QUIT)
 
         score = gameboard.cash + \
                 level.sell_price_chicken * len(gameboard.chickens) + \