From 22a047f170894ea3542541595d44d580541c4d59 Mon Sep 17 00:00:00 2001 From: dragonfire535 Date: Tue, 14 Mar 2017 10:26:02 -0400 Subject: [PATCH] Revert Change Because it's broke --- commands/random/mathgame.js | 46 +++++++++++-------------------------- 1 file changed, 14 insertions(+), 32 deletions(-) diff --git a/commands/random/mathgame.js b/commands/random/mathgame.js index 558adebd..37648913 100644 --- a/commands/random/mathgame.js +++ b/commands/random/mathgame.js @@ -23,38 +23,20 @@ class MathGameCommand extends commando.Command { let [level] = message.content.toLowerCase().split(" ").slice(1); let randomType = ['+', '-', '*']; randomType = randomType[Math.floor(Math.random() * randomType.length)]; - if(randomType === '*') { - let randomValue; - switch (level) { - case "easy": - randomValue = 10; - break; - case "medium": - randomValue = 12; - break; - case "hard": - randomValue = 15; - break; - case "extreme": - randomValue = 20; - break; - } - } else { - let randomValue; - switch (level) { - case "easy": - randomValue = 10; - break; - case "medium": - randomValue = 50; - break; - case "hard": - randomValue = 100; - break; - case "extreme": - randomValue = 1000; - break; - } + let randomValue; + switch (level) { + case "easy": + randomValue = 10; + break; + case "medium": + randomValue = 50; + break; + case "hard": + randomValue = 100; + break; + case "extreme": + randomValue = 1000; + break; } let randomValue1 = Math.floor(Math.random() * randomValue) + 1; let randomValue2 = Math.floor(Math.random() * randomValue) + 1;