|
-
January 13th, 2011, 05:14 AM
#1
RandomDice
Hey i am making a Yahtze game and need some help.
I want to write the code to how the dices will work so.
What i've been trying to do is:
I made six variables since there are 6 sides on the Dice.
Then i am going to make a function which rolls randomly one of these variables. So i made this one:
public Int32 RandomRollDice
{
//random generator code here
return "value will be here";
}
But i realize i have no idea how i do this, and i have no idea how to define the return value. I've tried to search internett bu,t my hits are mainly on classes and such things i do not understand. Are there like any simple functions for a random roll i could understand as a beginner?
So if anyone could give me a hint, thanks.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|