Syntax change for the failsafe
This commit is contained in:
		@@ -66,7 +66,6 @@ class Generator:
 | 
			
		||||
            # next iteration of the main loop
 | 
			
		||||
            next_walker_pop = []
 | 
			
		||||
 | 
			
		||||
            failsafe = choice(walkers)
 | 
			
		||||
            for walker in walkers:
 | 
			
		||||
                if grid[walker.y][walker.x] == Tile.EMPTY:
 | 
			
		||||
                    count += 1
 | 
			
		||||
@@ -79,7 +78,7 @@ class Generator:
 | 
			
		||||
 | 
			
		||||
            # we make sure to never kill all walkers
 | 
			
		||||
            if next_walker_pop == []:
 | 
			
		||||
                next_walker_pop.append(failsafe)
 | 
			
		||||
                next_walker_pop.append(choice(walkers))
 | 
			
		||||
 | 
			
		||||
            # we use a second loop for spliting so we're not bothered by cases 
 | 
			
		||||
            # like a walker not spliting because we hit the population cap even
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user