MCPcopy Create free account
hub / github.com/battlecode/battlecode-2018 / can_load

Method can_load

battlecode-engine/src/world.rs:1773–1775  ·  view source on GitHub ↗

Whether the robot can be loaded into the given structure's garrison. The robot must be ready to move and must be adjacent to the structure. The structure and the robot must be on the same team, and the structure must have space.

(&self, structure_id: UnitID, robot_id: UnitID)

Source from the content-addressed store, hash-verified

1771 /// must be ready to move and must be adjacent to the structure. The structure
1772 /// and the robot must be on the same team, and the structure must have space.
1773 pub fn can_load(&self, structure_id: UnitID, robot_id: UnitID) -> bool {
1774 self.ok_if_can_load(structure_id, robot_id).is_ok()
1775 }
1776
1777 /// Loads the robot into the garrison of the structure.
1778 ///

Callers

nothing calls this directly

Calls 1

ok_if_can_loadMethod · 0.45

Tested by

no test coverage detected