From cf2dd37d1bc3cc9359bacfb3b908233894dd1ac1 Mon Sep 17 00:00:00 2001 From: Dragon Fire Date: Sat, 9 Jan 2021 13:51:10 -0500 Subject: [PATCH] Fix --- commands/games-mp/tic-tac-toe.js | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/commands/games-mp/tic-tac-toe.js b/commands/games-mp/tic-tac-toe.js index 41b8f60e..5d0dd489 100644 --- a/commands/games-mp/tic-tac-toe.js +++ b/commands/games-mp/tic-tac-toe.js @@ -108,9 +108,13 @@ module.exports = class TicTacToeCommand extends Command { const newBoard = [[], [], []]; let col = 0; for (const piece of board) { - if (piece === 'X') newBoard[col].push('x'); - if (piece === 'O') newBoard[col].push('o'); - newBoard[col].push('_'); + if (piece === 'X') { + newBoard[col].push('x'); + } else if (piece === 'O') { + newBoard[col].push('o'); + } else { + newBoard[col].push('_'); + } if (newBoard[col].length === 3) col++; } return newBoard;