fixed statistics

This commit is contained in:
2025-12-07 17:30:18 +01:00
parent 24779755a5
commit 2b4b07ae6a
10 changed files with 424 additions and 125 deletions

View File

@ -81,6 +81,9 @@ public:
const std::vector<SDL_Point>& getHardDropCells() const { return hardDropCells; }
uint32_t getHardDropFxId() const { return hardDropFxId; }
uint64_t getCurrentPieceSequence() const { return pieceSequence; }
// Additional stats
int tetrisesMade() const { return _tetrisesMade; }
int maxCombo() const { return _maxCombo; }
private:
std::array<int, COLS*ROWS> board{}; // 0 empty else color index
@ -94,6 +97,9 @@ private:
int _score{0};
int _lines{0};
int _level{1};
int _tetrisesMade{0};
int _currentCombo{0};
int _maxCombo{0};
double gravityMs{800.0};
double fallAcc{0.0};
Uint64 _startTime{0}; // Performance counter at game start