wciaz niedzialajacy feature

This commit is contained in:
s464859 2022-04-07 19:32:51 +02:00
parent 039f36fda3
commit 02a833e0c3
3 changed files with 7 additions and 5 deletions

View File

@ -96,7 +96,7 @@ class BFS:
x = node.Node(tmp_node, None, [node_[0], node_[1]]) # action
heapq.heappush(fringe, (counter, x))
self.window.draw_search([self.agent.position_x, self.agent.position_y], [node_[0], node_[1]])
time.sleep(0.01)
#time.sleep(0.01)

View File

@ -45,11 +45,13 @@ class Window:
if self.paused:
self.window.blit(self.pause_menu,(0,0))
pygame.display.update()
self.search.fill(pygame.Color(0,0,0,0))
#self.search.fill(pygame.Color(0,0,0,0))
def draw_search(self, pos1:list=[0,0], pos2:list=[0,0], tile_size:int=64):
self.search.fill(pygame.Color(0,0,0,0))
#self.search.fill(pygame.Color(0,0,0,0))
pos1 = [pos1[0]*tile_size, pos1[1]*tile_size]
pos2 = [pos2[0]*tile_size, pos2[1]*tile_size]
pygame.draw.line(self.search, pygame.Color(255,0,0), pos1, pos2, 1)
pygame.draw.line(self.search, pygame.Color(255,0,0), pos1, pos2, 5)
pygame.display.flip()
self.search.blit(self.window, (0,0))
pygame.display.update()

View File

@ -11,7 +11,7 @@ TILES_X = int(12)
TILES_Y = int(10)
#wł/wył muzyki
MUSIC=False
MUSIC=True
#ustalenie FPS
FPS = 60