X-Git-Url: https://git.auder.net/?p=vchess.git;a=blobdiff_plain;f=client%2Fsrc%2Fvariants%2FCrazyhouse.js;h=8e619743116d489ddd9bf360030e19ffb9ff389e;hp=a133b275703773f5e772b00b2c7797eca4b604fe;hb=0e0010227e46acb7774d134c9aa345eaa0c4404d;hpb=e28faeddfea0ce4416e863d5785e81ae98f13b29 diff --git a/client/src/variants/Crazyhouse.js b/client/src/variants/Crazyhouse.js index a133b275..8e619743 100644 --- a/client/src/variants/Crazyhouse.js +++ b/client/src/variants/Crazyhouse.js @@ -173,12 +173,13 @@ export class CrazyhouseRules extends ChessRules { } getAllValidMoves() { - let moves = super.getAllValidMoves(); + let moves = super.getAllPotentialMoves(); const color = this.turn; - for (let i = 0; i < V.RESERVE_PIECES.length; i++) + for (let i = 0; i < V.RESERVE_PIECES.length; i++) { moves = moves.concat( this.getReserveMoves([V.size.x + (color == "w" ? 0 : 1), i]) ); + } return this.filterValid(moves); }