-
-
Save laevandus/15de161b58b067ed668e82cd72e33a63 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let round1 = players.sorted(using: KeyPathComparator(\.round1, order: .reverse)) | |
/* | |
player3 round1=91 round2=88 | |
player5 round1=88 round2=20 | |
player4 round1=84 round2=62 | |
player1 round1=75 round2=69 | |
player2 round1=31 round2=93 | |
*/ | |
let round2 = players.sorted(using: KeyPathComparator(\.round2, order: .reverse)) | |
/* | |
player2 round1=31 round2=93 | |
player3 round1=91 round2=88 | |
player1 round1=75 round2=69 | |
player4 round1=84 round2=62 | |
player5 round1=88 round2=20 | |
*/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment