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. |
Methods
apply()
Apply changes of this node to board.
clearParentMarks()
Helper method to clear parent node's markers. Created to achieve SGF like
stateless marker behavaior.
revert()
Revert changes of this node to board.
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. |
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. |