feat: GameState to Title Mapping BAC-1 (#92)

Reviewed-on: #92
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-01 19:13:32 +01:00
committed by Janis
parent 0037820905
commit 6e17328846
4 changed files with 19 additions and 3 deletions

View File

@@ -12,6 +12,7 @@ import play.api.*
import play.api.libs.json.{JsValue, Json}
import play.api.mvc.*
import play.twirl.api.Html
import util.GameUtil
import java.util.UUID
import javax.inject.*
@@ -33,7 +34,7 @@ class IngameController @Inject()(
IngameController.returnInnerHTML(g, g.logic.getCurrentState, request.user)
}
if (results.isSuccess) {
Ok(views.html.main("In-Game - Knockout Whist")(results.get))
Ok(views.html.main("Knockout Whist - " + GameUtil.stateToTitle(g.logic.getCurrentState))(results.get))
} else {
InternalServerError(results.failed.get.getMessage)
}