movement_planning #2
4
main.py
4
main.py
@ -67,8 +67,8 @@ def main():
|
|||||||
if event.type == pygame.QUIT:
|
if event.type == pygame.QUIT:
|
||||||
run = False
|
run = False
|
||||||
#keys_pressed = pygame.key.get_pressed()
|
#keys_pressed = pygame.key.get_pressed()
|
||||||
|
draw_window(agent, fields)
|
||||||
steps = bfs(State(None, None, 0, 0, 'E'), 450, 100)
|
steps = bfs(State(None, None, 0, 0, 'E'), 250, 100)
|
||||||
for interm in steps:
|
for interm in steps:
|
||||||
if interm.action == 'LEFT':
|
if interm.action == 'LEFT':
|
||||||
agent.direction = (agent.direction - 1) % 4
|
agent.direction = (agent.direction - 1) % 4
|
||||||
|
Loading…
Reference in New Issue
Block a user