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

Method ability_range

battlecode-engine/src/unit.rs:594–597  ·  view source on GitHub ↗

The active ability range. This is the range in which: workers can replicate, knights can javelin, rangers can snipe, mages can blink, and healers can overcharge. InappropriateUnitType - the unit is not a robot.

(&self)

Source from the content-addressed store, hash-verified

592 ///
593 /// * InappropriateUnitType - the unit is not a robot.
594 pub fn ability_range(&self) -> Result<u32, GameError> {
595 self.ok_if_robot()?;
596 Ok(self.ability_range)
597 }
598
599 /// Ok if unit has unlocked its ability.
600 ///

Callers 1

Calls 1

ok_if_robotMethod · 0.80

Tested by

no test coverage detected