So I took the basic random number generator I introduced in my last post and made it into a full fledged web app.
You can see it on my github site: dhornbein.github.io/sandbox/rngesus.html
The code can be seen within my github.com repository
The site has a simple number input where you can set the number of sides. Then a button that rolls the dice.
I keep track of the roll history by prepending a list on the right.
I’m also using the setTimeout() and setInterval() JS functions to create a roll animation before it settles on a number.
I plan to clean up the code a bit and add some comments so it’s a bit easier to understand what’s going on. The students here are pretty much all jumping into javascript.
One comment