Created
December 21, 2021 09:00
-
-
Save percybolmer/820db4a7b2e02255891da73de5e925c9 to your computer and use it in GitHub Desktop.
A fix for its function
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
func (d Deck) Shuffle() { | |
rand.Seed(time.Now().UnixNano()) | |
for i := range d { | |
j := rand.Intn(len(d) - 1) | |
d[i], d[j] = d[j], d[i] | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment