projects
/
vchess.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix Parachute, allow 3 squares in Ball variant
[vchess.git]
/
client
/
src
/
variants
/
Checkered.js
diff --git
a/client/src/variants/Checkered.js
b/client/src/variants/Checkered.js
index
bca365d
..
ecf2581
100644
(file)
--- a/
client/src/variants/Checkered.js
+++ b/
client/src/variants/Checkered.js
@@
-177,7
+177,7
@@
export class CheckeredRules extends ChessRules {
// Does m2 un-do m1 ? (to disallow undoing checkered moves)
oppositeMoves(m1, m2) {
return (
// Does m2 un-do m1 ? (to disallow undoing checkered moves)
oppositeMoves(m1, m2) {
return (
- m1 &&
+
!!
m1 &&
m2.appear[0].c == "c" &&
m2.appear.length == 1 &&
m2.vanish.length == 1 &&
m2.appear[0].c == "c" &&
m2.appear.length == 1 &&
m2.vanish.length == 1 &&
@@
-303,7
+303,8
@@
export class CheckeredRules extends ChessRules {
}
isAttackedByBishop(sq, colors) {
}
isAttackedByBishop(sq, colors) {
- return this.isAttackedBySlideNJump(sq, colors, V.BISHOP, V.steps[V.BISHOP]);
+ return this.isAttackedBySlideNJump(
+ sq, colors, V.BISHOP, V.steps[V.BISHOP]);
}
isAttackedByQueen(sq, colors) {
}
isAttackedByQueen(sq, colors) {
@@
-337,7
+338,7
@@
export class CheckeredRules extends ChessRules {
"c"
]);
let res = kingAttacked
"c"
]);
let res = kingAttacked
- ? [JSON.parse(JSON.stringify(this.kingPos[color]))]
//need to duplicate!
+ ? [JSON.parse(JSON.stringify(this.kingPos[color]))]
: [];
this.turn = color;
return res;
: [];
this.turn = color;
return res;