From 14dfc7bfb800e9a8c9e2a174a3a6731c30aaf352 Mon Sep 17 00:00:00 2001 From: Sam Date: Mon, 16 Jun 2025 15:46:04 -0500 Subject: [PATCH] Update random seed initialization in world setup for consistent food spawning --- core/simulation_engine.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core/simulation_engine.py b/core/simulation_engine.py index 0ac08ef..1f5abb2 100644 --- a/core/simulation_engine.py +++ b/core/simulation_engine.py @@ -33,9 +33,10 @@ class SimulationEngine: self.running = True + @staticmethod def _setup_world(self): world = World(CELL_SIZE, (CELL_SIZE * GRID_WIDTH, CELL_SIZE * GRID_HEIGHT)) - random.seed(0) + random.seed(RANDOM_SEED) if FOOD_SPAWNING: world.add_object(FoodObject(Position(x=random.randint(-100, 100), y=random.randint(-100, 100))))