Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

What random does roulette table use?

Options
  • 25-12-2010 7:19pm
    #1
    Closed Accounts Posts: 2


    I am thinking of learn to do some simple coding and then I thought about what type of random the casinos actually use. What type of C++ function do they use for this. Because how the random numbers appear is the result of some sort of coding random function in the script that they are using. Does anyone know what script they are using to randomly put out what that little ball will land on the table? cheers


Comments

  • Registered Users Posts: 17,963 ✭✭✭✭Gavin "shels"


    I do Computing in College and one of the things we do is Java which has a random number generator, C++ probably has them same.


  • Closed Accounts Posts: 4,436 ✭✭✭c_man


    Hansens wrote: »
    I am thinking of learn to do some simple coding and then I thought about what type of random the casinos actually use. What type of C++ function do they use for this. Because how the random numbers appear is the result of some sort of coding random function in the script that they are using. Does anyone know what script they are using to randomly put out what that little ball will land on the table? cheers

    All languages will have some sort of random function, and often many differing options. The function that you would be looking at (from a C++ beginners) point of view is rand(). Example folllos. Have a read at http://www.cplusplus.com/reference/clibrary/cstdlib/rand/
    // a random number between 1 and 10
    random_number = (rand() % 10) + 1;
    

    Although then you'll learn that it's not truely random, and you can 'seed' it with a clock. Still Pseudorandom though!

    It's a complicated area. Start off with investigating rand() and move on from there.


    Also there's a programming forum that would probably be better suited to this = http://www.boards.ie/vbulletin/forumdisplay.php?f=25


Advertisement