Number of generated bananas

This commit is contained in:
Mateusz Dokowicz 2023-05-25 16:49:24 +02:00
parent c6538f420f
commit 44bdfa8ae1
2 changed files with 2 additions and 1 deletions

View File

@ -1,4 +1,5 @@
[APP]
cat = False
movement = robot
NumberOfBananas = 20
#accept: human, robot

View File

@ -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))