diff --git a/Sources/SGFKit/Collection+SGF.swift b/Sources/SGFKit/Collection+SGF.swift index b1ee2d9..fef6c84 100644 --- a/Sources/SGFKit/Collection+SGF.swift +++ b/Sources/SGFKit/Collection+SGF.swift @@ -1,12 +1,12 @@ extension Collection { /// Converts the collection to a SGF text. - func convertToSGF() -> String { + public func convertToSGF() -> String { convertToNonTerminalSymbol().convertToSGF() } /// Converts the collection to non terminal symbols. - func convertToNonTerminalSymbol() -> NonTerminalSymbols.Collection { + public func convertToNonTerminalSymbol() -> NonTerminalSymbols.Collection { let gameTrees = nodes.map { gameTree(from: $0) } return NonTerminalSymbols.Collection(gameTrees: gameTrees) } diff --git a/Sources/SGFKit/Node.swift b/Sources/SGFKit/Node.swift index 5f9bbf2..a823d17 100644 --- a/Sources/SGFKit/Node.swift +++ b/Sources/SGFKit/Node.swift @@ -37,7 +37,7 @@ public final class Node { /// Makes the node. /// - Parameter properties: The property of the node. - public init(properties: [Property]) { + public init(properties: [Property] = []) { self.number = nil self.properties = properties }