def polyculture(): field = field_plant_grid(get_world_size(), Entities.Grass) for cell in field: goto(cell) if get_companion() != None: c, x, y = get_companion() field[(x,y)] = c p = field[(get_pos_x(), get_pos_y())] better_plant(p) if can_harvest(): harvest() init_plant(get_world_size(), Entities.Grass) while num_items(Items.Carrot) < 30000: polyculture()