From e24a0a36ed9514b5359401fc045bda3f9092fa4f Mon Sep 17 00:00:00 2001 From: Dragon Fire Date: Sat, 23 Jan 2021 15:28:25 -0500 Subject: [PATCH] Fix --- commands/games-mp/chess.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/commands/games-mp/chess.js b/commands/games-mp/chess.js index a3ae23c5..cacc19ef 100644 --- a/commands/games-mp/chess.js +++ b/commands/games-mp/chess.js @@ -101,6 +101,7 @@ module.exports = class ChessCommand extends Command { continue; } } + if (turn.first().content.toLowerCase() === 'end') break; const choice = turn.first().content.toUpperCase().match(turnRegex); game.move(choice[1], choice[2]); } @@ -133,7 +134,7 @@ module.exports = class ChessCommand extends Command { ctx.drawImage(this.images[parsed.color][parsed.name], w, h, 52, 52); w += 52 + 2; col += 1; - if (i % 8 === 0 && i !== 0) { + if (col % 8 === 0 && col !== 0) { w = 36; col = 0; h += 52 + 2;