public static string ToNotation(this Move move, IPosition pos, EMoveNotation notation = EMoveNotation.Fan) { if (move.IsNullMove()) { return("(none)"); } if (!NotationFuncs.TryGetValue(notation, out var func)) { throw new InvalidMoveException("Invalid move notation detected."); } return(func(move, pos)); }