Computer Science Canada Looping a switch/case and adding a variable each time |
Author: | Varsteil [ Fri Dec 14, 2012 10:37 am ] | ||||
Post subject: | Looping a switch/case and adding a variable each time | ||||
This is the portion of code that I'm having trouble with
This is my Blackjack game, what I want to do is loop the options and the switch and case. I want to create an i variable, and re-write case 1 as something like
In addition, I need a way to add another + playerCardi every time the player chooses to hit. How would I do this? (All the variables have already been declared) |
Author: | TokenHerbz [ Fri Dec 14, 2012 4:42 pm ] | ||
Post subject: | Re: Looping a switch/case and adding a variable each time | ||
I'm not sure what you mean looping cases? You would just construct it as any other loop. If you can give more information to exactly what your attempting to do maybe I could help more
|