Ok if the unit is on the map. UnitNotOnMap - the unit is not on the map.
(&self)
| 475 | /// |
| 476 | /// * UnitNotOnMap - the unit is not on the map. |
| 477 | pub(crate) fn ok_if_on_map(&self) -> Result<(), GameError> { |
| 478 | if !self.location().is_on_map() { |
| 479 | Err(GameError::UnitNotOnMap)?; |
| 480 | } |
| 481 | Ok(()) |
| 482 | } |
| 483 | |
| 484 | /// Ok if the unit is ready to move. The movement heat must be |
| 485 | /// lower than the maximum heat to attack. |
no test coverage detected