stats in-game

This commit is contained in:
2025-03-28 21:00:46 +01:00
parent be071bd606
commit 0f026635f6
11 changed files with 164 additions and 39 deletions

View File

@@ -2,6 +2,7 @@
#include "Gamemode.h"
#include "Player.h"
#include "LineClear.h"
/**
@@ -14,6 +15,7 @@ class GameParameters {
Player controls; // the player's controls
int clearedLines; // the number of cleared lines
int level; // the current level
int grade; // the current amount of points
int nextQueueLength; // the number of pieces visibles in the next queue
bool boneBlocks; // wheter all blocks are bone blocks
int gravity; // the gravity at which pieces drop
@@ -39,7 +41,7 @@ class GameParameters {
/**
* Counts the newly cleared lines and update level and stats if needed
*/
void clearLines(int lineNumber);
void lockedPiece(const LineClear& lineClear);
/**
* Checks if the game ended based on the current states and time passed, accorind to the gamemode
@@ -63,6 +65,11 @@ class GameParameters {
* @return The current level
*/
int getLevel() const;
/**
* @return The current grade
*/
int getGrade() const;
/**
* @return The length of the next queue