X-Git-Url: https://git.auder.net/?p=vchess.git;a=blobdiff_plain;f=client%2Fsrc%2Fvariants%2FBall.js;h=fb2172b1f2cd1d4ab3795db4b580a72c821a8c33;hp=5de871d77c6e2611d54390f22699121e89985c37;hb=5d74fceaa93054b410f469fe6ed4d5a4609bf98d;hpb=5c50b18ebe03fd485ab1e5301a37bec8b14a0ff8 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;