Added getRandomInt() function to the server side to compute random integers.