+ 3
Card Game?
Im making blackjack (the card game) and i am also very new to coding, so sorry if i dont understand some terms. Anyways, ive created the deck, and the drawing system, but i wanted a function that made the array of cards reset - like a shuffle. Any help? Heres my code: https://code.sololearn.com/W0U8MCo44Bp0/?ref=app
5 Respuestas
+ 1
Maybe this is what you want:
https://code.sololearn.com/WMLSEekwKGfY/?ref=app
+ 7
You can use these as reference:
https://code.sololearn.com/cL88WKAOchc1/?ref=app
https://code.sololearn.com/WksH1DH6XYA6/?ref=app
+ 1
Yes! Thanks ;D
0
You should set deck variable to constant, set another temp var for drawing
var drawdeck = deck;
To shuffle, you just need to reset cardsleft and drawdeck variables.
Also remember to check cardsleft===0
0
i dont understand what you mean Calvin sorry