#pragma once #include #include class ScoreManager { public: ScoreManager(const std::string& filename); void incrementScore(); void resetScore(); void saveHighScore(int finalScore, double finalTime); int getCurrentScore() const { return currentScore; } int getHighScore() const { return highScore; } double getBestTime() const { return bestTime; } private: int currentScore = 0; int highScore = std::numeric_limits::max(); double bestTime = std::numeric_limits::max(); std::string highscoreFile; void loadHighscore(); };