implemented path finding
This commit is contained in:
parent
9406038dcb
commit
d503ee4f0c
4
main.py
4
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
|
||||
|
Loading…
Reference in New Issue
Block a user