Mercurial > boomslang
comparison pyntnclick/gamescreen.py @ 581:7e4a20eb78b8 pyntnclick
Pass game_description to all screens
author | Stefano Rivera <stefano@rivera.za.net> |
---|---|
date | Sat, 11 Feb 2012 16:28:41 +0200 |
parents | 1b1ab71535bd |
children | 2d2ea51b73ad |
comparison
equal
deleted
inserted
replaced
580:27809609eeca | 581:7e4a20eb78b8 |
---|---|
206 surface.fill(self.bg_color) | 206 surface.fill(self.bg_color) |
207 Row.draw(self, surface) | 207 Row.draw(self, surface) |
208 | 208 |
209 | 209 |
210 class GameScreen(Screen, CursorWidget): | 210 class GameScreen(Screen, CursorWidget): |
211 def __init__(self, shell, create_initial_state): | 211 def __init__(self, shell, game_description): |
212 CursorWidget.__init__(self, self) | 212 CursorWidget.__init__(self, self) |
213 Screen.__init__(self, shell) | 213 Screen.__init__(self, shell) |
214 self.running = False | 214 self.running = False |
215 self.create_initial_state = create_initial_state | 215 self.create_initial_state = game_description.initial_state |
216 | 216 |
217 def _clear_all(self): | 217 def _clear_all(self): |
218 for widget in self.subwidgets[:]: | 218 for widget in self.subwidgets[:]: |
219 self.remove(widget) | 219 self.remove(widget) |
220 | 220 |