}
getPpath(b) {
- if ([V.LIEUTENANT, V.GENERAL, V.CAPTAIN, V.WARLORD].includes(b[1]))
- return "Spartan/" + b;
+ if (b[0] == 'b' && b[1] != 'k') return "Spartan/" + b;
return b;
}
isAttackedByWarlord(sq) {
return (
- super.isAttackedBySlideNJump(sq, 'b', V.GENERAL,
- V.steps[V.ROOK].concat(V.steps[V.BISHOP]), "oneStep") ||
- super.isAttackedBySlideNJump(sq, 'b', V.GENERAL, V.steps[V.ROOK])
+ super.isAttackedBySlideNJump(
+ sq, 'b', V.WARLORD, V.steps[V.KNIGHT], "oneStep") ||
+ super.isAttackedBySlideNJump(sq, 'b', V.WARLORD, V.steps[V.BISHOP])
);
}