bool PlaceWall(MazeNode node1, MazeNode node2)
 {
     if (node1.enemyOccupied || node2.enemyOccupied || node1 == playerNode || node2 == playerNode) {
         return false;
     }
     node1.DisconnectFromNode(node2);
     if (AgentSearch(node1, 0, mode: SearchUseMode.checkExitPath)) {
         return true;
     }
     node1.ConnectToNode(node2);
     return false;
 }