refactor(blackjack): remove unnecessary comments and clean code

This commit is contained in:
Jan-Marlon Leibl 2025-03-27 15:50:34 +01:00
parent deac128935
commit 349e4ce1ec
Signed by: jleibl
GPG key ID: 300B2F906DC6F1D5
4 changed files with 0 additions and 9 deletions

View file

@ -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}`,
};
});