Class: Node

Node

new Node(jboard, parent, info)

Helper class to store node information, apply and revert changes easily.
Parameters:
Name Type Description
jboard Board Board object to make changes on.
parent Node Parent node or null if no parent.
info Object Node information - ko coordinate, comment, etc.
Source:

Methods

apply()

Apply changes of this node to board.
Source:

clearParentMarks()

Helper method to clear parent node's markers. Created to achieve SGF like stateless marker behavaior.
Source:

revert()

Revert changes of this node to board.
Source:

setMark(c, val)

Helper method to make changes to a board while saving them in the node.
Parameters:
Name Type Description
c Object Coordinate or array of them.
val int Mark.
Source:

setType(c, val)

Helper method to make changes to a board while saving them in the node.
Parameters:
Name Type Description
c Object Coordinate or array of them.
val int Type.
Source: