Computer Science Canada rerolling! |
Author: | SwAnK [ Mon Apr 25, 2005 8:50 pm ] | ||
Post subject: | rerolling! | ||
hey, I'm trying to get my dice program, so that when you roll, you can select what dice you wish to keep and which you'd like to roll again. Here is my code so far. I'm confused about how I can get which dice the user would like to keep. Each of the Rand.Int are already assigned values are they not, in my code, 1..5.??
oh, and also it would be cool, so that when they rerolled the dice the orginal dice rolled, actually rerolled. For mine it would display the numbers, then show the rerolls seprately. if you get rid of the one get you'd see what i mean. Thanx again! |
Author: | Token [ Tue Apr 26, 2005 6:13 am ] | ||
Post subject: | |||
well what i'd do is number the dice 1-5. each die should have its own variable within an array which i think is what you have. then ask which would you like to re-roll, but say that they'd like to re-roll 1 3 and 5 , they would put 135. make this variable a string so that you can use index. then do this
|
Author: | SwAnK [ Tue Apr 26, 2005 11:32 pm ] | ||
Post subject: | |||
alright well the reroll does work, but it does it seperately, how do you reroll so that the actual 'original' numbers change??
|
Author: | Token [ Wed Apr 27, 2005 3:45 pm ] | ||
Post subject: | |||
right, because youre only putting below so get rid of the put statement within the re-roll thing and just cls and draw them all after like this
Edit: oops posted the wrong code, dosent look like ne one saw it cuz no one posted but its been a day lol so heres the updated code |