implemented path finding

This commit is contained in:
Mateusz 2023-04-19 23:53:36 +02:00
parent 9406038dcb
commit d503ee4f0c
1 changed files with 2 additions and 2 deletions

View File

@ -67,8 +67,8 @@ def main():
if event.type == pygame.QUIT:
run = False
#keys_pressed = pygame.key.get_pressed()
steps = bfs(State(None, None, 0, 0, 'E'), 450, 100)
draw_window(agent, fields)
steps = bfs(State(None, None, 0, 0, 'E'), 250, 100)
for interm in steps:
if interm.action == 'LEFT':
agent.direction = (agent.direction - 1) % 4