feat(*): Enable multiple drones for cacti

This commit is contained in:
Josh Creek
2025-12-23 21:57:32 +00:00
parent 93c6f178eb
commit 01625dfaca
2 changed files with 88 additions and 45 deletions
+2 -8
View File
@@ -7,7 +7,6 @@ import cacti
import mazes
sunflowers_array = {} # sunflowers_array[(x, y)] = petals
cactus_array = {} # cactus_array[(x, y)] = size
num_loops = 10
@@ -22,11 +21,6 @@ def harvest_sunflowers_wrapper():
# which are needed as we're passing an argument into the function
sunflowers.harvest_sunflowers(sunflowers_array)
def harvest_cacti_wrapper():
# this wrapper function is needed as the game doesn't support llambdas,
# which are needed as we're passing an argument into the function
cacti.harvest_cacti(cactus_array)
clear()
while True:
@@ -36,5 +30,5 @@ while True:
run_loop(num_loops, 'pumpkins', pumpkins.harvest_pumpkins_with_multiple_drones)
sunflowers.initial_planting_performed = False
run_loop(num_loops * 50, 'sunflowers', harvest_sunflowers_wrapper)
run_loop(1, 'cacti', harvest_cacti_wrapper)
run_loop(1, "maze", mazes.navigate_maze)
run_loop(1, 'cacti', cacti.spawn_drones)
run_loop(10, "maze", mazes.navigate_maze)