mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-20 21:44:48 +02:00
Fix
This commit is contained in:
@@ -66,8 +66,8 @@ module.exports = class DomineeringCommand extends Command {
|
||||
if (pick.toLowerCase() === 'end') return true;
|
||||
const coordPicked = pick.match(turnRegex);
|
||||
if (!coordPicked) return false;
|
||||
const x = Number.parseInt(coordPicked[2], 10);
|
||||
const y = Number.parseInt(coordPicked[3], 10);
|
||||
const x = Number.parseInt(coordPicked[1], 10);
|
||||
const y = Number.parseInt(coordPicked[2], 10);
|
||||
if (x > size || y > size || x < 1 || y < 1) return false;
|
||||
if (!possibleMoves.includes(`${x - 1},${y - 1}`)) return false;
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user