MCPcopy Index your code
hub / github.com/battlecode/battlecode-2018 / ok_if_move_ready

Method ok_if_move_ready

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

NoSuchUnit - the unit does not exist (inside the vision range). TeamNotAllowed - the unit is not on the current player's team. Overheated - the robot is not ready to move again.

(&self, robot_id: UnitID)

Source from the content-addressed store, hash-verified

1015 /// * TeamNotAllowed - the unit is not on the current player's team.
1016 /// * Overheated - the robot is not ready to move again.
1017 fn ok_if_move_ready(&self, robot_id: UnitID) -> Result<(), GameError> {
1018 self.my_unit(robot_id)?.ok_if_move_ready()?;
1019 Ok(())
1020 }
1021
1022 /// Whether the robot is ready to move. Tests whether the robot's attack
1023 /// heat is sufficiently low.

Callers 4

is_move_readyMethod · 0.45
move_robotMethod · 0.45
ok_if_can_loadMethod · 0.45
ok_if_can_unloadMethod · 0.45

Calls 1

my_unitMethod · 0.80

Tested by

no test coverage detected