- // Does this move turn off a 2-squares pawn flag?
- if ([1, 6].includes(move.start.x) && move.vanish[0].p == V.PAWN)
+ if (
+ [1, 6].includes(move.start.x) &&
+ move.vanish[0].p == V.PAWN &&
+ Math.abs(move.end.x - move.start.x) == 2
+ ) {
+ // This move turns off a 2-squares pawn flag