projects
/
vchess.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix variants with captures forced: castling isn't a capture!
[vchess.git]
/
client
/
src
/
variants
/
Capture.js
diff --git
a/client/src/variants/Capture.js
b/client/src/variants/Capture.js
index
f0782a6
..
d7cc57e
100644
(file)
--- a/
client/src/variants/Capture.js
+++ b/
client/src/variants/Capture.js
@@
-36,7
+36,8
@@
export class CaptureRules extends ChessRules {
getAllValidMoves() {
const moves = super.getAllValidMoves();
getAllValidMoves() {
const moves = super.getAllValidMoves();
- if (moves.some(m => m.vanish.length == 2)) return V.KeepCaptures(moves);
+ if (moves.some(m => m.vanish.length == 2 && m.appear.length == 1))
+ return V.KeepCaptures(moves);
return moves;
}
return moves;
}