projects
/
xogo.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add Discoduel, draft Dobutsu, some code cleaning
[xogo.git]
/
variants
/
Chaining
/
class.js
diff --git
a/variants/Chaining/class.js
b/variants/Chaining/class.js
index
5cd4c1d
..
4ae7208
100644
(file)
--- a/
variants/Chaining/class.js
+++ b/
variants/Chaining/class.js
@@
-20,8
+20,8
@@
export default class ChainingRules extends ChessRules {
return true; //self captures induce chaining
}
return true; //self captures induce chaining
}
- setOtherVariables(fenParsed
, pieceArray
) {
- super.setOtherVariables(fenParsed
, pieceArray
);
+ setOtherVariables(fenParsed) {
+ super.setOtherVariables(fenParsed);
// Stack of "last move" only for intermediate chaining
this.lastMoveEnd = [];
}
// Stack of "last move" only for intermediate chaining
this.lastMoveEnd = [];
}
@@
-75,6
+75,7
@@
export default class ChainingRules extends ChessRules {
);
}
mv.chained = destPiece; //easier (no need to detect it)
);
}
mv.chained = destPiece; //easier (no need to detect it)
+// mv.drag = {c: this.turn, p: initPiece}; //TODO: doesn't work
return mv;
}
return mv;
}
@@
-103,7
+104,7
@@
export default class ChainingRules extends ChessRules {
postPlay(move) {
super.postPlay(move);
postPlay(move) {
super.postPlay(move);
- if (!!move.c
onvert
ed) {
+ if (!!move.c
hain
ed) {
this.lastMoveEnd.push({
x: move.end.x,
y: move.end.y,
this.lastMoveEnd.push({
x: move.end.x,
y: move.end.y,