* Changes the current altitude of the UFO. * @param altitude Altitude. */
| 362 | * @param altitude Altitude. |
| 363 | */ |
| 364 | void Ufo::setAltitude(const std::string &altitude) |
| 365 | { |
| 366 | _altitude = altitude; |
| 367 | if (_altitude != "STR_GROUND") |
| 368 | { |
| 369 | _status = FLYING; |
| 370 | } |
| 371 | else |
| 372 | { |
| 373 | _status = isCrashed() ? CRASHED : LANDED; |
| 374 | } |
| 375 | } |
| 376 | |
| 377 | /** |
| 378 | * Returns if this UFO took enough damage |
no outgoing calls
no test coverage detected