private void SetHighscoreInGUI() { uint?highscoreOfTrack = Highscores.GetHighscore(mActiveTrack.GetTrackId()); if (highscoreOfTrack.HasValue) { xHighscore.Text = highscoreOfTrack.Value.ToString(); } else { xHighscore.Text = "First Play"; } }
private void HandleNrOfVectors4FinishedRace(uint nrOfVectors) { uint?highscoreOfTrack = Highscores.GetHighscore(mActiveTrack.GetTrackId()); if (highscoreOfTrack.HasValue) { if (nrOfVectors < highscoreOfTrack.Value) { // new highscore HandleNewHighscore(nrOfVectors); } } else { // First playthrough -> new highscore HandleNewHighscore(nrOfVectors); } }