# HG changeset patch # User Neil Muller # Date 1252154693 0 # Node ID f399e4926c366f1e99763cc54e83eeb204860081 # Parent 9c5d2cb3f114565b19ae6a2e294fc241805865f4 Fix events getting sent to the gameboard diff -r 9c5d2cb3f114 -r f399e4926c36 TODO --- a/TODO Sat Sep 05 12:40:13 2009 +0000 +++ b/TODO Sat Sep 05 12:44:53 2009 +0000 @@ -20,8 +20,7 @@ -- Fox gibbing chicken (with feathers) -- Sapper foxes blowing things up? -* And we need to start testing for lose conditions, and set an upper time limit - -- Think about length of game (i.e. number of days) +* Balance game (game length, profits & costs, etc.) == POST PYWEEK == diff -r 9c5d2cb3f114 -r f399e4926c36 gamelib/engine.py --- a/gamelib/engine.py Sat Sep 05 12:40:13 2009 +0000 +++ b/gamelib/engine.py Sat Sep 05 12:44:53 2009 +0000 @@ -17,6 +17,7 @@ self.main_menu = mainmenu.make_main_menu() self._open_window = None self.scoreboard = gameover.ScoreTable() + self.gameboard = None def tick(self): """Tic toc.""" @@ -46,8 +47,14 @@ def create_game_over(self): """Create and open the Game Over window""" game_over = gameover.create_game_over(self.gameboard, self.scoreboard) + self.gameboard = None self.open_window(game_over) + def event(self, e): + if not Game.event(self, e) and self.gameboard: + self.gameboard.event(e) + + class MainMenuState(State): def init(self): sound.stop_background_music()