Home » Blog » Dice Rolling Web App

Dice Rolling Web App

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

Screen Shot 2014-10-06 at 12.03.22 PMThe 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

Leave a Reply

Your email address will not be published. Required fields are marked *