Created
February 8, 2016 17:15
-
-
Save meixg/3ba2f9f6bc60afabb297 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var dice = function(){ | |
| var num=3; | |
| return function(minimum, maximum){ | |
| var t = new Date(); | |
| var number = t.getMilliseconds(); | |
| number = (number*num)%6/5; | |
| if(num == 0){ | |
| num = 3; | |
| }else{ | |
| num = number; | |
| } | |
| number = number*(maximum - minimum); | |
| return(number + minimum).toFixed(0); | |
| } | |
| }(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment