feat(blackjack): implement game start and controls functionality
All checks were successful
All checks were successful
This commit is contained in:
parent
d0ba0eb71d
commit
99f9f8d3c3
9 changed files with 320 additions and 54 deletions
|
@ -1,7 +1,7 @@
|
|||
import { ChangeDetectionStrategy, Component, Input } from '@angular/core';
|
||||
import { CommonModule } from '@angular/common';
|
||||
import { PlayingCardComponent } from '../playing-card/playing-card.component';
|
||||
import { Card } from '../../models/card.model';
|
||||
import { Card } from '../../models/blackjack.model';
|
||||
|
||||
@Component({
|
||||
selector: 'app-player-hand',
|
||||
|
@ -14,12 +14,19 @@ import { Card } from '../../models/card.model';
|
|||
<div
|
||||
class="flex justify-center gap-4 min-h-[160px] p-4 border-2 border-emerald-400 rounded-lg"
|
||||
>
|
||||
<app-playing-card
|
||||
*ngFor="let card of cards"
|
||||
[value]="card.value"
|
||||
[suit]="card.suit"
|
||||
[hidden]="card.hidden"
|
||||
></app-playing-card>
|
||||
@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>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue