C# labyrinth depth search and breadth search