- if (
- move.appear.length == 1 &&
- move.vanish.length == 1 &&
- move.appear[0].c == 'a' &&
- move.vanish[0].c == 'a'
- ) {
- // Bonus replacement:
- return move.appear[0].p.toUpperCase() + "@" + finalSquare;
+ if (move.appear.length == 1 && move.vanish.length == 1) {
+ const moveStart = move.appear[0].p.toUpperCase() + "@";
+ if (move.appear[0].c == 'a' && move.vanish[0].c == 'a')
+ // Bonus replacement:
+ return moveStart + finalSquare;
+ if (
+ move.vanish[0].p == V.INVISIBLE_QUEEN &&
+ move.appear[0].x == move.vanish[0].x &&
+ move.appear[0].y == move.vanish[0].y
+ ) {
+ // Toadette takes invisible queen
+ return moveStart + "Q" + finalSquare;
+ }