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

Method can_begin_snipe

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

Whether the ranger can begin to snipe the given location, without taking into account the ranger's ability heat. Takes into account only the target location and the unit's type and unlocked abilities.

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

Source from the content-addressed store, hash-verified

1534 /// taking into account the ranger's ability heat. Takes into account only
1535 /// the target location and the unit's type and unlocked abilities.
1536 pub fn can_begin_snipe(&self, ranger_id: UnitID, location: MapLocation) -> bool {
1537 self.ok_if_can_begin_snipe(ranger_id, location).is_ok()
1538 }
1539
1540 fn ok_if_begin_snipe_ready(&self, ranger_id: UnitID) -> Result<(), GameError> {
1541 let ranger = self.my_unit(ranger_id)?;

Callers

nothing calls this directly

Calls 1

ok_if_can_begin_snipeMethod · 0.80

Tested by

no test coverage detected