From a1b39f2484f72c6142e5a109be614f8b068e1213 Mon Sep 17 00:00:00 2001 From: Bnenne Date: Tue, 3 Jun 2025 22:31:20 -0500 Subject: [PATCH] togglable initial FoodObject spawn --- main.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/main.py b/main.py index b35e17d..8c957e6 100644 --- a/main.py +++ b/main.py @@ -26,7 +26,7 @@ GRID_HEIGHT = 15 # Number of cells vertically CELL_SIZE = 20 # Size of each cell in pixels DEFAULT_TPS = 20 # Number of ticks per second for the simulation -FOOD_SPAWNING = True +FOOD_SPAWNING = False def draw_grid(screen, camera, showing_grid=True): @@ -150,7 +150,8 @@ def main(): # sets seed to 67 >_< random.seed(67) - world.add_object(FoodObject(Position(x=random.randint(-100, 100), y=random.randint(-100, 100)))) + if FOOD_SPAWNING: + world.add_object(FoodObject(Position(x=random.randint(-100, 100), y=random.randint(-100, 100)))) running = True while running: