Compare commits

..

No commits in common. "03ce527087fae792e40d7a19de819b04d90582c9" and "a639888a33eb8482be27a45846128b718d4a381c" have entirely different histories.

5 changed files with 19 additions and 17 deletions

View file

@ -6,9 +6,9 @@
<app-dealer-hand [cards]="dealerCards"></app-dealer-hand> <app-dealer-hand [cards]="dealerCards"></app-dealer-hand>
<app-player-hand [cards]="playerCards"></app-player-hand> <app-player-hand [cards]="playerCards"></app-player-hand>
<app-game-controls <app-game-controls
(hit)="onHit()" (onHit)="onHit()"
(stand)="onStand()" (onStand)="onStand()"
(leave)="leaveGame()" (onLeave)="leaveGame()"
></app-game-controls> ></app-game-controls>
</div> </div>
@ -16,7 +16,7 @@
<app-game-info <app-game-info
[balance]="balance()" [balance]="balance()"
[currentBet]="currentBet" [currentBet]="currentBet"
(newGame)="onNewGame()" (onNewGameClick)="onNewGame()"
></app-game-info> ></app-game-info>
</div> </div>
</div> </div>

View file

@ -10,7 +10,7 @@ import { Card } from '../../models/card.model';
template: ` template: `
<div class="space-y-4"> <div class="space-y-4">
<h3 class="section-heading text-2xl mb-4">Croupier's Karten</h3> <h3 class="section-heading text-2xl mb-4">Croupier's Karten</h3>
<div class="card p-6 !bg-accent-red"> <div class="card p-6 !bg-red-500">
<div class="flex justify-center gap-4 min-h-[160px] p-4 border-2 border-red-400 rounded-lg"> <div class="flex justify-center gap-4 min-h-[160px] p-4 border-2 border-red-400 rounded-lg">
<app-playing-card <app-playing-card
*ngFor="let card of cards" *ngFor="let card of cards"

View file

@ -8,19 +8,19 @@ import { CommonModule } from '@angular/common';
template: ` template: `
<div class="flex justify-center gap-4"> <div class="flex justify-center gap-4">
<button <button
(click)="hit.emit()" (click)="onHit.emit()"
class="button-primary px-8 py-4 text-lg font-medium min-w-[120px]" class="button-primary px-8 py-4 text-lg font-medium min-w-[120px]"
> >
Ziehen Ziehen
</button> </button>
<button <button
(click)="stand.emit()" (click)="onStand.emit()"
class="button-primary px-8 py-4 text-lg font-medium min-w-[120px]" class="button-primary px-8 py-4 text-lg font-medium min-w-[120px]"
> >
Halten Halten
</button> </button>
<button <button
(click)="leave.emit()" (click)="onLeave.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" 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"
> >
Abbrechen Abbrechen
@ -30,7 +30,7 @@ import { CommonModule } from '@angular/common';
changeDetection: ChangeDetectionStrategy.OnPush, changeDetection: ChangeDetectionStrategy.OnPush,
}) })
export class GameControlsComponent { export class GameControlsComponent {
@Output() hit = new EventEmitter<void>(); @Output() onHit = new EventEmitter<void>();
@Output() stand = new EventEmitter<void>(); @Output() onStand = new EventEmitter<void>();
@Output() leave = new EventEmitter<void>(); @Output() onLeave = new EventEmitter<void>();
} }

View file

@ -19,14 +19,16 @@ import { CommonModule, CurrencyPipe } from '@angular/common';
{{ currentBet | currency: 'EUR' }} {{ currentBet | currency: 'EUR' }}
</span> </span>
</div> </div>
<button class="button-primary w-full py-2" (click)="newGame.emit()">Neues Spiel</button> <button class="button-primary w-full py-2" (click)="onNewGameClick.emit()">
Neues Spiel
</button>
</div> </div>
</div> </div>
`, `,
changeDetection: ChangeDetectionStrategy.OnPush, changeDetection: ChangeDetectionStrategy.OnPush,
}) })
export class GameInfoComponent { export class GameInfoComponent {
@Input() balance = 0; @Input() balance: number = 0;
@Input() currentBet = 0; @Input() currentBet: number = 0;
@Output() newGame = new EventEmitter<void>(); @Output() onNewGameClick = new EventEmitter<void>();
} }

View file

@ -10,9 +10,9 @@ import { Card } from '../../models/card.model';
template: ` template: `
<div class="space-y-4"> <div class="space-y-4">
<h3 class="section-heading text-2xl mb-4">Deine Karten</h3> <h3 class="section-heading text-2xl mb-4">Deine Karten</h3>
<div class="card p-6 !bg-emerald"> <div class="card p-6 !bg-green-500">
<div <div
class="flex justify-center gap-4 min-h-[160px] p-4 border-2 border-emerald-400 rounded-lg" class="flex justify-center gap-4 min-h-[160px] p-4 border-2 border-green-400 rounded-lg"
> >
<app-playing-card <app-playing-card
*ngFor="let card of cards" *ngFor="let card of cards"