This is chat noir like game on ios.The logic that drives this game is DFS,Depth first search.