Browse Source

Fix card-sorting;

feature/split
Nero Ignis 5 years ago
parent
commit
3386e7f230
  1. 7
      js/CardDeck.js

7
js/CardDeck.js

@ -60,12 +60,7 @@ class CardDeck { @@ -60,12 +60,7 @@ class CardDeck {
let cardCount = this.cards.length, t, i;
for (let run = 0; run === runs; run++) {
while (cardCount) {
i = Math.floor(Math.random() * cardCount--);
t = this.cards[cardCount];
this.cards[cardCount] = this.cards[i];
this.cards[i] = t;
}
this.cards.sort( () => Math.random() - 0.5);
}
}

Loading…
Cancel
Save