projects
/
xogo.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix Convert, start Chaining
[xogo.git]
/
base_rules.js
diff --git
a/base_rules.js
b/base_rules.js
index
aea3f57
..
c0d9b60
100644
(file)
--- a/
base_rules.js
+++ b/
base_rules.js
@@
-97,6
+97,14
@@
export default class ChessRules {
return true;
}
return true;
}
+ // Allow to take (moving: not disappearing) own pieces?
+ get hasSelfCaptures() {
+ return (
+ this.options["recycle"] ||
+ (this.options["teleport"] && this.subTurnTeleport == 1)
+ );
+ }
+
get hasReserve() {
return (
!!this.options["crazyhouse"] ||
get hasReserve() {
return (
!!this.options["crazyhouse"] ||
@@
-1720,10
+1728,7
@@
export default class ChessRules {
});
Array.prototype.push.apply(squares, zenCaptures);
}
});
Array.prototype.push.apply(squares, zenCaptures);
}
- if (
- this.options["recycle"] ||
- (this.options["teleport"] && this.subTurnTeleport == 1)
- ) {
+ if (this.hasSelfCaptures) {
const selfCaptures = this.findDestSquares(
[x, y],
{
const selfCaptures = this.findDestSquares(
[x, y],
{