lundi 28 mars 2016

Random Numbers from preset list

I'm a student and in the middle of a midterm project. I am not looking for people to code this for me but I need help with part of it. I am trying to make a Blackjack game and to do that I want to set a list of 52 integers [1,1,1,1,2,2,2,2.....] one for each card in a deck. But how do take a random number from the list and cancel it out? Just like a normal deck once you take a card you can't redraw it. I know a can set a random parameter [n = rand () % 11 + 1] for the program but I want to go above and beyond to get an A




Aucun commentaire:

Enregistrer un commentaire