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

            _dgvScores.DataSource = scores;
        }