Quote:
Originally Posted by iphonedev.
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.