comparison gamelib/engine.py @ 396:19e583e5cdc0

Refactor for further move work
author Neil Muller <drnlmuller@gmail.com>
date Thu, 12 Nov 2009 21:31:52 +0000
parents bb75979b58e6
children 03d5cb669298
comparison
equal deleted inserted replaced
395:2d0ff46118e2 396:19e583e5cdc0
224 # Ensure any outstanding animitions get cleaned up 224 # Ensure any outstanding animitions get cleaned up
225 self.game.gameboard.run_animations() 225 self.game.gameboard.run_animations()
226 self.cycle_count += 1 226 self.cycle_count += 1
227 if self.cycle_count > constants.NIGHT_LENGTH: 227 if self.cycle_count > constants.NIGHT_LENGTH:
228 return pygame.event.post(START_DAY) 228 return pygame.event.post(START_DAY)
229 if self.game.gameboard.move_foxes(): 229 if self.game.gameboard.do_night_step():
230 # All foxes are gone/safe, so dawn happens 230 # All foxes are gone/safe, so dawn happens
231 return pygame.event.post(START_DAY) 231 return pygame.event.post(START_DAY)
232 # Re-enable timers 232 # Re-enable timers
233 pygame.time.set_timer(ANIM_ID, self.cycle_time) 233 pygame.time.set_timer(ANIM_ID, self.cycle_time)
234 pygame.time.set_timer(MOVE_FOX_ID, 4*self.cycle_time) 234 pygame.time.set_timer(MOVE_FOX_ID, 4*self.cycle_time)