Switch the use of Math.random() to the Random class