Card Game? | Sololearn: Learn to code for FREE!


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:

10/12/2017 6:03:08 AM


5 Answers

New Answer


Maybe this is what you want:


You can use these as reference:


Yes! Thanks ;D


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


i dont understand what you mean Calvin sorry