Whether a location is on the map.
(&self, location: MapLocation)
| 326 | |
| 327 | /// Whether a location is on the map. |
| 328 | pub fn on_map(&self, location: MapLocation) -> bool { |
| 329 | self.planet == location.planet |
| 330 | && location.x >= 0 |
| 331 | && location.y >= 0 |
| 332 | && location.x < self.width as i32 |
| 333 | && location.y < self.height as i32 |
| 334 | } |
| 335 | |
| 336 | /// Whether the location on the map contains passable terrain. Is only |
| 337 | /// false when the square contains impassable terrain (distinct from |
no outgoing calls
no test coverage detected