public int CompareTo(Logic_FriendMatchRating obj)
        {
            if (this.m_rating > obj.m_rating)
            {
                return(1);
            }
            else if (this.m_rating < obj.m_rating)
            {
                return(-1);
            }

            return(0);
        }
Exemplo n.º 2
0
        internal static List <Logic_FriendMatchRating> findTopFriends(User i_user)
        {
            List <Logic_FriendMatchRating> friendsWithRatingList = new List <Logic_FriendMatchRating>();

            foreach (User i_friend in i_user.Friends)
            {
                Logic_FriendMatchRating m_friend = new Logic_FriendMatchRating(i_friend);
                m_friend.getRating(i_user);
                friendsWithRatingList.Add(m_friend);
            }

            friendsWithRatingList.Sort();
            friendsWithRatingList.Reverse();
            return(friendsWithRatingList);
        }