Added general bfs algorithm. Improved centering gametree.