Google interview question

Some game which basically could be solved by BFS/DFS traversal