You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
when i tried to extract the board position in a 2d array format using getstone function, every time zero is returned for each and every position irrespective of the stones placed on the board
The text was updated successfully, but these errors were encountered:
Could you provide an example of how you are encountering this issue?
The getStone function is integral to the basic operation of BesoGo. Playing moves, applying the capture rule, and editing the board requires the getStone function to work properly. In order for the board to be properly rendered, the boardDisplay queries the board state via the getStone function.
This is speculation, but are you only calling the getStone function on the reference to the root node of the game tree? That should usually result in returning 0 for every position (unless you have edited the board position in the root node via set stones).
To get the board state for other nodes in the game tree, you need to call the getStone function on those other descendant nodes. Each node in the game tree has a list of its children (if any). Note that as you traverse the game tree via the editor, a reference to the current position in the tree is held in the variable called current. Hope this helps!
when i tried to extract the board position in a 2d array format using getstone function, every time zero is returned for each and every position irrespective of the stones placed on the board
The text was updated successfully, but these errors were encountered: