mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-03 23:36:43 +02:00
Protect against choices in ms that are too high
This commit is contained in:
@@ -48,6 +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 (game.mask[y - 1][x - 1]) return false;
|
||||
return true;
|
||||
};
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "xiao",
|
||||
"version": "126.3.0",
|
||||
"version": "126.3.1",
|
||||
"description": "Your personal server companion.",
|
||||
"main": "Xiao.js",
|
||||
"scripts": {
|
||||
|
||||
Reference in New Issue
Block a user