+ // Manually add Guard and Mage captures (since cannot move like a Mage)
+ V.steps[V.ROOK].concat(V.steps[V.BISHOP]).forEach(step => {
+ const [i, j] = [x + step[0], y + step[1]];
+ if (
+ V.OnBoard(i, j) &&
+ this.board[i][j] != V.EMPTY &&
+ this.canTake([x, y], [i, j]) &&
+ [V.GUARD, V.MAGE].includes(this.getPiece(i, j))
+ ) {
+ moves.push(this.getBasicMove([x, y], [i, j]));
+ }
+ });