- if (
- move.appear.length >= 2 &&
- [V.HAWK, V.ELEPHANT].includes(move.appear[0].p)
- ) {
- const suffix = "/" + move.appear[0].p.toUpperCase();
- let cmove = JSON.parse(JSON.stringify(move));
- cmove.appear.shift();
- return super.getNotation(cmove) + suffix;
+ if (move.appear.length >= 2) {
+ const pPieceAppear = [V.HAWK, V.ELEPHANT].includes(move.appear[0].p);
+ const nothingAppear = (move.appear[0].p == V.NOTHING);
+ if (pPieceAppear || nothingAppear) {
+ let suffix = "";
+ if (pPieceAppear) suffix = "/" + move.appear[0].p.toUpperCase();
+ let cmove = JSON.parse(JSON.stringify(move));
+ cmove.appear.shift();
+ return super.getNotation(cmove) + suffix;
+ }