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

Method ok_if_can_overcharge

battlecode-engine/src/world.rs:1701–1710  ·  view source on GitHub ↗
(&self, healer_id: UnitID, robot_id: UnitID)

Source from the content-addressed store, hash-verified

1699 }
1700
1701 fn ok_if_can_overcharge(&self, healer_id: UnitID, robot_id: UnitID)
1702 -> Result<(), GameError> {
1703 let healer = self.my_unit(healer_id)?;
1704 let robot = self.my_unit(robot_id)?;
1705 healer.ok_if_on_map()?;
1706 robot.ok_if_can_be_overcharged()?;
1707 healer.ok_if_overcharge_unlocked()?;
1708 healer.ok_if_within_ability_range(robot.location())?;
1709 Ok(())
1710 }
1711
1712 /// Whether the healer can overcharge the given robot, without taking into
1713 /// account the healer's ability heat. Takes into account only the healer's

Callers 2

can_overchargeMethod · 0.80
overchargeMethod · 0.80

Calls 6

my_unitMethod · 0.80
ok_if_on_mapMethod · 0.80
locationMethod · 0.80

Tested by

no test coverage detected