#include <deque>
#include <string>
#include "mymath.h"

#ifndef HISCORE_H_INCLUDED
#define HISCORE_H_INCLUDED


class HSTime {
  public:
    std::string name;
    float v;
    HSTime(std::string n, float t){name=n;v=t;}
};

class HSScore {
  public:
    std::string name;
    int v;
    HSScore(std::string n, int t){name=n;v=t;}
};


class HiscoreTable {
  public:
    HashString times;
    HashString scores;
    void Reset();
    bool AddTime(std::string nm, HSTime v);
    bool AddScore(std::string nm, HSScore v);
    void Print();

    HashString *GetTimes() {return &times;}
    HashString *GetScores() {return &scores;}

    float GetBestTime(std::string nm);
    float GetBestScore(std::string nm);

    void Save();
    void Load();
};



extern HiscoreTable hiscore_table;


#endif
