public MCTSNodeStoreContext(MCTSNodeStore store) { NodeStore = store; PriorContext = curContext; // Update statics curStore = store; curNodes = store.Nodes.nodes; curChildren = store.Children.childIndices; curContext = this; }
public void Dispose() { if (curStore == null) { throw new Exception("Internal error: MCTSNodeStoreContext improperly nested"); } // Update statics if (PriorContext != null) { curStore = PriorContext.NodeStore; curNodes = PriorContext.NodeStore.Nodes.nodes; curChildren = PriorContext.NodeStore.Children.childIndices; } curContext = PriorContext; }