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"] ||
['r', 'n', 'b', 'q', 'k', 'b', 'n', 'r'],
{
randomness: this.options["randomness"],
- between: {p1: 'k', p2: 'r'},
+ between: [{p1: 'k', p2: 'r'}],
diffCol: ['b'],
- flags: ['r']
+ flags: ['r', 'k']
}
);
return {
});
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],
{