Files
KnockOutWhist-Web/knockoutwhistweb/app/views/ingame/ingame.scala.html
LQ63 ee3f65efd9 feat(ui): added working ingame ui
Added ingame ui with bootstrap. There were problems with the lock procedure which are now fixed.
2025-11-05 11:36:08 +01:00

51 lines
2.2 KiB
HTML

@(player: de.knockoutwhist.player.AbstractPlayer, gamelobby: logic.game.GameLobby)
@main("Ingame") {
<div class="container">
<div class="row">
<div class="col-4 mt-5 text-start">
<p class="fs-4">Next Player</p>
<p class="fs-4">@gamelobby.getLogic.getPlayerQueue.get.duplicate().nextPlayer()</p>
</div>
<div class="col-4 mt-5 text-center">
<p class="fs-3">Cards played</p>
</div>
<div class="col-4 mt-5 text-end">
<p class="fs-4">Trumpsuit:</p>
<p class="fs-4">@gamelobby.getLogic.getCurrentRound.get.trumpSuit</p>
<p class="fs-4 mt-5">First Card:</p>
@if(gamelobby.getLogic.getCurrentTrick.get.firstCard.isDefined) {
@util.WebUIUtils.cardtoImage(gamelobby.getLogic.getCurrentTrick.get.firstCard.get) width="30%"/>
} else {
@views.html.render.card.apply("images/cards/1B.png")("Blank Card") width="30%"/>
}
</div>
</div>
<div class="row">
<div class="col-6 mt-5">
@for((cardplayed, player) <- gamelobby.getLogic.getCurrentTrick.get.cards) {
<div class="col-auto">
<div class="card" style="max-width: 8rem;">
@util.WebUIUtils.cardtoImage(cardplayed) />
<div class="card-body">
<h5 class="card-title">@player</h5>
</div>
</div>
</div>
}
</div>
</div>
<div class="row gx-0">
@for(i <- 0 until player.currentHand().get.cards.size) {
<div class="col-auto">
<form action="@(routes.IngameController.playCard(gamelobby.id))" class="d-flex" method="post">
<input type="hidden" name="cardId" value="@i" />
<button type="submit" class="btn bg-transparent p-0 m-0">
@util.WebUIUtils.cardtoImage(player.currentHand().get.cards(i)) width="40%" />
</button>
</form>
</div>
}
</div>
</div>
}