1 #ifndef SCORE_H_DEFINED
2 #define SCORE_H_DEFINED
4 #include <Config/Globals.hpp>
54 int board_scroll_delay;
55 bool board_scroll_left;
56 bool board_scroll_right;
58 bool board_scroll_down;
153 std::string level_name;
156 std::vector<ScoreEntry> entries;
159 #endif //SCORE_H_DEFINED
ScoreEntry * highScore
Maximum high score obtained for the current game.
Stores points the player made on the game.
static std::string extension
Default extension to save the score files.
int fruits
How many fruits at once were allowed on this level.
std::string level
On which level the user made this score.
Custom exception class to specify an error that occurred during a level loading.
ScoreEntry()
Creates an empty score entry.
bool random_walls
If random walls were spawned on this level.
Globals::Game::BoardSize board_size
How large was the game board on this score.
void save()
Saves all the current scores on the file.
bool teleport
If teleport was enabled on this level.
static std::string directory
Default directory where we store the game score files.
void load()
Loads all high score entries based on a level name.
A single entry on the high-score file.
static void eraseAll()
Erases all high score files.
bool handle(ScoreEntry *score)
Checks if #score is the highest score and make it so.
bool isLike(ScoreEntry &other)
Tells if both scores were made on exact same game settings.
unsigned int points
How many points the user got.
unsigned int speed
Under which game speed the score was made.
ScoreFile(std::string levelName)
Creates a new score handler for the level #levelName.