added grid graph constructor with ability to use undirected neighbourhood