This isn't so much a game as an experiment. You just press the space bar and it rolls the dice to a random number.
I used a book called "Help your Kids with Computer Coding" to make this "game". The book gave me step-by-step instructions on how to make it.