code refactor
This commit is contained in:
parent
b10bfbbbeb
commit
04bbaedb4c
@ -63,10 +63,10 @@ def main():
|
||||
if event.key == pg.K_t:
|
||||
print('Starting to clear the sector')
|
||||
while env.mine_count:
|
||||
print('-'*20)
|
||||
#path, actions = breadth_first_search(env.field, agent.x, agent.y, agent.direction)
|
||||
path, actions = a_star (env.field, agent.x, agent.y, agent.direction,
|
||||
breadth_first_search_for_a_star (env.field, agent.x, agent.y,
|
||||
print('-' * 20)
|
||||
# path, actions = breadth_first_search(env.field, agent.x, agent.y, agent.direction)
|
||||
path, actions = a_star(env.field, agent.x, agent.y, agent.direction,
|
||||
breadth_first_search_for_a_star(env.field, agent.x, agent.y,
|
||||
agent.direction))
|
||||
if not path and not env.field[agent.y][agent.x].mine:
|
||||
print('Unable to find path, rocks are in the way')
|
||||
|
Loading…
Reference in New Issue
Block a user