Ok if the unit is ready to move. The movement heat must be lower than the maximum heat to attack. InappropriateUnitType - the unit is not a robot. Overheated - the unit is not ready to move.
(&self)
| 487 | /// * InappropriateUnitType - the unit is not a robot. |
| 488 | /// * Overheated - the unit is not ready to move. |
| 489 | pub(crate) fn ok_if_move_ready(&self) -> Result<(), GameError> { |
| 490 | if self.movement_heat()? >= MAX_HEAT_TO_ACT { |
| 491 | Err(GameError::Overheated)?; |
| 492 | } |
| 493 | Ok(()) |
| 494 | } |
| 495 | |
| 496 | /// Updates the unit's location as it if has moved, and increases the |
| 497 | /// movement heat. |
nothing calls this directly
no test coverage detected