added ZEN gamemode

This commit is contained in:
2025-03-27 21:50:36 +01:00
parent 88cb44c5fe
commit 3d74ef7cd5
5 changed files with 19 additions and 10 deletions

View File

@@ -22,6 +22,8 @@ void GameParameters::reset() {
case MARATHON : {this->level = 1; break;}
// goes from level 20 to 39
case MASTER : {this->level = 20; break;}
// no gravity
case ZEN : {this->level = 0; break;}
default : this->level = 1;
}
@@ -58,6 +60,8 @@ bool GameParameters::hasWon(int framesPassed) const {
case MARATHON : return this->clearedLines >= 200;
// win once 200 lines have been cleared
case MASTER : return this->clearedLines >= 200;
// infinite mode
case ZEN :
default : return false;
}
}
@@ -65,13 +69,14 @@ bool GameParameters::hasWon(int framesPassed) const {
void GameParameters::updateStats() {
/* NEXT QUEUE */
switch (this->gamemode) {
// 5 for rapidity gamemodes
// 5 for fast-controls gamemodes
case SPRINT :
case ULTRA : {
case ULTRA :
case ZEN : {
this->nextQueueLength = 5;
break;
}
// 3 for endurance gamemodes
// 3 for slow-controls gamemodes
case MARATHON :
case MASTER : {
this->nextQueueLength = 3;
@@ -126,6 +131,8 @@ void GameParameters::updateStats() {
switch (this->gamemode) {
// starts at 500ms (30f) at lvl 20 and ends at 183ms (11f) at lvl 39
case MASTER : {this->lockDelay = 30 - (this->level - 20); break;}
// 10s
case ZEN : {this->lockDelay = 60 * 10; break;}
// 1s by default
default : this->lockDelay = 60;
}

View File

@@ -8,5 +8,6 @@ enum Gamemode {
SPRINT,
MARATHON,
ULTRA,
MASTER
MASTER,
ZEN
};