X-Git-Url: https://git.auder.net/?a=blobdiff_plain;f=client%2Fsrc%2Fvariants%2FDynamo.js;h=35c41c58a81a4fc0b4f9f49b5a175c62b924347e;hb=26580d874deaea68cfb1b926549b1ee2720e9ec9;hp=dbc19c21f32f02d23640de6e4618f42ac924eeba;hpb=a9e1202b681d9d2f814767180183a0b04c58f8ab;p=vchess.git diff --git a/client/src/variants/Dynamo.js b/client/src/variants/Dynamo.js index dbc19c21..35c41c58 100644 --- a/client/src/variants/Dynamo.js +++ b/client/src/variants/Dynamo.js @@ -2,6 +2,7 @@ import { ChessRules, Move, PiPo } from "@/base_rules"; import { randInt } from "@/utils/alea"; export class DynamoRules extends ChessRules { + // TODO? later, allow to push out pawns on a and h files static get HasEnpassant() { return false; @@ -766,6 +767,8 @@ export class DynamoRules extends ChessRules { play(move) { move.flags = JSON.stringify(this.aggregateFlags()); V.PlayOnBoard(this.board, move); + // NOTE; if subTurn == 1, there may be no available moves at subTurn == 2. + // However, it's quite easier to wait for a user click. if (this.subTurn == 2) { const L = this.firstMove.length; this.amoves.push(this.getAmove(this.firstMove[L-1], move)); @@ -873,4 +876,5 @@ export class DynamoRules extends ChessRules { return initialSquare + "R"; return move.appear[0].p.toUpperCase() + initialSquare + finalSquare; } + };