From 088da19f981d09507a53aa04f0bd19365b051920 Mon Sep 17 00:00:00 2001 From: Dragon Fire Date: Fri, 22 Jan 2021 20:57:54 -0500 Subject: [PATCH] Fix --- commands/games-mp/nim.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/commands/games-mp/nim.js b/commands/games-mp/nim.js index ce86cb6b..839f7ccc 100644 --- a/commands/games-mp/nim.js +++ b/commands/games-mp/nim.js @@ -187,9 +187,9 @@ module.exports = class NimCommand extends Command { computerTurn(board) { let clearRows = 0; const unclearRows = []; - for (const row of board) { - if (row === 0) clearRows++; - else unclearRows.push(row); + for (let i = 0; i < board.length; i++) { + if (board[i] === 0) clearRows++; + else unclearRows.push(i); } if (unclearRows.length === 2) { const amount = board[unclearRows[0]] - 1;