github.com/gorgonia/agogo@v0.1.1/mcts/unsafe_unsafe.go (about) 1 // +build unsafe 2 3 package mcts 4 5 // nodeFromNaughty gets the node given the pointer. 6 func (t *MCTS) nodeFromNaughty(ptr naughty) *Node { 7 retVal := &t.nodes[int(ptr)] 8 return retVal 9 } 10 11 // Children returns a list of children 12 func (t *MCTS) Children(of naughty) []naughty { 13 retVal := t.children[of] 14 return retVal 15 }