* Changes the amount of fuel currently contained * in this craft. * @param fuel Amount of fuel. */
| 499 | * @param fuel Amount of fuel. |
| 500 | */ |
| 501 | void Craft::setFuel(int fuel) |
| 502 | { |
| 503 | _fuel = fuel; |
| 504 | if (_fuel > _rules->getMaxFuel()) |
| 505 | { |
| 506 | _fuel = _rules->getMaxFuel(); |
| 507 | } |
| 508 | else if (_fuel < 0) |
| 509 | { |
| 510 | _fuel = 0; |
| 511 | } |
| 512 | } |
| 513 | |
| 514 | /** |
| 515 | * Returns the ratio between the amount of fuel currently |
nothing calls this directly
no test coverage detected