new game function created

Created a function to generate a random number.
This function gets called when the page loads
It also gets called when the user clicks the new game button.