diff --git a/frontend/src/app/feature/game/blackjack/blackjack.component.html b/frontend/src/app/feature/game/blackjack/blackjack.component.html
index 1a6b8d3..c47d2f6 100644
--- a/frontend/src/app/feature/game/blackjack/blackjack.component.html
+++ b/frontend/src/app/feature/game/blackjack/blackjack.component.html
@@ -6,7 +6,6 @@
-
@if (isActionInProgress()) {
('IN_PROGRESS');
showGameResult = signal(false);
- // Add loading state trackers
isActionInProgress = signal(false);
currentAction = signal('');
@@ -64,7 +63,6 @@ export default class BlackjackComponent {
this.gameInProgress.set(game.state === 'IN_PROGRESS');
this.gameState.set(game.state);
- // When game ends, make sure all dealer cards are visible
const isGameOver = game.state !== 'IN_PROGRESS';
this.dealerCards.set(
@@ -81,12 +79,10 @@ export default class BlackjackComponent {
}))
);
- // Only refresh and show game result if the game has ended
if (isGameOver) {
console.log('Game is over, state:', game.state);
this.refreshUserBalance();
- // Show result immediately without resetting first
this.showGameResult.set(true);
console.log('Game result dialog should be shown now');
}
diff --git a/frontend/src/app/feature/game/blackjack/components/dealer-hand/dealer-hand.component.ts b/frontend/src/app/feature/game/blackjack/components/dealer-hand/dealer-hand.component.ts
index 6d77f60..50ff0cf 100644
--- a/frontend/src/app/feature/game/blackjack/components/dealer-hand/dealer-hand.component.ts
+++ b/frontend/src/app/feature/game/blackjack/components/dealer-hand/dealer-hand.component.ts
@@ -48,13 +48,11 @@ export class DealerHandComponent implements OnChanges {
const newCards = this.cards.length > this.lastCardCount;
this.cardsWithState = this.cards.map((card, index) => {
- // Consider a card new if it's added after the initial state and is the latest card
const isNew = newCards && index >= this.lastCardCount;
return {
...card,
isNew,
- // Generate a unique ID to help Angular track the cards
id: `${card.suit}-${card.rank}-${index}`,
};
});
diff --git a/frontend/src/app/feature/game/blackjack/components/player-hand/player-hand.component.ts b/frontend/src/app/feature/game/blackjack/components/player-hand/player-hand.component.ts
index 33bf547..d47114f 100644
--- a/frontend/src/app/feature/game/blackjack/components/player-hand/player-hand.component.ts
+++ b/frontend/src/app/feature/game/blackjack/components/player-hand/player-hand.component.ts
@@ -50,13 +50,11 @@ export class PlayerHandComponent implements OnChanges {
const newCards = this.cards.length > this.lastCardCount;
this.cardsWithState = this.cards.map((card, index) => {
- // Consider a card new if it's added after the initial state and is the latest card
const isNew = newCards && index >= this.lastCardCount;
return {
...card,
isNew,
- // Generate a unique ID to help Angular track the cards
id: `${card.suit}-${card.rank}-${index}`,
};
});