Beispiel #1
0
        public int Compare(ScoreCollection other, PlayerType player)
        {
            switch (player)
            {
            case PlayerType.Hero1: return(other.score1.ToUInt32().CompareTo(score1.ToUInt32()));

            case PlayerType.Hero2: return(other.score2.ToUInt32().CompareTo(score2.ToUInt32()));

            case PlayerType.Hero3: return(other.score3.ToUInt32().CompareTo(score3.ToUInt32()));

            case PlayerType.Hero4: return(other.score4.ToUInt32().CompareTo(score4.ToUInt32()));

            case PlayerType.None:
            default:
                throw new NotSupportedException(string.Format("PlayerType '{0}' is not supported.", player));
            }
        }