diff options
Diffstat (limited to 'sw-server/src/main/kotlin/org/luxons')
-rw-r--r-- | sw-server/src/main/kotlin/org/luxons/sevenwonders/server/lobby/Lobby.kt | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/sw-server/src/main/kotlin/org/luxons/sevenwonders/server/lobby/Lobby.kt b/sw-server/src/main/kotlin/org/luxons/sevenwonders/server/lobby/Lobby.kt index 89d041f0..dd2b6561 100644 --- a/sw-server/src/main/kotlin/org/luxons/sevenwonders/server/lobby/Lobby.kt +++ b/sw-server/src/main/kotlin/org/luxons/sevenwonders/server/lobby/Lobby.kt @@ -80,7 +80,9 @@ class Lobby( if (orderedUsernames.toSet() != usernames.toSet()) { throw PlayerListMismatchException(orderedUsernames) } + val wondersMap = players.indices.associate { assignedWonders[it] to players[it].username } players.sortBy { orderedUsernames.indexOf(it.username) } + assignedWonders.sortBy { orderedUsernames.indexOf(wondersMap[it]) } } @Synchronized |