• + 0 comments
    public int compare(Player playerA, Player playerB) {
    
            if(playerB.score == playerA.score) {
                return playerA.name.compareTo(playerB.name);
            } else if (playerB.score > playerA.score) {
                return 1;
            } else {
                return -1;
            }
        }