feat(ui): Websocket

Started implementing functionality to the Websocket
This commit is contained in:
LQ63
2025-11-26 18:56:26 +01:00
committed by Janis
parent 6402df43b1
commit 6e76223c4a
12 changed files with 102 additions and 54 deletions

View File

@@ -2,12 +2,13 @@ package util.mapper
import de.knockoutwhist.events.player.RequestCardEvent
import logic.game.GameLobby
import model.sessions.UserSession
import play.api.libs.json.{JsObject, Json}
object RequestCardEventMapper extends SimpleEventMapper[RequestCardEvent]{
override def id: String = "RequestCardEvent"
override def toJson(event: RequestCardEvent, gameLobby: GameLobby): JsObject = {
override def toJson(event: RequestCardEvent, session: UserSession): JsObject = {
Json.obj(
"player" -> event.player.name
)