def pumpkin(): # init field field = field_plant_grid(get_world_size(), 0) init_plant(get_world_size(), Entities.Pumpkin) while sum_from_dict(field) < get_world_size()*get_world_size(): for cell in field: goto(cell) if get_entity_type() == Entities.Pumpkin: field[cell] = 1 for cell in field: if field[cell] == 0: goto(cell) better_plant(Entities.Pumpkin) harvest() while num_items(Items.Pumpkin) < 100000: pumpkin()