summaryrefslogtreecommitdiff
path: root/path_finding/astar.py
diff options
context:
space:
mode:
authorchzhang <zch921005@126.com>2022-11-12 21:59:41 +0800
committerchzhang <zch921005@126.com>2022-11-12 21:59:41 +0800
commit2984427d2a88445b8388ffcafd94d1b4d7214ff7 (patch)
treee3345f4cfd4f277848d5b5cfbc6f634b25cd4311 /path_finding/astar.py
parenta7c200f79b0e2df2defb74276fd416070b5a2ce9 (diff)
pygame Astar
Diffstat (limited to 'path_finding/astar.py')
-rw-r--r--path_finding/astar.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/path_finding/astar.py b/path_finding/astar.py
index f87f706..213a51b 100644
--- a/path_finding/astar.py
+++ b/path_finding/astar.py
@@ -1,6 +1,7 @@
import pygame
import math
from queue import PriorityQueue
+import time
WIDTH = 800
WIN = pygame.display.set_mode((WIDTH, WIDTH))
@@ -115,6 +116,7 @@ def algorithm(draw, grid, start, end):
open_set_hash = {start}
while not open_set.empty():
+
for event in pygame.event.get():
if event.type == pygame.QUIT:
pygame.quit()