implement simple breath-first search(BFS) in lianliankan game