Move apath to Logic package
This commit is contained in:
parent
9a5f0c4e56
commit
fdc7c90e84
@ -1,6 +1,7 @@
|
|||||||
import numpy as np
|
import numpy as np
|
||||||
from heapq import * # pylint: disable=unused-wildcard-import
|
from heapq import * # pylint: disable=unused-wildcard-import
|
||||||
|
|
||||||
|
|
||||||
class AStarNode():
|
class AStarNode():
|
||||||
|
|
||||||
def __init__(self, parent=None, position=None):
|
def __init__(self, parent=None, position=None):
|
||||||
@ -27,7 +28,6 @@ def a_path(table, start, end):
|
|||||||
# Add the start node
|
# Add the start node
|
||||||
open_list.append(start_node)
|
open_list.append(start_node)
|
||||||
|
|
||||||
|
|
||||||
# Loop until you find the end
|
# Loop until you find the end
|
||||||
i = 0
|
i = 0
|
||||||
while len(open_list) > 0:
|
while len(open_list) > 0:
|
6
main.py
6
main.py
@ -6,9 +6,9 @@ def main():
|
|||||||
# initialize grid
|
# initialize grid
|
||||||
grid = Grid(20, 20)
|
grid = Grid(20, 20)
|
||||||
# initialize window (grid, start,end,mode)
|
# initialize window (grid, start,end,mode)
|
||||||
#mode 1 - random obstacles
|
# mode 1 - random obstacles
|
||||||
#mode 2 - board obstacles
|
# mode 2 - board obstacles
|
||||||
Window(grid,(0,0),(19,19),1)
|
Window(grid, (0, 0), (19, 19), 1)
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
|
Loading…
Reference in New Issue
Block a user