public static bool IsTopTen(int score) { List <HighScore> scores = HighScore.GetAllHighScores(); if (scores.Count < TOP_SCORES_THAT_MATTER) { return(true); } for (int i = 0; i < TOP_SCORES_THAT_MATTER; i++) { HighScore s = scores[i]; if (score > s.Score) { return(true); } } return(false); }
private void _btnAdd_Click(object sender, EventArgs e) { HighScore.AddHighScore(_txtName.Text, _score); this.Close(); }
private void HighScores_Load(object sender, EventArgs e) { List <HighScore> scores = HighScore.GetAllHighScores(); _dgvScores.DataSource = scores; }