feat: Made it so tables block movement

This commit is contained in:
Jager72 2024-04-15 22:39:31 +02:00
parent e168f6d617
commit 976de19d18
2 changed files with 2 additions and 1 deletions

2
app.py
View File

@ -89,7 +89,7 @@ def get_neighbors(cell, cells):
#Wpisujemy miejsce w ktorym znajduje sie agent i miejsce docelowe do funkcji znajdujacej najkrotsza sciezke
start_cell = cells[5][5]
target_cell = cells[11][7]
target_cell = cells[9][11]
shortest_path = bfs(start_cell, target_cell, cells)

View File

@ -8,6 +8,7 @@ class Table(Interactable):
super().__init__(cell, sprite)
self.sprite = pygame.image.load(sprite).convert_alpha()
self.sprite = pygame.transform.scale(self.sprite, (prefs.CELL_SIZE, prefs.CELL_SIZE))
cell.blocking_movement = True
self.name = name
def interact(self,agent):