Add iterations and max fitness counters.

This commit is contained in:
Emil Shanaty
2025-04-14 20:13:47 +03:00
parent a7100082c7
commit 136f888631
2 changed files with 23 additions and 4 deletions
+3 -1
View File
@@ -3,6 +3,7 @@ import random
WIDTH, HEIGHT = 800, 600
HUD_HEIGHT = 150
BARRIER_SEED = 20
class GameObject:
x = 0
y = 0
@@ -186,6 +187,7 @@ class Spawner:
self.tick_counter = 0 # Reset tick counter
def spawn(self):
random_y = random.randint(0, HEIGHT - 100) # Random Y position for the barrier
random_y = random.randint(0, HEIGHT - 100, ) # Random Y position for the barrier
new_barrier = Barrier(self.barrier_image_path, WIDTH, random_y) # Create a new barrier
return new_barrier