From 44bdfa8ae1ffa1454b962e3460f9cb885075e630 Mon Sep 17 00:00:00 2001 From: Mateusz Dokowicz Date: Thu, 25 May 2023 16:49:24 +0200 Subject: [PATCH] Number of generated bananas --- config.ini | 1 + main.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/config.ini b/config.ini index 87d6bac..3a3ee83 100644 --- a/config.ini +++ b/config.ini @@ -1,4 +1,5 @@ [APP] cat = False movement = robot +NumberOfBananas = 20 #accept: human, robot \ No newline at end of file diff --git a/main.py b/main.py index 9a27f03..8f30414 100644 --- a/main.py +++ b/main.py @@ -145,7 +145,7 @@ class Main: def generate_world(tiles_x: int, tiles_y: int) -> World: world = World(tiles_x, tiles_y) - for _ in range(35): + for _ in range(config.getint("APP", "NumberOfBananas")): temp_x = randint(0, tiles_x - 1) temp_y = randint(0, tiles_y - 1) world.add_entity(Garbage(temp_x, temp_y))