From 2e42f869a8446407c97b74d1c4342ab6d5eb32ee Mon Sep 17 00:00:00 2001 From: Dragon Fire Date: Fri, 22 Jan 2021 16:57:52 -0500 Subject: [PATCH] Fix lint --- commands/games-mp/nim.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/commands/games-mp/nim.js b/commands/games-mp/nim.js index ce484856..5f2c508b 100644 --- a/commands/games-mp/nim.js +++ b/commands/games-mp/nim.js @@ -95,9 +95,9 @@ module.exports = class NimCommand extends Command { `); const rowFilter = res => { if (res.author.id !== user.id) return false; - const choice = res.content; - if (choice.toLowerCase() === 'end' || choice.toLowerCase() === 'back') return true; - const i = Number.parseInt(choice, 10) - 1; + const chosen = res.content; + if (chosen.toLowerCase() === 'end' || chosen.toLowerCase() === 'back') return true; + const i = Number.parseInt(chosen, 10) - 1; return row >= i && row > 0; }; const rowTurn = await msg.channel.awaitMessages(rowFilter, { @@ -124,7 +124,7 @@ module.exports = class NimCommand extends Command { if (rowChoice.toLowerCase() === 'back') continue; board[picked - 1] -= rowPicked; if (!userTurn && firstTurn) firstTurn = false; - if (!board.some(row => row !== 0)) { + if (!board.some(r => r !== 0)) { winner = userTurn ? opponent : msg.author; break; }