This commit is contained in:
Daniel Odendahl Jr
2017-08-24 20:43:37 +00:00
parent 56e1a92104
commit ac39f3f7b1
+1 -1
View File
@@ -28,7 +28,7 @@ module.exports = class MathGameCommand extends Command {
async run(msg, args) {
const { difficulty } = args;
const operation = operations[difficulty][Math.floor(Math.random() * operations.length)];
const operation = operations[difficulty][Math.floor(Math.random() * operations[difficulty].length)];
const value1 = Math.floor(Math.random() * maxValues[difficulty]) + 1;
const value2 = Math.floor(Math.random() * maxValues[difficulty]) + 1;
const expression = `${value1} ${operation} ${value2}`;