added virtual nodes for checking if grid is connected with each loop
added virtual nodes for checking if grid is connected with each loop

jacketattack/UnionFindPercolation,jacketattack/UnionFindPercolation