From d503ee4f0cedb2801cf8ee6c20675415c39f0eba Mon Sep 17 00:00:00 2001 From: Mateusz Date: Wed, 19 Apr 2023 23:53:36 +0200 Subject: [PATCH] implemented path finding --- main.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/main.py b/main.py index 73ebbd7..90191dc 100644 --- a/main.py +++ b/main.py @@ -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