public Unsequence() { _previous_score = new RatingScope <T> .ScoredStudent(decimal.MaxValue, default(T)); _previous_place = 0; _sequence = 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); }
private bool IsNextRequired(ScoredStudent score) { //小於 0 score < _previous_score return(score.CompareTo(_previous_score) < 0); }