forked from rtpHarry/Sokoban
-
Notifications
You must be signed in to change notification settings - Fork 0
/
SokobanHighscore.h
41 lines (31 loc) · 953 Bytes
/
SokobanHighscore.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#pragma once
#include <string>
#include <vector>
#include <utility> // for pair
#include <fstream>
using namespace std;
typedef pair<string, int> HighscorePair;
class SokobanHighscore
{
public:
SokobanHighscore(void);
~SokobanHighscore(void);
// Add a new high score into the list (returns true if highscore achieved)
bool AddHighscore(string FileName, int NumberOfMoves);
// Get the high score for the current level
int GetCurrentHighscore(string FileName);
// Load a high score file into memory
void LoadFromFile(string FileName);
// Load the default level file into memory
void LoadDefaultFile(void);
// Save the current highscore information to a file
void SaveToFile(string FileName);
// Save the current highscore information to the default highscore file
void SaveToDefaultFile(void);
private:
// The list of high scores
vector<HighscorePair> _HighScores;
public:
// DEBUG function
void DEBUG_DumpScoreList(void);
};