diff --git a/commands/games-sp/minesweeper.js b/commands/games-sp/minesweeper.js index d6892a0b..5397ccbd 100644 --- a/commands/games-sp/minesweeper.js +++ b/commands/games-sp/minesweeper.js @@ -48,7 +48,7 @@ module.exports = class MinesweeperCommand extends Command { if (!coordPicked) return false; const x = Number.parseInt(coordPicked[1], 10); const y = Number.parseInt(coordPicked[2], 10); - if (x > size || y > size) return false; + if (x > size || y > size || x < 1 || y < 1) return false; if (game.mask[y - 1][x - 1]) return false; return true; };