예제 #1
0
        /// <summary>
        /// Comparison method used to compare two highscore entries.
        /// </summary>
        /// <param name="score1">First highscore entry.</param>
        /// <param name="score2">Second highscore entry.</param>
        /// <returns>1 if the first highscore is smaller than the second, 0 if both
        /// are equal and -1 otherwise.</returns>
        private static int CompareLevel(highscoreEntry entry1, highscoreEntry entry2)
        {
            if (entry1.level < entry2.level)
            {
                return(1);
            }

            if (entry1.level == entry2.level)
            {
                return(0);
            }

            return(-1);
        }
예제 #2
0
        /// <summary>
        /// Comparison method used to compare two highscore entries.
        /// </summary>
        /// <param name="score1">First highscore entry.</param>
        /// <param name="score2">Second highscore entry.</param>
        /// <returns>1 if the first highscore is smaller than the second, 0 if both
        /// are equal and -1 otherwise.</returns>
        private static int CompareTimes(highscoreEntry entry1, highscoreEntry entry2)
        {
            if (entry1.ts > entry2.ts)
            {
                return(1);
            }

            if (entry1.ts == entry2.ts)
            {
                return(0);
            }

            return(-1);
        }