diff --git a/classes/ai.py b/classes/ai.py index 2c90da1..69cabe1 100644 --- a/classes/ai.py +++ b/classes/ai.py @@ -73,7 +73,7 @@ class AI: self.saper.move() def way_controls(self): - if len(self.the_way)>0: + if type(self.the_way) is list and len(self.the_way)>0: way = self.the_way.pop(0) if way=="move": self.saper.move() diff --git a/classes/bfs.py b/classes/bfs.py index dd287e0..7b3edc7 100644 --- a/classes/bfs.py +++ b/classes/bfs.py @@ -171,7 +171,7 @@ class BFS: neighbours_list_of_our_node = self.successor(tmp_node_position) # lista możliwych akcij - #print(neighbours_list_of_our_node) + print(neighbours_list_of_our_node) for node_ in neighbours_list_of_our_node: # jesli pozucja wezla nie jest w fringe i nie jest w visited @@ -179,4 +179,4 @@ class BFS: counter += 1 x = node.Node(tmp_node, node_[0], node_[1]) # action heapq.heappush(fringe, (counter, x)) - self.window.draw_search([self.agent.position_x, self.agent.position_y], [node_[1][0], node_[1][1]]) + self.window.draw_search([self.agent.position_x, self.agent.position_y], [node_[1][0], node_[1][1]], self.agent.current_map.tile_size, self.agent.current_map, self.agent) diff --git a/classes/minesweeper.py b/classes/minesweeper.py index 4c6ba9e..8088d6a 100644 --- a/classes/minesweeper.py +++ b/classes/minesweeper.py @@ -111,11 +111,11 @@ class Map: #od liczby zależy jaki teren, np. 0 - piasek rng = randrange(10) if ok and rng==0 and not (i<2 and j<3): - matrix[i].append(10) + matrix[i].append(10) #kamień elif ok and rng>8 and not (i<2 and j<3): - matrix[i].append(5) + matrix[i].append(5) #trawa elif ok and rng<2 and not (i<2 and j<3): - matrix[i].append(0) + matrix[i].append(0) #piasek rand_rotate = 0#randrange(4)*90 if rand_rotate==0 and j+3