Bad GetRandomNumber() - because it relies on constants
/*********************************************
** Function: GetRandomNumber
** Usage: x = GetRandomNumber();
**
** Inputs: None
** Output: returns a random integer between LOW and
** HIGH, inclusive
**
** Assumptions:
** LOW and HIGH are #defines
** random number generator has been seeded
*********************************************/
int GetRandomNumber (void)
{
int r ;
/* Call rand() to get a large random number. */
r = rand() ;
/* Scale the random number within range. */
r = r % (HIGH - LOW + 1) + LOW ;
return (r) ;
}