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

Method can_sense_unit

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

Whether there is a unit with this ID within the vision range.

(&self, id: UnitID)

Source from the content-addressed store, hash-verified

580
581 /// Whether there is a unit with this ID within the vision range.
582 pub fn can_sense_unit(&self, id: UnitID) -> bool {
583 self.unit(id).is_ok()
584 }
585
586 /// Sense units near the location within the given radius, inclusive, in
587 /// distance squared. The units are within the vision range.

Callers

nothing calls this directly

Calls 1

unitMethod · 0.45

Tested by

no test coverage detected