X-Git-Url: https://git.auder.net/?a=blobdiff_plain;f=client%2Fsrc%2Fvariants%2FKnightrelay1.js;h=626519cd9a38784c0048c5ed9f95e70bf9428fe4;hb=2c5d7b20742b802d9c47916915c1114bcfc9a9c3;hp=f032e21e82380ce4928e195545113dbb57ab7bc2;hpb=95a66034082b21e50eff842e26030ce2b6519685;p=vchess.git diff --git a/client/src/variants/Knightrelay1.js b/client/src/variants/Knightrelay1.js index f032e21e..626519cd 100644 --- a/client/src/variants/Knightrelay1.js +++ b/client/src/variants/Knightrelay1.js @@ -5,6 +5,8 @@ export class Knightrelay1Rules extends ChessRules { return false; } + // TODO: IsGoodPosition to check that 2 knights are on the board... + getPotentialMovesFrom([x, y]) { let moves = super.getPotentialMovesFrom([x, y]); @@ -118,7 +120,8 @@ export class Knightrelay1Rules 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 +