View Single Post
Random number 1-6
Senior Member
Powerhouse64's Avatar
Status: Offline
Posts: 54
Join Date: Nov 2011
Location: In ur base, movin ur stuffs
Default Random number 1-6 - 11-06-2011, 06:30 PM

So, for a programming class, we had an assignment to make a dice simulator. Everyone in the class but me tried using the random number generator, and testing which numbers were closest to 1-6. Rather than be a sheep, I decided to try it in a different way, and this is the result! I am pretty proud of the program, and it works reliably (though the numbers aren't perfectly spaced, they are close enough for each number to have essentially equal chances of being selected). Feel free to try it out, and let me know if you have any improvements. The assignment is long gone, but I'm too much of a perfectionist to leave this program alone, I'd love some suggestions on how to improve its accuracy, or any other aspect!

EDIT: You do have to restart every time you want the program to come up with a new value.
Attached Files
File Type: a2w dice count.a2w (145.9 KB, 35 views)

Hogwarts: Where everything is made up, and the points don't matter
Reply With Quote