if (!this.mobileBrowser && e.which != 3)
// Cancel current drawing and circles, if any
this.cancelResetArrows();
if (!this.mobileBrowser && e.which != 3)
// Cancel current drawing and circles, if any
this.cancelResetArrows();
document.getElementById("boardContainer").getBoundingClientRect();
// NOTE: classList[0] is enough: 'piece' is the first assigned class
const withPiece = (e.target.classList[0] == "piece");
document.getElementById("boardContainer").getBoundingClientRect();
// NOTE: classList[0] is enough: 'piece' is the first assigned class
const withPiece = (e.target.classList[0] == "piece");
// Show possible moves if current player allowed to play
const startSquare =
getSquareFromId(withPiece ? e.target.parentNode.id : e.target.id);
// Show possible moves if current player allowed to play
const startSquare =
getSquareFromId(withPiece ? e.target.parentNode.id : e.target.id);
// Drag'n drop. Selected piece is no longer needed:
this.selectedPiece.parentNode.removeChild(this.selectedPiece);
delete this.selectedPiece;
this.selectedPiece = null;
this.processMoveAttempt(e);
// Drag'n drop. Selected piece is no longer needed:
this.selectedPiece.parentNode.removeChild(this.selectedPiece);
delete this.selectedPiece;
this.selectedPiece = null;
this.processMoveAttempt(e);