X-Git-Url: https://git.auder.net/?p=vchess.git;a=blobdiff_plain;f=client%2Fsrc%2Fvariants%2FAvalanche.js;h=40a4393874e03eb99c579e6ad7c4a4ac4b05c602;hp=17e21380dc73cb07493c724e895c858fd52dc048;hb=4313762da3237b04f204e121a20cab3ba7bb5dd2;hpb=cee75a57d2f4f89c89d64cefbab55d839a238ed9 diff --git a/client/src/variants/Avalanche.js b/client/src/variants/Avalanche.js index 17e21380..40a43938 100644 --- a/client/src/variants/Avalanche.js +++ b/client/src/variants/Avalanche.js @@ -340,6 +340,7 @@ export class AvalancheRules extends ChessRules { this.play(moves[3]); //HACK... 3 = queen index const res = this.getComputerMove(); this.undo(moves[3]); + if (Array.isArray(res)) return [moves[3]].concat(res); return [moves[3], res]; } // subTurn == 1 (necessarily)