oh and randomF is a function used to generate a random number.
PHP Code:private function randomF(lowVal:int, highVal:int):int //A function used to generate a random number
{
if (lowVal <= highVal)
{
return(lowVal + Math.floor(Math.random() * (highVal - lowVal + 1 )));
} else {
throw(new Error("Fail. Wrong values passed to randomF"));
}
}




Reply With Quote