+ if (!!m1.end.illegal && !m2.end.illegal) remain = { c: 'w', p: p1 };
+ else if (!!m2.end.illegal && !m1.end.illegal) remain = { c: 'b', p: p2 };
+ if (!remain) {
+ // Either both are illegal or both are legal
+ if (p1 == V.KNIGHT && p2 == V.PAWN) remain = { c: 'w', p: p1 };
+ else if (p2 == V.KNIGHT && p1 == V.PAWN) remain = { c: 'b', p: p2 };
+ // If remain is still null: same type same risk, both disappear
+ }
+ if (!!remain) {