예제 #1
0
 public void SaveHighscoreList(string name, int score)
 {
     HighscoreList list = new HighscoreList();
     list.LoadHighscores();
     var ordered = list.GetEntries().OrderBy(x => x.Score);
     foreach (Entry item in list.GetEntries())
     {
         if (item.Score < score)
         {
             item.Name = name;
             item.Score = score;
             break;
         }
     }
     list.SaveHighscores();
 }
예제 #2
0
 public HighscoreList LoadHighscoreList()
 {
     HighscoreList list = new HighscoreList();
     list.LoadHighscores();
     return list;
 }
예제 #3
0
 public bool IsNewRecord(int score)
 {
     HighscoreList list = new HighscoreList();
     list.LoadHighscores();
     return list.GetEntries().Min(x => x.Score) < score;
 }