# Gets the farm size in the format (0,0) def get_worldsize(): worldlength = get_world_size() worldsize = worldlength , worldlength return worldsize # Gets current position in the format (0,0) def get_position(): currentposition = get_pos_x(),get_pos_y() return currentposition # Reset position of drone to (0,0) def reset_position(): for r in range(get_pos_x()): move(West) for r in range(get_pos_y()): move(South) # Wood column def bush_column(wdir): for w in range(get_world_size()-1): if can_harvest(): harvest() plant(Entities.Bush) move(wdir) else: plant(Entities.Bush) move(wdir) if can_harvest(): harvest() plant(Entities.Bush) move(East) # Hay column def hay_column(hdir): for i in range(get_world_size()-1): harvest() move(hdir) harvest() move(East) # Carrot column def carrot_column(cdir): for c in range(get_world_size()): if num_items(Items.Carrot_Seed) <= 0: trade(Items.Carrot_Seed) if get_ground_type() != Grounds.Soil: till() plant(Entities.Carrots) if get_pos_x() % get_world_size() == get_pos_x(): if c == get_world_size() - 1: move(East) else: move(cdir) elif get_ground_type() == Grounds.Soil: if can_harvest(): harvest() plant(Entities.Carrots) if get_pos_x() % get_world_size() == get_pos_x(): if c == get_world_size() - 1: move(East) else: move(cdir) else: plant(Entities.Carrots) if get_pos_x() % get_world_size() == get_pos_x(): if c == get_world_size() - 1: move(East) else: move(cdir)