// Scores.h - High score persistence manager #pragma once #include #include struct ScoreEntry { int score{}; int lines{}; int level{}; double timeSec{}; std::string name{"PLAYER"}; std::string gameType{"classic"}; }; class ScoreManager { public: explicit ScoreManager(size_t maxScores = 12); void load(); void save() const; // New optional `gameType` parameter will be sent to Firebase as `game_type`. // Allowed values: "classic", "versus", "cooperate", "challenge". void submit(int score, int lines, int level, double timeSec, const std::string& name = "PLAYER", const std::string& gameType = "classic"); bool isHighScore(int score) const; const std::vector& all() const { return scores; } private: std::vector scores; size_t maxEntries; std::string filePath() const; // resolve path (SDL pref path or local) void createSampleScores(); // create sample high scores };