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

Method can_blink

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

Whether the mage can blink to the given location, without taking into account the mage's ability heat. Takes into account only the mage's ability range, the map terrain, positions of other units, and the edge of the game map.

(&self, mage_id: UnitID, location: MapLocation)

Source from the content-addressed store, hash-verified

1611 /// ability range, the map terrain, positions of other units, and the edge
1612 /// of the game map.
1613 pub fn can_blink(&self, mage_id: UnitID, location: MapLocation) -> bool {
1614 self.ok_if_can_blink(mage_id, location).is_ok()
1615 }
1616
1617 fn ok_if_blink_ready(&self, mage_id: UnitID) -> Result<(), GameError> {
1618 let mage = self.my_unit(mage_id)?;

Callers

nothing calls this directly

Calls 1

ok_if_can_blinkMethod · 0.80

Tested by

no test coverage detected