多无人机迷宫跑酷

0 点赞
编程农场
转载

快速运行代码:使用多架无人机反复运行迷宫 代码 以下代码可使用多架无人机运行迷宫,数量上限为最大无人机数。代码快速但粗糙,并非最优。 directions = [北,东,南,西] index = 0 def resetMaze(): while(get_pos_x() != 0): move(西) while(get_pos_y() != 0): move(北) harvest() plant(Entities.Bush) substance = get_world_size() * 2**(num_unlocked(Unlocks.Mazes) - 1) use_item(Items.Weird_Substance, substance) def runMaze(index): while True: if(num_drones() < max_drones()): spawn_drone(spawnDrone) if(get_entity_type() == Entities.无法识别或无法翻译,已删除。