Javascript based dice simulator