Address eslint

This commit is contained in:
2021-12-11 18:08:02 +01:00
parent 9e8b633447
commit 7788aea805
2 changed files with 5 additions and 17 deletions

View File

@@ -20,6 +20,7 @@ class Backend {
this.config.makeMove(move); this.config.makeMove(move);
} }
getAvailableMoves(position) { getAvailableMoves(position) {
position;
return []; return [];
} }
} }
@@ -39,7 +40,9 @@ class Chess {
this.configVis.configuration = config; this.configVis.configuration = config;
this.configVis.draw(this.canvas); this.configVis.draw(this.canvas);
} }
showAvailableMoves(canMoveTo) {} showAvailableMoves(canMoveTo) {
canMoveTo;
}
click(ev) { click(ev) {
if (this.moveSource === null) { if (this.moveSource === null) {
this._firstClick(ev); this._firstClick(ev);
@@ -68,21 +71,6 @@ class Chess {
} }
} }
class Move {
constructor(kind, from, to) {
this.kind = kind;
this.from = from;
this.to = to;
}
}
class Piece {
constructor(piece_type, color) {
this.piece_type = piece_type;
this.color = color;
}
}
class Configuration { class Configuration {
constructor(board) { constructor(board) {
this.board = new Map(board); this.board = new Map(board);

View File

@@ -142,7 +142,7 @@ export class ConfigVis {
} }
} }
undraw() { undraw() {
for (let [position, pv] of this.piecesVis) { for (let pv of this.piecesVis.values()) {
pv.undraw(); pv.undraw();
} }
this.piecesVis.clear(); this.piecesVis.clear();