Hi.
There is an error in the transcript: the code in the transcript matches the video when the addToLeaderboard() func is first described, but the code in line 3 was changed later in the video because it didn’t compile.
mutating func addToLeaderboard(points: Int) {
leaderboardEntries.append(LeaderboardEntry(points: points, date: Date()))
leaderboardEntries.sort { $0.points > $1.points }
}
should be
mutating func addToLeaderboard(points: Int) {
leaderboardEntries.append(LeaderboardEntry(points: points, date: Date()))
leaderboardEntries.sort { $0.score > $1.score }
}