better managed ownership (two new functions in level.h)

This commit is contained in:
2024-07-16 23:36:31 -04:00
parent 3b164bbe9f
commit 3232d91ac1
14 changed files with 74 additions and 50 deletions

View File

@ -18,8 +18,10 @@ game_status CC3K::run() {
case main_menu: {
auto tmp = curr_menu->run(in);
if (tmp == -2)
if (tmp == -2) {
gresult.status = terminated;
return terminated;
}
if (tmp != -1) {
curr_menu = nullptr;
@ -55,6 +57,8 @@ game_status CC3K::run() {
curr_game->print();
out->render();
return in_game;
} else if (gresult.status == terminated) {
return terminated;
}
out->clear();