* reformatting of skill checks table * Including own Random "generator", more refactoring
13 lines
344 B
JavaScript
13 lines
344 B
JavaScript
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 }; |