- .concat([V.CAPTAIN, V.NINJA, V.SAMURAI, V.MONK, V.HORSE, V.LANCE])
+ .concat([V.CAPTAIN, V.NINJA, V.DRAGON, V.MONK, V.HORSE, V.LANCE])
- // In hand initially: captain, ninja, samurai + 2 x monk, horse, lance.
+ // In hand initially: ninja, dragon, 2 x (monk, horse), lance, pawn.
static GenRandInitFen(randomness) {
const baseFen = ChessRules.GenRandInitFen(Math.min(randomness, 1));
return (
baseFen.substr(0, 35) + "3CK3 " +
static GenRandInitFen(randomness) {
const baseFen = ChessRules.GenRandInitFen(Math.min(randomness, 1));
return (
baseFen.substr(0, 35) + "3CK3 " +
- return [V.CAPTAIN, V.NINJA, V.SAMURAI, V.MONK, V.HORSE, V.LANCE];
+ return [V.NINJA, V.DRAGON, V.MONK, V.HORSE, V.LANCE, V.PAWN];
case V.KING: return this.getPotentialKingMoves(sq);
case V.CAPTAIN: return this.getPotentialCaptainMoves(sq);
case V.NINJA: return this.getPotentialNinjaMoves(sq);
case V.KING: return this.getPotentialKingMoves(sq);
case V.CAPTAIN: return this.getPotentialCaptainMoves(sq);
case V.NINJA: return this.getPotentialNinjaMoves(sq);
- const promotionZone = (this.turn == 'w' ? [0, 1, 2] : [5, 6, 7]);
+ const promotionZone = (this.turn == 'w' ? [0, 1] : [7, 6]);
const promotedForm = V.MapUnpromoted[piece];
moves.forEach(m => {
if (promotionZone.includes(m.end.x)) m.appear[0].p = promotedForm;
const promotedForm = V.MapUnpromoted[piece];
moves.forEach(m => {
if (promotionZone.includes(m.end.x)) m.appear[0].p = promotedForm;
this.isAttackedByCaptain(sq, 'w') ||
this.isAttackedByNinja(sq, 'w') ||
this.isAttackedByCaptain(sq, 'w') ||
this.isAttackedByNinja(sq, 'w') ||
this.isAttackedByMonk(sq, 'w') ||
this.isAttackedByHorse(sq, 'w') ||
this.isAttackedByLance(sq, 'w') ||
this.isAttackedByMonk(sq, 'w') ||
this.isAttackedByHorse(sq, 'w') ||
this.isAttackedByLance(sq, 'w') ||
- super.isAttackedBySlideNJump(sq, color, V.SAMURAI, V.steps[V.ROOK]) ||
+ super.isAttackedBySlideNJump(sq, color, V.DRAGON, V.steps[V.ROOK]) ||
- sq, color, V.SAMURAI, V.steps[V.KNIGHT], "oneStep")
+ sq, color, V.DRAGON, V.steps[V.BISHOP], "oneStep")
- if (move.vanish.length > 0) return super.getNotation(move);
+ if (move.vanish.length > 0) {
+ let notation = super.getNotation(move);
+ if (move.vanish[0].p != V.PAWN && move.appear[0].p != move.vanish[0].p)
+ notation += "=" + move.appear[0].p.toUpperCase();
+ return notation;
+ }