diff options
author | Florian Jung <flo@windfisch.org> | 2015-08-21 17:04:01 +0200 |
---|---|---|
committer | Florian Jung <flo@windfisch.org> | 2015-08-21 17:04:01 +0200 |
commit | c4104a5cd33275c0ae79530e182c4538c9d3f2f3 (patch) | |
tree | 9642d5be4bfedeb21974e669c0b24bd2d1bc41e2 /pathfinding.py | |
parent | b88f390df3bc48059149c8d8ac8172527ccd54b6 (diff) |
8-connected graph instead of 4-connected
Diffstat (limited to 'pathfinding.py')
-rw-r--r-- | pathfinding.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/pathfinding.py b/pathfinding.py index ce3ab8e..2b6a7aa 100644 --- a/pathfinding.py +++ b/pathfinding.py @@ -22,7 +22,7 @@ class Node: def siblings(point,grid): x,y = point.point_in_grid - links = [grid[d[0]][d[1]] for d in [(x-1, y),(x,y - 1),(x,y + 1),(x+1,y)]] + links = [grid[d[0]][d[1]] for d in [(x-1, y),(x-1,y-1),(x,y - 1),(x+1,y-1),(x+1,y),(x+1,y+1),(x,y + 1),(x-1,y+1)]] return [link for link in links if link.value != None] def distance(point,point2): |