Y
Hacker News
new
|
ask
|
show
|
jobs
by
ajkjk
3946 days ago
Yes, you're correct. It should swap with cards that are strictly at later positions in the deck:
Deck.getRandomInt(index+1, numberOfCards)
instead of
Deck.getRandomInt(0, numberOfCards)