-
-
-
- }
-
- postPlay(move) {
- if (
- move.vanish.length > 0 &&
- move.vanish[0].p == 's' &&
- move.appear[0].c != move.vanish[0].c
- ) {
- // Sentry push ("capturing" part)
- this.pushFrom = {x: move.end.x, y: move.end.y};
- this.pushedTo = {x: -1, y: -1};
- }
- else if (move.vanish.length > 0 && move.vanish[0].c != this.turn)
- this.pushedTo = {x: move.end.x, y: move.end.y};
- else {
- // All other cases: just reset both push variables
- this.pushFrom = {x: -1, y: -1};
- this.pushedTo = {x: -1, y: -1};
- }
- super.postPlay(move);
- }
-
- isLastMove(move) {
- if (move.vanish[0].p == 's' && move.appear[0].c != move.vanish[0].c)
- return false;
- return super.isLastMove(move);