Started work on checks

This commit is contained in:
Stefan Zermatten
2020-09-18 14:00:29 +02:00
parent c8ddf9d547
commit bc5c465a32
5 changed files with 61 additions and 6 deletions

View File

@@ -0,0 +1,9 @@
export default function roll(number, diceSize){
let values = [];
let randomSrc = DDP.randomStream('diceRoller');
for (let i = 0; i < number; i++){
let roll = ~~(randomSrc.fraction() * diceSize) + 1
values.push(roll);
}
return values;
}