Roulette Xtreme 2.0 - System Designer
Generate Random Number
Identifier Index > G > Generate Random Number

Glossary Item Box

Generate Random Number

Format:  Generate Random Number  from-integer  to-integer  dest-support-action

where

Description

The Generate Random Number identifier generates a random number that is between from-integer and to-integer.  The results is assigned to the value to the dest-support-action.  

Formula

The mathematical formula for this action statement is: from-integer <= dest-support-action <= to-integer where dest-support-action is the integer value destination.

Example 1

Every time we initiate a new session, we want to wait for a certain number of spins to appear before we place bets on the roulette table.  And we want the wait count to be different for each session.  To do this, we create a data record wait count to contain the data value that will be created by a random generator.   The following example will perform this task.

RX Script Copy Code
While Starting a New Session
begin
  Generate Random Number from 1 to 20 into Record "wait count" data
end

Results from example 1

Example 2

We want to place a random bet on the 2nd Dozen from 5 to 25 units on every spin.  The following example will perform this task.

RX Script Copy Code
Generate Random Number from 5 to 25 units into 2nd Dozen

Results from example 2

Copyright © 2003 UX Software. All rights reserved