casino/frontend/src/app/feature/game/blackjack/components/player-hand/player-hand.component.ts
Jan-Marlon Leibl 99f9f8d3c3
All checks were successful
CI / Get Changed Files (pull_request) Successful in 7s
CI / eslint (pull_request) Successful in 20s
CI / test-build (pull_request) Successful in 28s
CI / prettier (pull_request) Successful in 34s
CI / Checkstyle Main (pull_request) Successful in 1m1s
feat(blackjack): implement game start and controls functionality
2025-03-26 15:30:55 +01:00

38 lines
1.2 KiB
TypeScript

import { ChangeDetectionStrategy, Component, Input } from '@angular/core';
import { CommonModule } from '@angular/common';
import { PlayingCardComponent } from '../playing-card/playing-card.component';
import { Card } from '../../models/blackjack.model';
@Component({
selector: 'app-player-hand',
standalone: true,
imports: [CommonModule, PlayingCardComponent],
template: `
<div class="space-y-4">
<h3 class="section-heading text-2xl mb-4">Deine Karten</h3>
<div class="card p-6 !bg-emerald">
<div
class="flex justify-center gap-4 min-h-[160px] p-4 border-2 border-emerald-400 rounded-lg"
>
@if (cards.length > 0) {
@for (card of cards; track card) {
<app-playing-card
[rank]="card.rank"
[suit]="card.suit"
[hidden]="card.hidden"
></app-playing-card>
}
} @else {
<div class="flex items-center justify-center text-white/70 text-lg font-medium">
Platziere eine Wette um zu spielen...
</div>
}
</div>
</div>
</div>
`,
changeDetection: ChangeDetectionStrategy.OnPush,
})
export class PlayerHandComponent {
@Input() cards: Card[] = [];
}