Added class level comparator function to determine winner