* Try to save the game. * @todo This is a no-op if the Micropolis::cityFileName is empty. * In that case, we should probably warn the user about the failure. */
| 562 | * In that case, we should probably warn the user about the failure. |
| 563 | */ |
| 564 | void Micropolis::saveCity() |
| 565 | { |
| 566 | if (cityFileName.length() > 0) { |
| 567 | |
| 568 | doSaveCityAs(); |
| 569 | |
| 570 | } else { |
| 571 | if (saveFile(cityFileName.c_str())) { |
| 572 | |
| 573 | didSaveCity(); |
| 574 | |
| 575 | } else { |
| 576 | |
| 577 | didntSaveCity(cityFileName.c_str()); |
| 578 | |
| 579 | } |
| 580 | } |
| 581 | } |
| 582 | |
| 583 | |
| 584 | /** Report to the frontend that the city is being saved. */ |
nothing calls this directly
no outgoing calls
no test coverage detected