You have to solve current level before advance
[vexed] / settings.h
1 #ifndef SETTINGS_H
2 #define SETTINGS_H
3 #include <QSettings>
4
5 namespace HS
6 {
7     const int NO_SCORE=9999;
8 }
9 class Settings : QSettings
10 {
11 public:
12     Settings();
13     void saveHiscore(const QString &packName, const QString &levelName, int score);
14     int getHighscore(const QString &packName, const QString &levelName);
15     void saveGame(const QString &packName, int levelNo);
16     QString savedPackName();
17     int savedLevelNo();
18 private:
19     int hiscore(const QString &packName, const QString &levelName,int score=-1);
20 };
21
22 #endif // SETTINGS_H