feat(game): Implement return to lobby functionality and enhance dog life handling

This commit is contained in:
2025-11-19 19:18:41 +01:00
parent e2a5cb9614
commit b260e18223
8 changed files with 143 additions and 45 deletions

View File

@@ -75,9 +75,14 @@
<div class="row justify-content-center ingame-cards-slide" id="card-slide">
@for(i <- player.currentHand().get.cards.indices) {
<div class="col-auto handcard" style="border-radius: 6px">
<div class="btn btn-outline-light p-0 border-0 shadow-none" data-card-id="@i" style="border-radius: 6px" onclick="handlePlayCard(this, '@gamelobby.id')">
<div class="btn btn-outline-light p-0 border-0 shadow-none" data-card-id="@i" style="border-radius: 6px" onclick="handlePlayCard(this, '@gamelobby.id', @player.isInDogLife)">
@util.WebUIUtils.cardtoImage(player.currentHand().get.cards(i)) width="120px" style="border-radius: 6px"/>
</div>
@if(player.isInDogLife) {
<div class="mt-2">
<button class="btn btn-danger" onclick="handleSkipDogLife('@gamelobby.id')">Skip Dog Life</button>
</div>
}
</div>
}
</div>