refactor: update assertGameNotOver to use proper syntax and improve readability

This commit is contained in:
2026-04-20 21:57:22 +02:00
committed by Janis
parent a8be2ad608
commit 22beaa3fda
@@ -125,8 +125,10 @@ class GameResource:
private def ok(body: AnyRef): Response = Response.ok(body).build()
private def created(body: AnyRef): Response = Response.status(Response.Status.CREATED).entity(body).build()
// scalafix:off DisableSyntax.throw
private def assertGameNotOver(entry: GameEntry): Unit =
if entry.engine.context.result.isDefined then throw BadRequestException("GAME_OVER", "Game is already over")
// scalafix:on DisableSyntax.throw
// ── endpoints ────────────────────────────────────────────────────────────
// scalafix:off DisableSyntax.throw