diff --git a/Sources/SGFKit/Collection.swift b/Sources/SGFKit/Collection.swift index f6ebf0b..925e447 100644 --- a/Sources/SGFKit/Collection.swift +++ b/Sources/SGFKit/Collection.swift @@ -35,7 +35,7 @@ public final class Collection { } } -extension Collection: NodeDelegate { +extension Collection: NodeProtocol { var number: Int? { -1 } diff --git a/Sources/SGFKit/Node.swift b/Sources/SGFKit/Node.swift index a711f6c..cdf7aa6 100644 --- a/Sources/SGFKit/Node.swift +++ b/Sources/SGFKit/Node.swift @@ -1,4 +1,4 @@ -protocol NodeDelegate: AnyObject { +protocol NodeProtocol: AnyObject { associatedtype Game: SGFKit.Game var number: Int? { get } @@ -20,7 +20,7 @@ public final class Node { /// The parent node of this node. public var parentNode: (Node)? { parent as? Node } - weak var parent: (any NodeDelegate)? + weak var parent: (any NodeProtocol)? /// The children of the node. /// @@ -101,7 +101,7 @@ public final class Node { } } -extension Node: NodeDelegate { +extension Node: NodeProtocol { func node(treeStructureDidUpdated index: Int?) { parent?.node(treeStructureDidUpdated: index) }