Corrected the random function

The game looks like it is working properly.