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