make things faster/cleaner
This commit is contained in:
parent
11604338e8
commit
072ba02831
@ -209,7 +209,7 @@ class Grid:
|
||||
openNodes[pos_from] = (0, pos_from.getDistanceTo(pos_to), None)
|
||||
heappush(f_costs, (0, pos_from))
|
||||
|
||||
while openNodes:
|
||||
while f_costs:
|
||||
_, currentCoord = heappop(f_costs)
|
||||
if currentCoord not in openNodes:
|
||||
continue
|
||||
|
||||
Loading…
Reference in New Issue
Block a user