I find the best way is to place them all face down on a table and then do multiple circle movements over the top of them. (kind of a wax on, wax off motion).
I find the best way is to place them all face down on a table and then do multiple circle movements over the top of them. (kind of a wax on, wax off motion).
I find the best way is to place them all face down on a table and then do multiple circle movements over the top of them. (kind of a wax on, wax off motion).
Then maybe you should try being more specific about your problem. The guy above me answered your question, if that's not what you meant, then clarify...
You could also try bridging the cards, thats always fun to do.
Then maybe you should try being more specific about your problem. The guy above me answered your question, if that's not what you meant, then clarify...
You could also try bridging the cards, thats always fun to do.
Okay. I have 52 images of all the cards, I want to have an array of these images and then all of the indexes get reasigned randomly (there in order when you start.) But ive tried this before and I couldnt get it to work.
Okay. I have 52 images of all the cards, I want to have an array of these images and then all of the indexes get reasigned randomly (there in order when you start.) But ive tried this before and I couldnt get it to work.
Well it kept repeating numbers and I could not get them to change indexes within the array. Like card 1 is at index 0 and after shuffling card 1 is at index 25.
Well it kept repeating numbers and I could not get them to change indexes within the array. Like card 1 is at index 0 and after shuffling card 1 is at index 25.
I would suggest doing something more along the lines of not actually changing the index positions of the cards. Instead, use a random number generator and an if check to make sure you havent accessed that position already to retrieve cards from the deck at random.
If this were in java i'd say just use Collections.shuffle(), but i don't know the NSMutableArray equivalent if there is one.
Roght now I got all the cards to shuffle using NSNumbers that start out 1-52 then there indexes change like the code i posted before. Based on those indexes I can set the images to the corresponding index for the user to see them. Now I am stuck as how to do one thing, I am making blackjack so I need to see if the cards are geater than 21 added up, so that means that (since the cards are label 1-52) it will not always add up to want. Say Number 1 is Jack of spades, and Number 10 is Ace of Spades. Those do not add up to 21, they add up to 11, so how do I reassign these values so that Jack of Spades is 10 and Ace of Spades is eleven, etc.
Roght now I got all the cards to shuffle using NSNumbers that start out 1-52 then there indexes change like the code i posted before. Based on those indexes I can set the images to the corresponding index for the user to see them. Now I am stuck as how to do one thing, I am making blackjack so I need to see if the cards are geater than 21 added up, so that means that (since the cards are label 1-52) it will not always add up to want. Say Number 1 is Jack of spades, and Number 10 is Ace of Spades. Those do not add up to 21, they add up to 11, so how do I reassign these values so that Jack of Spades is 10 and Ace of Spades is eleven, etc.
Sorry if that was confusing lol
Instead of shuffling the images... you should shuffle the "idea" of a card. I guess you could create a Card class.
On a side note, is there not already a blackjack app available? If there is, there's no rush... and I would learn the programming fundamentals properly. It will only help you in the long run.