wciaz niedzialajacy feature
This commit is contained in:
parent
039f36fda3
commit
02a833e0c3
@ -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)
|
||||
|
||||
|
||||
|
||||
|
@ -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()
|
Loading…
Reference in New Issue
Block a user