);
}
- static GenRandInitFen(randomness) {
- return ChessRules.GenRandInitFen(randomness) + " 0000000000";
+ static GenRandInitFen(options) {
+ return ChessRules.GenRandInitFen(options) + " 0000000000";
}
getFen() {
}
getPotentialDuchessMoves(sq) {
- return super.getSlideNJumpMoves(sq, V.steps[V.BISHOP], "oneStep");
+ return super.getSlideNJumpMoves(sq, V.steps[V.BISHOP], 1);
}
getPotentialCaptainMoves(sq) {
const steps = V.steps[V.ROOK].concat(V.steps[V.BISHOP]);
- return super.getSlideNJumpMoves(sq, steps, "oneStep");
+ return super.getSlideNJumpMoves(sq, steps, 1);
}
getPotentialMortarMoves(sq) {
return (
super.getSlideNJumpMoves(sq, V.steps[V.ROOK])
- .concat(super.getSlideNJumpMoves(sq, V.steps[V.KNIGHT], "oneStep"))
+ .concat(super.getSlideNJumpMoves(sq, V.steps[V.KNIGHT], 1))
);
}
getPotentialGeneralMoves(sq) {
const steps =
V.steps[V.BISHOP].concat(V.steps[V.ROOK]).concat(V.steps[V.KNIGHT]);
- return super.getSlideNJumpMoves(sq, steps, "oneStep");
+ return super.getSlideNJumpMoves(sq, steps, 1);
}
getPotentialArchbishopMoves(sq) {
return (
super.getSlideNJumpMoves(sq, V.steps[V.BISHOP])
- .concat(super.getSlideNJumpMoves(sq, V.steps[V.KNIGHT], "oneStep"))
+ .concat(super.getSlideNJumpMoves(sq, V.steps[V.KNIGHT], 1))
);
}
isAttackedByDuchess(sq, color) {
return (
super.isAttackedBySlideNJump(
- sq, color, V.DUCHESS, V.steps[V.BISHOP], "oneStep")
+ sq, color, V.DUCHESS, V.steps[V.BISHOP], 1)
);
}
isAttackedByCaptain(sq, color) {
const steps = V.steps[V.BISHOP].concat(V.steps[V.ROOK]);
return (
- super.isAttackedBySlideNJump(sq, color, V.DUCHESS, steps, "oneStep")
+ super.isAttackedBySlideNJump(sq, color, V.DUCHESS, steps, 1)
);
}
return (
super.isAttackedBySlideNJump(sq, color, V.MORTAR, V.steps[V.ROOK]) ||
super.isAttackedBySlideNJump(
- sq, color, V.MORTAR, V.steps[V.KNIGHT], "oneStep")
+ sq, color, V.MORTAR, V.steps[V.KNIGHT], 1)
);
}
const steps =
V.steps[V.BISHOP].concat(V.steps[V.ROOK]).concat(V.steps[V.KNIGHT]);
return (
- super.isAttackedBySlideNJump(sq, color, V.GENERAL, steps, "oneStep")
+ super.isAttackedBySlideNJump(sq, color, V.GENERAL, steps, 1)
);
}
super.isAttackedBySlideNJump(sq, color, V.ARCHBISHOP, V.steps[V.BISHOP])
||
super.isAttackedBySlideNJump(
- sq, color, V.ARCHBISHOP, V.steps[V.KNIGHT], "oneStep")
+ sq, color, V.ARCHBISHOP, V.steps[V.KNIGHT], 1)
);
}