|
@@ -85,14 +85,14 @@ def game_settings(game_id):
|
|
|
"creator": g.creator,
|
|
|
"timer": g.timer,
|
|
|
"coords": g.coord_set.to_dict(),
|
|
|
- "players": [
|
|
|
+ "players": sorted([
|
|
|
{
|
|
|
"name": gs.player_name,
|
|
|
"currentRound": gs.get_current_round(),
|
|
|
"totalScore": gs.get_total_score(),
|
|
|
"guesses": gs.to_dict(),
|
|
|
} for gs in g.guess_sets
|
|
|
- ],
|
|
|
+ ], key=lambda x: x["totalScore"] or 0, reverse=True),
|
|
|
})
|
|
|
|
|
|
|