Cleanup (#19)
* reformatting of skill checks table * Including own Random "generator", more refactoring
This commit is contained in:
13
functions/Random.js
Normal file
13
functions/Random.js
Normal file
@ -0,0 +1,13 @@
|
||||
const Random = {int, use};
|
||||
|
||||
function int (min, max) {
|
||||
if (!min || !max) { return; }
|
||||
//return Math.floor(Math.random() * (Math.floor(max) - Math.ceil(min))) + min;
|
||||
return Math.floor(Math.random() * (Math.floor(max) - Math.ceil(min) + 1)) + min;
|
||||
}
|
||||
|
||||
function use (str) {
|
||||
return true;
|
||||
}
|
||||
|
||||
module.exports = { Random };
|
Reference in New Issue
Block a user