feat(*): Enable multiple drones for carrots

This commit is contained in:
Josh Creek
2025-12-23 19:14:01 +00:00
parent 24d8a93d3b
commit 189185a97b
2 changed files with 25 additions and 2 deletions
+24 -1
View File
@@ -18,4 +18,27 @@ def harvest_carrots():
for y in range(get_world_size()):
till_and_plant()
move(North)
move(East)
move(East)
def harvest_carrot_columns():
columns_per_drone = get_world_size() / max_drones()
for x in range(columns_per_drone):
for y in range(get_world_size()):
till_and_plant()
move(North)
move(East)
def spawn_drones():
world_size = get_world_size()
columns_per_drone = world_size / max_drones()
i = 0
while i < world_size:
helpers.move_to_coords(i,0)
spawn_drone(harvest_carrot_columns)
i += columns_per_drone
def harvest_carrots_with_multiple_drones():
spawn_drones()
harvest_carrot_columns()