From f4b323011aa1192d22e283b1efca7155e7fed9a6 Mon Sep 17 00:00:00 2001 From: Dragon Fire Date: Sun, 7 Feb 2021 14:31:16 -0500 Subject: [PATCH] Fix lint --- commands/games-mp/chess.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/commands/games-mp/chess.js b/commands/games-mp/chess.js index 00264729..56905871 100644 --- a/commands/games-mp/chess.js +++ b/commands/games-mp/chess.js @@ -196,7 +196,7 @@ module.exports = class ChessCommand extends Command { if (pawnMoved && choice[1].endsWith(gameState.turn === 'white' ? '8' : '1')) { game.board.configuration.pieces[choice[1]] = gameState.turn === 'white' ? choice[2] - : choice[2].toLowerCase() + : choice[2].toLowerCase(); } if (!Object.keys(game.moves()).length) stalemate = true; } @@ -212,9 +212,11 @@ module.exports = class ChessCommand extends Command { if (fiftyRuleMove > 50) return msg.say('Due to the fifty move rule, this game is a draw.'); const gameState = game.exportJson(); const winner = gameState.turn === 'black' ? whitePlayer : blackPlayer; - if (stalemate) return msg.say('Stalemate! This game is a draw.', { - files: [{ attachment: this.displayBoard(gameState, prevPieces), name: 'chess.png' }] - }); + if (stalemate) { + return msg.say('Stalemate! This game is a draw.', { + files: [{ attachment: this.displayBoard(gameState, prevPieces), name: 'chess.png' }] + }); + } if (!gameState.checkMate) return msg.say('Game ended due to forfeit.'); return msg.say(`Checkmate! Congrats, ${winner}!`, { files: [{ attachment: this.displayBoard(gameState, prevPieces), name: 'chess.png' }]