feat: add double down feature to blackjack game
This commit is contained in:
parent
68ea66d4f9
commit
c9f71f70fa
7 changed files with 188 additions and 57 deletions
|
@ -31,6 +31,13 @@ import { Card } from '../../models/blackjack.model';
|
|||
>
|
||||
Halten
|
||||
</button>
|
||||
<button
|
||||
(click)="doubleDown.emit()"
|
||||
class="button-primary px-8 py-4 text-lg font-medium min-w-[120px]"
|
||||
[disabled]="gameState !== 'IN_PROGRESS' || playerCards.length !== 2"
|
||||
>
|
||||
Verdoppeln
|
||||
</button>
|
||||
<button
|
||||
(click)="leave.emit()"
|
||||
class="bg-accent-red hover:bg-accent-red/80 px-8 py-4 rounded text-lg font-medium min-w-[120px] transition-all duration-300"
|
||||
|
@ -48,6 +55,7 @@ export class GameControlsComponent {
|
|||
|
||||
@Output() hit = new EventEmitter<void>();
|
||||
@Output() stand = new EventEmitter<void>();
|
||||
@Output() doubleDown = new EventEmitter<void>();
|
||||
@Output() leave = new EventEmitter<void>();
|
||||
|
||||
calculateHandValue(cards: Card[]): number {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue