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

Method ok_if_blink_unlocked

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

Ok if the unit can blink. InappropriateUnitType - the unit is not a mage. ResearchNotUnlocked - the required technology is not unlocked.

(&self)

Source from the content-addressed store, hash-verified

845 /// * InappropriateUnitType - the unit is not a mage.
846 /// * ResearchNotUnlocked - the required technology is not unlocked.
847 pub(crate) fn ok_if_blink_unlocked(&self) -> Result<(), GameError> {
848 self.ok_if_unit_type(Mage)?;
849 Ok(self.ok_if_ability_unlocked()?)
850 }
851
852 /// Updates the unit as if it has blinked.
853 pub(crate) fn blink(&mut self, location: MapLocation) {

Callers 2

ok_if_can_blinkMethod · 0.80
ok_if_blink_readyMethod · 0.80

Calls 2

ok_if_unit_typeMethod · 0.80

Tested by

no test coverage detected