X-Git-Url: https://git.auder.net/?a=blobdiff_plain;f=client%2Fsrc%2Fvariants%2FKnightrelay2.js;h=a8a796e856f9315982661d12ce6ae25d64ade0ae;hb=7e8a7ea1cb66adb4a987badfb0a3c2f99a21bd0a;hp=0fc6c331f48bfa1f39ef22ddd470db2654056ec2;hpb=32f6285ee325a14286562a53baefc647201df2af;p=vchess.git diff --git a/client/src/variants/Knightrelay2.js b/client/src/variants/Knightrelay2.js index 0fc6c331..a8a796e8 100644 --- a/client/src/variants/Knightrelay2.js +++ b/client/src/variants/Knightrelay2.js @@ -1,6 +1,7 @@ import { ChessRules } from "@/base_rules"; export class Knightrelay2Rules extends ChessRules { + getPotentialMovesFrom([x, y]) { let moves = super.getPotentialMovesFrom([x, y]); @@ -101,7 +102,8 @@ export class Knightrelay2Rules extends ChessRules { const finalSquare = V.CoordsToSquare(move.end); const piece = this.getPiece(move.start.x, move.start.y); - // Since pieces and pawns could move like knight, indicate start and end squares + // Since pieces and pawns could move like knight, + // indicate start and end squares let notation = piece.toUpperCase() + initSquare + @@ -119,4 +121,5 @@ export class Knightrelay2Rules extends ChessRules { return notation; } + };