Browse Source

Strategická: Sjednocení pořadí směrů

master
David Klement 2 years ago
parent
commit
3f8bf82848
  1. 2
      klient/strategy.py

2
klient/strategy.py

@ -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:

Loading…
Cancel
Save