feat(blackjack): add animated number component and usage
This commit is contained in:
parent
a2f1a40931
commit
4b70a4ac4a
11 changed files with 127 additions and 63 deletions
|
@ -48,7 +48,6 @@ export default class BlackjackComponent implements OnInit {
|
|||
showGameResult = signal(false);
|
||||
|
||||
isActionInProgress = signal(false);
|
||||
currentAction = signal<string>('');
|
||||
|
||||
showDebtDialog = signal(false);
|
||||
debtAmount = signal(0);
|
||||
|
@ -96,7 +95,6 @@ export default class BlackjackComponent implements OnInit {
|
|||
|
||||
onNewGame(bet: number): void {
|
||||
this.isActionInProgress.set(true);
|
||||
this.currentAction.set('Spiel wird gestartet...');
|
||||
|
||||
this.blackjackService.startGame(bet).subscribe({
|
||||
next: (game) => {
|
||||
|
@ -115,7 +113,6 @@ export default class BlackjackComponent implements OnInit {
|
|||
if (!this.currentGameId() || this.isActionInProgress()) return;
|
||||
|
||||
this.isActionInProgress.set(true);
|
||||
this.currentAction.set('Karte wird gezogen...');
|
||||
|
||||
this.blackjackService.hit(this.currentGameId()!).subscribe({
|
||||
next: (game) => {
|
||||
|
@ -142,7 +139,6 @@ export default class BlackjackComponent implements OnInit {
|
|||
}
|
||||
|
||||
this.isActionInProgress.set(true);
|
||||
this.currentAction.set('Dealer zieht Karten...');
|
||||
|
||||
this.blackjackService.stand(this.currentGameId()!).subscribe({
|
||||
next: (game) => {
|
||||
|
@ -167,7 +163,6 @@ export default class BlackjackComponent implements OnInit {
|
|||
}
|
||||
|
||||
this.isActionInProgress.set(true);
|
||||
this.currentAction.set('Einsatz wird verdoppelt...');
|
||||
|
||||
this.blackjackService.doubleDown(this.currentGameId()!).subscribe({
|
||||
next: (game) => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue