X-Git-Url: https://git.auder.net/?a=blobdiff_plain;f=client%2Fsrc%2Fvariants%2FBall.js;h=fb2172b1f2cd1d4ab3795db4b580a72c821a8c33;hb=ded43c88fad60fd8f9bb46aabd67f3f2092f65f3;hp=5de871d77c6e2611d54390f22699121e89985c37;hpb=4f3a08234f754abcb74f369067f960a8269557a3;p=vchess.git diff --git a/client/src/variants/Ball.js b/client/src/variants/Ball.js index 5de871d7..fb2172b1 100644 --- a/client/src/variants/Ball.js +++ b/client/src/variants/Ball.js @@ -205,8 +205,10 @@ export class BallRules extends ChessRules { if (rem2 == positions[1] % 2) { // Fix bishops (on different colors) for (let i=4; i<9; i++) { - if (positions[i] % 2 != rem2) + if (positions[i] % 2 != rem2) { [positions[1], positions[i]] = [positions[i], positions[1]]; + break; + } } } rem2 = positions[2] % 2;