Address eslint
This commit is contained in:
@@ -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);
|
||||||
|
|||||||
@@ -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();
|
||||||
|
|||||||
Reference in New Issue
Block a user