Start of developing DFS Algorithm and tested the which_neighbor function