From e5df490041d795e7059e7029dafd10eb54896dcf Mon Sep 17 00:00:00 2001 From: ppeloton Date: Fri, 22 Mar 2024 07:14:05 +0200 Subject: [PATCH] #319: add null move functionality: code review fixes --- src/chess.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/chess.ts b/src/chess.ts index 0e551f7..f64453b 100644 --- a/src/chess.ts +++ b/src/chess.ts @@ -101,7 +101,7 @@ const FLAGS: Record = { PROMOTION: 'p', KSIDE_CASTLE: 'k', QSIDE_CASTLE: 'q', - NULL_MOVE: 'nm', + NULL_MOVE: '-', } // prettier-ignore @@ -1982,7 +1982,7 @@ export class Chess { } else if (move.flags & BITS.QSIDE_CASTLE) { output = 'O-O-O' } else if (move.flags & BITS.NULL_MOVE){ - output = SAN_NULLMOVE + return SAN_NULLMOVE } else { if (move.piece !== PAWN) { const disambiguator = getDisambiguator(move, moves)