add bfs launch on T key pressed
This commit is contained in:
parent
ab447f4594
commit
5c5e301d6e
@ -1,9 +1,10 @@
|
||||
import pygame as pg
|
||||
|
||||
from agent import Agent
|
||||
from game_ui import GameUi
|
||||
from const import ICON, IMAGES
|
||||
from environment import Environment
|
||||
from game_ui import GameUi
|
||||
from BFS import breadth_first_search
|
||||
from tilesFactory import TilesFactory
|
||||
|
||||
|
||||
@ -48,6 +49,8 @@ def main():
|
||||
IMAGES[env.field[agent.y][agent.x].number].parent
|
||||
)
|
||||
game_ui.update()
|
||||
elif event.key == pg.K_t:
|
||||
print(breadth_first_search(env.field, 0, 0, (0, 2)))
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
Loading…
Reference in New Issue
Block a user