Mercurial > rinkhals
comparison gamelib/gameboard.py @ 119:eeb42296b523
Remove debugging prints
author | Neil Muller <drnlmuller@gmail.com> |
---|---|
date | Wed, 02 Sep 2009 20:31:50 +0000 |
parents | 2c76ed47fc44 |
children | d2b19131d537 |
comparison
equal
deleted
inserted
replaced
118:2c76ed47fc44 | 119:eeb42296b523 |
---|---|
376 def lay_eggs(self): | 376 def lay_eggs(self): |
377 self.eggs = 0 | 377 self.eggs = 0 |
378 for building in self.buildings: | 378 for building in self.buildings: |
379 if building.NAME in [buildings.HenHouse.NAME]: | 379 if building.NAME in [buildings.HenHouse.NAME]: |
380 for chicken in building.occupants(): | 380 for chicken in building.occupants(): |
381 print 'Laying check', chicken, chicken.egg, chicken.egg_counter | |
382 chicken.lay() | 381 chicken.lay() |
383 if chicken.egg: | 382 if chicken.egg: |
384 self.eggs += 1 | 383 self.eggs += 1 |
385 self.toolbar.update_egg_counter(self.eggs) | 384 self.toolbar.update_egg_counter(self.eggs) |
386 | 385 |
387 def hatch_eggs(self): | 386 def hatch_eggs(self): |
388 for building in self.buildings: | 387 for building in self.buildings: |
389 if building.NAME in [buildings.HenHouse.NAME]: | 388 if building.NAME in [buildings.HenHouse.NAME]: |
390 for chicken in building.occupants(): | 389 for chicken in building.occupants(): |
391 print 'Checking', chicken, chicken.egg, chicken.egg_counter | |
392 new_chick = chicken.hatch() | 390 new_chick = chicken.hatch() |
393 if new_chick: | 391 if new_chick: |
394 self.eggs -= 1 | 392 self.eggs -= 1 |
395 print 'hatching chicken %s in %s ' % (chicken, building) | |
396 building.add_occupant(new_chick) | 393 building.add_occupant(new_chick) |
397 self.add_chicken(new_chick) | 394 self.add_chicken(new_chick) |
398 self.toolbar.update_egg_counter(self.eggs) | 395 self.toolbar.update_egg_counter(self.eggs) |
399 | 396 |
400 def kill_fox(self, fox): | 397 def kill_fox(self, fox): |