From 060e03075b7e92a6bacd0f3f019222a996be3935 Mon Sep 17 00:00:00 2001 From: Dragon Fire Date: Tue, 17 Mar 2020 17:04:21 -0400 Subject: [PATCH] Fix Some Bugs --- commands/mp-games/connect-four.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/commands/mp-games/connect-four.js b/commands/mp-games/connect-four.js index f0e02501..7c6d60f9 100644 --- a/commands/mp-games/connect-four.js +++ b/commands/mp-games/connect-four.js @@ -79,8 +79,8 @@ module.exports = class ConnectFourCommand extends Command { break; } const i = Number.parseInt(choice, 10) - 1; - board[i][5 - board[i][6]] = sign; - board[i][6] += 1; + board[i][board[i][6]] = sign; + board[i][6] -= 1; if (this.verifyWin(board)) winner = userTurn ? msg.author : opponent; userTurn = !userTurn; } @@ -122,8 +122,8 @@ module.exports = class ConnectFourCommand extends Command { generateBoard() { const arr = []; - for (let i = 0; i < 7; i++) { - arr.push([null, null, null, null, null, null, 0]); + for (let i = 0; i < 6; i++) { + arr.push([null, null, null, null, null, null, 5]); } return arr; }