projects
/
vchess.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix too fast copy-paste from Paco-Sako
[vchess.git]
/
client
/
src
/
variants
/
Ball.js
diff --git
a/client/src/variants/Ball.js
b/client/src/variants/Ball.js
index
5de871d
..
8f6493a
100644
(file)
--- a/
client/src/variants/Ball.js
+++ b/
client/src/variants/Ball.js
@@
-137,7
+137,7
@@
export class BallRules extends ChessRules {
const withPrefix =
Object.keys(V.HAS_BALL_DECODE)
.concat([V.PHOENIX])
const withPrefix =
Object.keys(V.HAS_BALL_DECODE)
.concat([V.PHOENIX])
- .concat(['a'
]);
+ .concat(['a'
, 'w']); //TODO: 'w' for backward compatibility - to remove
if (withPrefix.includes(b[1])) prefix = "Ball/";
return prefix + b;
}
if (withPrefix.includes(b[1])) prefix = "Ball/";
return prefix + b;
}
@@
-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 (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]];
[positions[1], positions[i]] = [positions[i], positions[1]];
+ break;
+ }
}
}
rem2 = positions[2] % 2;
}
}
rem2 = positions[2] % 2;