X-Git-Url: https://git.auder.net/?a=blobdiff_plain;f=client%2Fsrc%2Fvariants%2FHamilton.js;h=f8669b7ed4f5239ad421cd45b5264a1b48313625;hb=b2e8c34e0158f512741d67b8a1c25425e0b8747e;hp=69dd9e5c7118531ba8f2be5a6b6502ce1e7b18a7;hpb=e50a802531b99829c533f22ecd21e359e7e1e049;p=vchess.git diff --git a/client/src/variants/Hamilton.js b/client/src/variants/Hamilton.js index 69dd9e5c..f8669b7e 100644 --- a/client/src/variants/Hamilton.js +++ b/client/src/variants/Hamilton.js @@ -2,6 +2,7 @@ import { ChessRules, Move, PiPo } from "@/base_rules"; import { randInt } from "@/utils/alea"; export class HamiltonRules extends ChessRules { + static get HasFlags() { return false; } @@ -18,7 +19,7 @@ export class HamiltonRules extends ChessRules { return "xx"; } - hoverHighlight(x, y) { + hoverHighlight() { return this.movesCount == 0; } @@ -137,6 +138,9 @@ export class HamiltonRules extends ChessRules { for (let psq of move.appear) board[psq.x][psq.y] = psq.c + psq.p; } + postPlay() {} + postUndo() {} + getCheckSquares() { return []; } @@ -158,4 +162,5 @@ export class HamiltonRules extends ChessRules { // First game move: return "N@" + V.CoordsToSquare(move.end); } + };