Update random seed initialization in world setup for consistent food spawning
Some checks failed
Build Simulation and Test / Run All Tests (push) Failing after 28s
Some checks failed
Build Simulation and Test / Run All Tests (push) Failing after 28s
This commit is contained in:
parent
7dde7b3e1f
commit
14dfc7bfb8
@ -33,9 +33,10 @@ class SimulationEngine:
|
|||||||
|
|
||||||
self.running = True
|
self.running = True
|
||||||
|
|
||||||
|
@staticmethod
|
||||||
def _setup_world(self):
|
def _setup_world(self):
|
||||||
world = World(CELL_SIZE, (CELL_SIZE * GRID_WIDTH, CELL_SIZE * GRID_HEIGHT))
|
world = World(CELL_SIZE, (CELL_SIZE * GRID_WIDTH, CELL_SIZE * GRID_HEIGHT))
|
||||||
random.seed(0)
|
random.seed(RANDOM_SEED)
|
||||||
|
|
||||||
if FOOD_SPAWNING:
|
if FOOD_SPAWNING:
|
||||||
world.add_object(FoodObject(Position(x=random.randint(-100, 100), y=random.randint(-100, 100))))
|
world.add_object(FoodObject(Position(x=random.randint(-100, 100), y=random.randint(-100, 100))))
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user