Example #1
0
        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);
        }
Example #2
0
 private void _btnAdd_Click(object sender, EventArgs e)
 {
     HighScore.AddHighScore(_txtName.Text, _score);
     this.Close();
 }
Example #3
0
        private void HighScores_Load(object sender, EventArgs e)
        {
            List <HighScore> scores = HighScore.GetAllHighScores();

            _dgvScores.DataSource = scores;
        }