comparison gamelib/engine.py @ 312:dd1ffee5ccf5

Use different score tables fot the different modes. Refactor game modes code as a result
author Neil Muller <drnlmuller@gmail.com>
date Sat, 05 Sep 2009 18:30:51 +0000
parents d508248041ff
children 9bf0e701a36e
comparison
equal deleted inserted replaced
311:245ee075f2ae 312:dd1ffee5ccf5
44 help_screen = helpscreen.make_help_screen() 44 help_screen = helpscreen.make_help_screen()
45 self.open_window(help_screen) 45 self.open_window(help_screen)
46 46
47 def create_game_over(self): 47 def create_game_over(self):
48 """Create and open the Game Over window""" 48 """Create and open the Game Over window"""
49 game_over = gameover.create_game_over(self.gameboard, self.scoreboard) 49 for mode, days in constants.TURN_LIMITS.iteritems():
50 if days == constants.TURN_LIMIT:
51 game_over = gameover.create_game_over(self.gameboard,
52 self.scoreboard[mode], mode)
50 self.gameboard = None 53 self.gameboard = None
51 self.open_window(game_over) 54 self.open_window(game_over)
52 55
53 def event(self, e): 56 def event(self, e):
54 if not Game.event(self, e): 57 if not Game.event(self, e):