blob: 06361831eee0839293681a1d4c4a2a1a5cfa9e2a (
plain) (
blame)
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
|
#ifndef HSLIST_H
#define HSLIST_H
#include <SDL.h>
#include <memory>
#include <vector>
#include "highscore.h"
#include "sdl.h"
#include "state.h"
class HighscoreList {
public:
static std::unique_ptr<HighscoreList> GetLocalHighscores();
static std::unique_ptr<HighscoreList> GetGlobalHighscores();
surface_ptr render();
const std::vector<Highscore>& getList() const { return hslist_; }
int addHighscore(Highscore h);
void writeToFile();
private:
explicit HighscoreList(std::vector<Highscore> hslist);
void resetRanks();
std::vector<Highscore> hslist_;
};
#endif
|