From bfe5432d50915a495e944982b2b490dc67d0961f Mon Sep 17 00:00:00 2001 From: Dragon Fire Date: Sat, 23 Mar 2024 23:35:17 -0400 Subject: [PATCH] Fix ties --- commands/games-mp/tic-tac-toe.js | 1 + 1 file changed, 1 insertion(+) diff --git a/commands/games-mp/tic-tac-toe.js b/commands/games-mp/tic-tac-toe.js index 87e72ede..9ad1d50a 100644 --- a/commands/games-mp/tic-tac-toe.js +++ b/commands/games-mp/tic-tac-toe.js @@ -86,6 +86,7 @@ module.exports = class TicTacToeCommand extends Command { sides[opponent.bot && !userTurn ? choice : Number.parseInt(choice, 10) - 1] = sign; taken.push(choice); const win = this.verifyWin(sides, msg.author, opponent); + if (taken.length === 8 && !win) win = 'tie'; if (win) winner = win; if (lastTurnTimeout) lastTurnTimeout = false; userTurn = !userTurn;