-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrandTest.html
47 lines (35 loc) · 868 Bytes
/
randTest.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
<!DOCTYPE html>
<html>
<body>
<script type ="module">
import randomizer from './LCG.js';
window.rando = new randomizer("franklin");
</script>
<script>
function getnums() {
document.write("");
let numnums = 2500000;
let output = "";
for (let i = 0; i < numnums; i+=10) {
output = "";
for (let j = 0; j < 11; j+=1) {
window.rando.rand();
output += window.rando.getSeed().toString(16).padStart(8, '0');
}
document.writeln(output.slice(0,80));
}
}
function getdice() {
document.write("");
let numnums = 100000;
let output = "";
for (let i = 0; i < numnums; i+=1) {
output += window.rando.dice() + ",";
}
document.writeln(output);
}
</script>
<button type="button" onclick="window.getnums()">Get dem NumNums</button>
<button type="button" onclick="window.getdice()">Roll dem diceys</button>
</body>
</html>