Mercurial > rinkhals
changeset 403:c7cfa230f5d4
Remove board size restriction on number of foxes
author | Neil Muller <drnlmuller@gmail.com> |
---|---|
date | Thu, 19 Nov 2009 11:26:55 +0000 |
parents | 3a469d46b820 |
children | e5247ec76f24 |
files | gamelib/gameboard.py |
diffstat | 1 files changed, 2 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- a/gamelib/gameboard.py Thu Nov 19 11:23:06 2009 +0000 +++ b/gamelib/gameboard.py Thu Nov 19 11:26:55 2009 +0000 @@ -283,7 +283,7 @@ self.tv.tga_load_level(level.map) width, height = self.tv.size # Ensure we don't every try to create more foxes then is sane - self.max_foxes = min(2*height+2*width-15, level.max_foxes) + self.max_foxes = level.max_foxes self.create_display() self.selected_tool = None @@ -970,13 +970,7 @@ else: x = width y = random.randint(-1, height) - skip = False - for other_fox in self.foxes: - if other_fox.pos.x == x and other_fox.pos.y == y: - skip = True # Choose a new position - break - if not skip: - self.add_fox(self._choose_fox((x, y))) + self.add_fox(self._choose_fox((x, y))) def fix_buildings(self): """Go through the level map looking for buildings that haven't