X-Git-Url: https://git.auder.net/?p=vchess.git;a=blobdiff_plain;f=client%2Fsrc%2Fvariants%2FEightpieces.js;h=927530c0fae857cbe3d18693488f6027aebe101f;hp=c380610c159c25f5fde4b013a9e18f67ebb47b66;hb=4313762da3237b04f204e121a20cab3ba7bb5dd2;hpb=cee75a57d2f4f89c89d64cefbab55d839a238ed9 diff --git a/client/src/variants/Eightpieces.js b/client/src/variants/Eightpieces.js index c380610c..927530c0 100644 --- a/client/src/variants/Eightpieces.js +++ b/client/src/variants/Eightpieces.js @@ -167,11 +167,11 @@ export class EightpiecesRules extends ChessRules { } } - static GenRandInitFen(randomness) { - if (randomness == 0) + static GenRandInitFen(options) { + if (options.randomness == 0) return "jfsqkbnr/pppppppp/8/8/8/8/PPPPPPPP/JDSQKBNR w 0 ahah - -"; - const baseFen = ChessRules.GenRandInitFen(randomness); + const baseFen = ChessRules.GenRandInitFen(options); const fenParts = baseFen.split(' '); const posParts = fenParts[0].split('/'); @@ -671,10 +671,7 @@ export class EightpiecesRules extends ChessRules { getPotentialKingMoves(sq) { const moves = this.getSlideNJumpMoves( - sq, - V.steps[V.ROOK].concat(V.steps[V.BISHOP]), - "oneStep" - ); + sq, V.steps[V.ROOK].concat(V.steps[V.BISHOP]), 1); return ( this.subTurn == 1 ? moves.concat(this.getCastleMoves(sq))