add bfs launch on T key pressed

This commit is contained in:
matixezor 2021-04-10 12:11:14 +02:00
parent ab447f4594
commit 5c5e301d6e

View File

@ -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__":