Пример #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;
        }