Z
const figuresClasses = ['pawn', 'rook', 'bishop', 'knight', 'queen', 'king'];
for (let key of figuresClasses) {
if (this.table.rows[this.end.y].cells[this.end.x].classList.contains(key)) {
this.table.rows[this.end.y].cells[this.end.x].classList.remove(key)
}
if (this.field[this.start.y][this.start.x].name === key) {
this.table.rows[this.start.y].cells[this.start.x].classList.remove(key);
this.table.rows[this.end.y].cells[this.end.x].classList.add(key);
}
}


