Exemplo n.º 1
0
            public Unsequence()
            {
                _previous_score = new RatingScope <T> .ScoredStudent(decimal.MaxValue, default(T));

                _previous_place = 0;
                _sequence       = 0;
            }
Exemplo n.º 2
0
            public int NextLevel(ScoredStudent score)
            {
                bool nextRequired = IsNextRequired(score);
                int  place;

                if (nextRequired)
                {
                    place = ++_previous_place;
                }
                else
                {
                    place = _previous_place;
                }

                _previous_score = score;
                return(place);
            }
Exemplo n.º 3
0
 private bool IsNextRequired(ScoredStudent score)
 {
     //小於 0 score < _previous_score
     return(score.CompareTo(_previous_score) < 0);
 }