Alice Community  

Go Back   Alice Community > Alice 2 > Share Worlds

Thread Tools Display Modes
Prev Previous Post   Next Post Next
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

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Copyright ©2022, Carnegie Mellon University
Alice 2.x © 1999-2012, Alice 3.x © 2008-2012, Carnegie Mellon University. All rights reserved.