return true;
}
- hoverHighlight(x, y) {
+ hoverHighlight([x, y]) {
if (this.subTurn == 1) return false;
const L = this.firstMove.length;
const fm = this.firstMove[L-1];
let notation = undefined;
if (piece == V.PAWN) {
// Pawn move
- if (move.vanish.length >= 2) {
+ if (this.board[move.end.x][move.end.y] != V.EMPTY) {
// Capture
const startColumn = V.CoordToColumn(move.start.y);
notation = startColumn + "x" + finalSquare;
else {
notation =
piece.toUpperCase() +
- (move.vanish.length >= 2 ? "x" : "") +
+ (this.board[move.end.x][move.end.y] != V.EMPTY ? "x" : "") +
finalSquare;
}
if (!!move.end.effect) {