Compare commits
6 Commits
feat/FRO-1
...
4.14.0
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
13038b0cb9 | ||
| b17aae5795 | |||
|
|
421f769cb6 | ||
| bd7a055a09 | |||
|
|
e2a2b56174 | ||
| 2a29ca8cdd |
15
CHANGELOG.md
15
CHANGELOG.md
@@ -234,3 +234,18 @@
|
||||
### Features
|
||||
|
||||
* FRO-2 Implement Login Component ([#105](https://git.janis-eccarius.de/KnockOutWhist/KnockOutWhist-Web/issues/105)) ([e8b31b1](https://git.janis-eccarius.de/KnockOutWhist/KnockOutWhist-Web/commit/e8b31b174819b5f033034501856c4b1189c4c4ee))
|
||||
## (2025-12-10)
|
||||
|
||||
### Features
|
||||
|
||||
* FRO-20 Create scoreboard component ([#106](https://git.janis-eccarius.de/KnockOutWhist/KnockOutWhist-Web/issues/106)) ([2a29ca8](https://git.janis-eccarius.de/KnockOutWhist/KnockOutWhist-Web/commit/2a29ca8cdd3ef55f6f66f00b5e7727e1b1af1458))
|
||||
## (2025-12-10)
|
||||
|
||||
### Features
|
||||
|
||||
* **api:** FRO-14 Create Game ([#107](https://git.janis-eccarius.de/KnockOutWhist/KnockOutWhist-Web/issues/107)) ([bd7a055](https://git.janis-eccarius.de/KnockOutWhist/KnockOutWhist-Web/commit/bd7a055a0944a1c5219f21bb080bf658229f49e9))
|
||||
## (2025-12-11)
|
||||
|
||||
### Features
|
||||
|
||||
* FRO-31 Small backend changes ([#108](https://git.janis-eccarius.de/KnockOutWhist/KnockOutWhist-Web/issues/108)) ([b17aae5](https://git.janis-eccarius.de/KnockOutWhist/KnockOutWhist-Web/commit/b17aae5795b35ce3805db87c9bf741a5a96cd5ac))
|
||||
|
||||
@@ -44,8 +44,7 @@ class MainMenuController @Inject()(
|
||||
)
|
||||
Ok(Json.obj(
|
||||
"status" -> "success",
|
||||
"redirectUrl" -> routes.IngameController.game(gameLobby.id).url,
|
||||
"content" -> IngameController.returnInnerHTML(gameLobby, gameLobby.logic.getCurrentState, request.user).toString
|
||||
"gameId" -> gameLobby.id,
|
||||
))
|
||||
} else {
|
||||
BadRequest(Json.obj(
|
||||
|
||||
@@ -34,7 +34,7 @@ class StatusController @Inject()(
|
||||
Json.obj(
|
||||
"status" -> "authenticated",
|
||||
"username" -> user.name,
|
||||
"inGame" -> "false"
|
||||
"inGame" -> false
|
||||
)
|
||||
)
|
||||
} else {
|
||||
@@ -43,7 +43,7 @@ class StatusController @Inject()(
|
||||
Json.obj(
|
||||
"status" -> "authenticated",
|
||||
"username" -> user.name,
|
||||
"inGame" -> "true",
|
||||
"inGame" -> true,
|
||||
"gameId" -> game.id
|
||||
)
|
||||
)
|
||||
@@ -80,7 +80,7 @@ class StatusController @Inject()(
|
||||
}}
|
||||
|
||||
private def getUserFromSession(request: RequestHeader): Option[User] = {
|
||||
val session = request.cookies.get("sessionId")
|
||||
val session = request.cookies.get("accessToken")
|
||||
if (session.isDefined)
|
||||
return sessionManager.getUserBySession(session.get.value)
|
||||
None
|
||||
|
||||
@@ -28,7 +28,7 @@ object GameInfoDTO {
|
||||
hand = selfPlayer.flatMap(_.currentHand()).map(HandDTO(_)),
|
||||
playerQueue = PlayerQueueDTO(lobby.logic),
|
||||
currentTrick = lobby.logic.getCurrentTrick.map(TrickDTO(_)),
|
||||
currentRound = lobby.logic.getCurrentRound.map(RoundDTO(_))
|
||||
currentRound = lobby.logic.getCurrentRound.map(r => RoundDTO(r, lobby.logic.getCurrentMatch))
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
@@ -2,14 +2,16 @@ package dto.subDTO
|
||||
|
||||
import de.knockoutwhist.cards.Card
|
||||
import de.knockoutwhist.cards.CardValue.Ace
|
||||
import de.knockoutwhist.rounds.{Match, Round}
|
||||
|
||||
case class RoundDTO(trumpSuit: CardDTO, firstRound: Boolean, trickList: List[TrickDTO])
|
||||
case class RoundDTO(trumpSuit: CardDTO, playersIn: Seq[PlayerDTO], firstRound: Boolean, trickList: List[TrickDTO])
|
||||
|
||||
object RoundDTO {
|
||||
|
||||
def apply(round: de.knockoutwhist.rounds.Round): RoundDTO = {
|
||||
def apply(round: Round, matchImpl: Option[Match]): RoundDTO = {
|
||||
RoundDTO(
|
||||
trumpSuit = CardDTO(Card(Ace, round.trumpSuit)),
|
||||
playersIn = matchImpl.map(_.playersIn.map(PlayerDTO(_))).getOrElse(Seq.empty),
|
||||
firstRound = round.firstRound,
|
||||
trickList = round.tricklist.map(trick => TrickDTO(trick))
|
||||
)
|
||||
|
||||
@@ -57,7 +57,8 @@ object WebsocketEventMapper {
|
||||
Json.obj(
|
||||
"id" -> ("request-" + java.util.UUID.randomUUID().toString),
|
||||
"event" -> obj.id,
|
||||
"state" -> stateToJson(session),
|
||||
"state" -> session.gameLobby.getLogic.getCurrentState.toString,
|
||||
"stateData" -> stateToJson(session),
|
||||
"data" -> data
|
||||
)
|
||||
}
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
MAJOR=4
|
||||
MINOR=11
|
||||
MINOR=14
|
||||
PATCH=0
|
||||
|
||||
Reference in New Issue
Block a user