* Fuel of a tile is the lowest flammability of its objects. * @return how long to burn. */
| 534 | * @return how long to burn. |
| 535 | */ |
| 536 | int Tile::getFuel() const |
| 537 | { |
| 538 | int fuel = 0; |
| 539 | |
| 540 | if (_objects[3]) |
| 541 | { |
| 542 | fuel = _objects[3]->getFuel(); |
| 543 | } |
| 544 | else if (_objects[0]) |
| 545 | { |
| 546 | fuel = _objects[0]->getFuel(); |
| 547 | } |
| 548 | |
| 549 | return fuel; |
| 550 | } |
| 551 | /* |
| 552 | * Ignite starts fire on a tile, it will burn <fuel> rounds. Fuel of a tile is the highest fuel of its objects. |
| 553 | * NOT the sum of the fuel of the objects! |
no outgoing calls
no test coverage detected