|
@ -210,7 +210,7 @@ def pathfind(member: Member, goal: Field) -> Direction: |
|
|
# a také jednoduše získat první krok |
|
|
# a také jednoduše získat první krok |
|
|
explored: Set[Field] = set() |
|
|
explored: Set[Field] = set() |
|
|
queue = collections.deque([goal]) |
|
|
queue = collections.deque([goal]) |
|
|
dirs = [Direction.UP, Direction.DOWN, Direction.LEFT, Direction.RIGHT] |
|
|
dirs = [Direction.UP, Direction.LEFT, Direction.DOWN, Direction.RIqGHT] |
|
|
while queue: |
|
|
while queue: |
|
|
field = queue.popleft() |
|
|
field = queue.popleft() |
|
|
for direction in dirs: |
|
|
for direction in dirs: |
|
|