(&self, ranger_id: UnitID, location: MapLocation)
| 1520 | // ************************************************************************ |
| 1521 | |
| 1522 | fn ok_if_can_begin_snipe(&self, ranger_id: UnitID, location: MapLocation) -> Result<(), GameError> { |
| 1523 | let ranger = self.my_unit(ranger_id)?; |
| 1524 | ranger.ok_if_on_map()?; |
| 1525 | ranger.ok_if_snipe_unlocked()?; |
| 1526 | let planet = self.planet(); |
| 1527 | if !self.starting_map(planet).on_map(location) { |
| 1528 | Err(GameError::LocationOffMap)? |
| 1529 | } |
| 1530 | Ok(()) |
| 1531 | } |
| 1532 | |
| 1533 | /// Whether the ranger can begin to snipe the given location, without |
| 1534 | /// taking into account the ranger's ability heat. Takes into account only |
no test coverage detected