Mercurial > rinkhals
comparison gamelib/gameboard.py @ 128:c5f07479592e
Beware the ninja fox.
author | Simon Cross <hodgestar@gmail.com> |
---|---|
date | Wed, 02 Sep 2009 21:33:53 +0000 |
parents | d98654287317 |
children | 4527e09dc620 |
comparison
equal
deleted
inserted
replaced
127:d98654287317 | 128:c5f07479592e |
---|---|
545 if other_fox.pos.x == x and other_fox.pos.y == y: | 545 if other_fox.pos.x == x and other_fox.pos.y == y: |
546 skip = True # Choose a new position | 546 skip = True # Choose a new position |
547 break | 547 break |
548 if not skip: | 548 if not skip: |
549 roll = random.randint(0, 10) | 549 roll = random.randint(0, 10) |
550 if roll < 9: | 550 if roll < 8: |
551 fox = animal.Fox((x, y)) | 551 fox = animal.Fox((x, y)) |
552 elif roll < 9: | |
553 fox = animal.NinjaFox((x, y)) | |
552 else: | 554 else: |
553 fox = animal.GreedyFox((x, y)) | 555 fox = animal.GreedyFox((x, y)) |
554 self.add_fox(fox) | 556 self.add_fox(fox) |
555 | 557 |
556 def fix_buildings(self): | 558 def fix_buildings(self): |