From 5c5e301d6ebb4daeec369af41bb719c020ef1490 Mon Sep 17 00:00:00 2001 From: matixezor Date: Sat, 10 Apr 2021 12:11:14 +0200 Subject: [PATCH] add bfs launch on T key pressed --- src/main.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/main.py b/src/main.py index c4cd2c8..357401c 100644 --- a/src/main.py +++ b/src/main.py @@ -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__":