X-Git-Url: https://git.auder.net/?a=blobdiff_plain;f=client%2Fsrc%2Fvariants%2FRecycle.js;h=bf252632241c8ca04483a62cbb5511673b9c25aa;hb=bc0b9205e41c5db0552e4ccf060b945342e36ed0;hp=0579de7ade5796ff192d44e4ae5cabaaf8f482ad;hpb=2c5d7b20742b802d9c47916915c1114bcfc9a9c3;p=vchess.git diff --git a/client/src/variants/Recycle.js b/client/src/variants/Recycle.js index 0579de7a..bf252632 100644 --- a/client/src/variants/Recycle.js +++ b/client/src/variants/Recycle.js @@ -144,12 +144,13 @@ export class RecycleRules 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); }