calculating walkable areas in grid