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

Method is_passable_terrain_at

battlecode-engine/src/map/mod.rs:341–347  ·  view source on GitHub ↗

Whether the location on the map contains passable terrain. Is only false when the square contains impassable terrain (distinct from containing a building, for instance). LocationOffMap - the location is off the map.

(&self, location: MapLocation)

Source from the content-addressed store, hash-verified

339 ///
340 /// * LocationOffMap - the location is off the map.
341 pub fn is_passable_terrain_at(&self, location: MapLocation) -> Result<bool, GameError> {
342 if self.on_map(location) {
343 Ok(self.is_passable_terrain[location.y as usize][location.x as usize])
344 } else {
345 Err(GameError::LocationOffMap)?
346 }
347 }
348
349 /// The amount of Karbonite initially deposited at the given location.
350 ///

Callers 3

astgen.pyFile · 0.80
is_occupiableMethod · 0.80

Calls 1

on_mapMethod · 0.80

Tested by

no test coverage detected