fix: FRO-29 Websocket Communication (#104)

Reviewed-on: #104
Co-authored-by: Janis <janis.e.20@gmx.de>
Co-committed-by: Janis <janis.e.20@gmx.de>
This commit is contained in:
2025-12-10 09:42:50 +01:00
committed by Janis
parent 33efc4e107
commit fa3d21e303
7 changed files with 23 additions and 9 deletions

View File

@@ -4,7 +4,7 @@ import dto.subDTO.UserDTO
import logic.game.GameLobby
import model.users.User
case class LobbyInfoDTO(users: List[UserDTO], self: UserDTO, maxPlayers: Int)
case class LobbyInfoDTO(gameId: String, users: List[UserDTO], self: UserDTO, maxPlayers: Int)
object LobbyInfoDTO {
@@ -12,6 +12,7 @@ object LobbyInfoDTO {
val session = lobby.getUserSession(user.id)
LobbyInfoDTO(
gameId = lobby.id,
users = lobby.getPlayers.values.map(user => UserDTO(user)).toList,
self = UserDTO(session),
maxPlayers = lobby.maxPlayers,