components.structure.behaviors.building package¶
Submodules¶
components.structure.behaviors.building.assign_robots_min_distance module¶
-
class
components.structure.behaviors.building.assign_robots_min_distance.Block(location, next_destination, final_destination, assigned=1, id=None)¶ Bases:
object
-
class
components.structure.behaviors.building.assign_robots_min_distance.Division(status, position, id)¶ Bases:
object
-
class
components.structure.behaviors.building.assign_robots_min_distance.Location(id, pos, status='UNCLAIMED')¶ Bases:
object-
update_status(status)¶
-
-
class
components.structure.behaviors.building.assign_robots_min_distance.Robot(id, pos, claimed_division=None)¶ Bases:
object-
find_new_target(points)¶
-
update_status(status)¶
-
-
components.structure.behaviors.building.assign_robots_min_distance.assign_robots_closest_point(robots, points, robot_communicator)¶
-
components.structure.behaviors.building.assign_robots_min_distance.distance(me, other)¶
-
components.structure.behaviors.building.assign_robots_min_distance.robots_distances_to_locations(robots, points)¶
components.structure.behaviors.building.merge_paths module¶
-
class
components.structure.behaviors.building.merge_paths.Node(wavefront_order, id, child=None, direction=None, pos=None, status='UNCLAIMED', num_blocks=9, path_to_node=None)¶ Bases:
object-
update_status(status)¶
-
-
components.structure.behaviors.building.merge_paths.merge_paths_test()¶
components.structure.behaviors.building.select_ferry_regions module¶
-
components.structure.behaviors.building.select_ferry_regions.determine_ferry_regions(level, num_rows, num_cols, direction=('FRONT', 'RIGHT'), ferry_region_size=3, block_placed=1)¶ Used to determine the locations in a 2d array where blocks can be placed to be ferried
Parameters: - level – 2d Numpy array denoting a level within the 3d structure
- num_rows – The height of the level
- num_cols – The width of the level
- direction – The direction to place blocks (Front, Back, Left, Right)
- ferry_region_size – Size of the area to mark for placing blocks to be ferried
- block_placed – Marker to look for in level that denotes a block exists at that location
Returns: 2d Numpy array same size as level with ‘X’ marking region to blocks can be placed (ferried)