Fixes some debug code.

This commit is contained in:
William Hubbard
2023-02-05 14:04:42 -07:00
parent 518bf5f5e6
commit 05dd0a1cfd

View File

@@ -124,7 +124,7 @@ def update_entities(entities, difficulty: int, current_depth: int, prev_depth: i
spawned = set()
max_spawned = randrange(0, difficulty + 1)
while len(entities) < max_spawned and random() < (2 * math.pow(difficulty + 0.01, 2)) / (3 * math.pow(difficulty + 0.01, 2) + 20 * (difficulty + 0.01)) + 0.05:
while len(spawned) < max_spawned and random() < (2 * math.pow(difficulty + 0.01, 2)) / (3 * math.pow(difficulty + 0.01, 2) + 20 * (difficulty + 0.01)) + 0.05:
sprite_image = OBSTACLES[randrange(0, min((difficulty + 1) * 3, len(OBSTACLES)))]
if sprite_image.width >= thumby.display.width:
x = 0