B1KMusic

[Highscore test] highscoretable.h

Jan 25th, 2016
201
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.44 KB | None | 0 0
  1. struct HighscoreEntry;
  2. class HighscoreTable;
  3.  
  4. class HighscoreTable {
  5.     public:
  6.     HighscoreEntry *scores[5];
  7.  
  8.     HighscoreTable();
  9.     ~HighscoreTable();
  10.  
  11.     void report();
  12.     void reportRow(int rank);
  13.     const char *getRankStr(int rank);
  14.     void insert(int score, const char *name);
  15.     int getLowest();
  16.     void sort();
  17.     void swap(int a, int b);
  18. };
  19.  
  20. struct HighscoreEntry {
  21.     int score;
  22.     char name[4];
  23. };
Add Comment
Please, Sign In to add comment