nsnake
Classic snake game for the terminal
|
A single entry on the high-score file. More...
#include <ScoreFile.hpp>
Public Member Functions | |
ScoreEntry () | |
Creates an empty score entry. | |
bool | isLike (ScoreEntry &other) |
Tells if both scores were made on exact same game settings. | |
Public Attributes | |
unsigned int | points |
How many points the user got. | |
unsigned int | speed |
Under which game speed the score was made. | |
std::string | level |
On which level the user made this score. | |
int | fruits |
How many fruits at once were allowed on this level. | |
bool | random_walls |
If random walls were spawned on this level. | |
bool | teleport |
If teleport was enabled on this level. | |
Globals::Game::BoardSize | board_size |
How large was the game board on this score. | |
int | board_scroll_delay |
bool | board_scroll_left |
bool | board_scroll_right |
bool | board_scroll_up |
bool | board_scroll_down |
A single entry on the high-score file.
Definition at line 27 of file ScoreFile.hpp.
ScoreEntry::ScoreEntry | ( | ) |
Creates an empty score entry.
Since everything is public, access them without thinking twice.
Definition at line 15 of file ScoreFile.cpp.
bool ScoreEntry::isLike | ( | ScoreEntry & | other | ) |
Tells if both scores were made on exact same game settings.
Scores are incompatible if they doesn't have the same game settings. It's unfair for a score with less fruits to be compared with one where more fruits were enabled.
Definition at line 30 of file ScoreFile.cpp.
int ScoreEntry::board_scroll_delay |
Definition at line 54 of file ScoreFile.hpp.
bool ScoreEntry::board_scroll_down |
Definition at line 58 of file ScoreFile.hpp.
bool ScoreEntry::board_scroll_left |
Definition at line 55 of file ScoreFile.hpp.
bool ScoreEntry::board_scroll_right |
Definition at line 56 of file ScoreFile.hpp.
bool ScoreEntry::board_scroll_up |
Definition at line 57 of file ScoreFile.hpp.
Globals::Game::BoardSize ScoreEntry::board_size |
How large was the game board on this score.
Definition at line 52 of file ScoreFile.hpp.
int ScoreEntry::fruits |
How many fruits at once were allowed on this level.
Definition at line 40 of file ScoreFile.hpp.
std::string ScoreEntry::level |
On which level the user made this score.
It defaults to "", which is the Arcade Mode.
Definition at line 37 of file ScoreFile.hpp.
unsigned int ScoreEntry::points |
How many points the user got.
Definition at line 30 of file ScoreFile.hpp.
bool ScoreEntry::random_walls |
If random walls were spawned on this level.
Definition at line 43 of file ScoreFile.hpp.
unsigned int ScoreEntry::speed |
Under which game speed the score was made.
Definition at line 33 of file ScoreFile.hpp.
bool ScoreEntry::teleport |
If teleport was enabled on this level.
Definition at line 46 of file ScoreFile.hpp.