- getPotentialChampionMoves(sq) {
- return this.getSlideNJumpMoves(sq, V.steps[V.CHAMPION], "oneStep");
+ getSlideNJumpMoves(sq, steps, nbSteps) {
+ // "Sliders": at most 3 steps
+ return super.getSlideNJumpMoves(sq, steps, !nbSteps ? 3 : 1);
+ }
+
+ getPotentialPhoenixMoves(sq) {
+ return super.getSlideNJumpMoves(sq, V.steps[V.PHOENIX], 1);
+ }
+
+ getPmove(move) {
+ if (
+ move.vanish.length == 2 &&
+ move.appear.length == 2 &&
+ move.appear[0].c != move.appear[1].c
+ ) {
+ // In-place pass:
+ return {
+ start: move.start,
+ end: move.end
+ };
+ }
+ return null;
+ }
+
+ oppositePasses(m1, m2) {
+ return (
+ m1.start.x == m2.end.x &&
+ m1.start.y == m2.end.y &&
+ m1.end.x == m2.start.x &&
+ m1.end.y == m2.start.y
+ );