refactor(blackjack): remove unnecessary comments and clean code
This commit is contained in:
parent
deac128935
commit
349e4ce1ec
4 changed files with 0 additions and 9 deletions
|
@ -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}`,
|
||||
};
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue