1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2025-12-17 11:38:05 +00:00
This commit is contained in:
Zeno Rogue
2017-07-25 00:21:36 +02:00
parent fdc1ac1e6e
commit cc03560389
18 changed files with 149 additions and 61 deletions

View File

@@ -984,17 +984,27 @@ namespace gamestack {
};
void popGame() {
if(gamestack::pushed()) {
gamestack::pop();
}
}
void popAllGames() {
while(gamestack::pushed()) {
gamestack::pop();
}
}
void restartGame(char switchWhat, bool push) {
popScreenAll();
DEBB(DF_INIT, (debugfile,"restartGame\n"));
if(push)
gamestack::push();
else if(gamestack::pushed()) {
gamestack::pop();
return;
}
else {
popAllGames();
achievement_final(true);
#if CAP_SAVE
saveStats();