bfs bug fixed
This commit is contained in:
parent
3b0c388a1e
commit
cd4b714090
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -170,8 +170,8 @@ def get_moves(elem):
|
|||||||
while (elem.get_parent() != None):
|
while (elem.get_parent() != None):
|
||||||
move_list.append(elem.get_action())
|
move_list.append(elem.get_action())
|
||||||
elem = elem.get_parent()
|
elem = elem.get_parent()
|
||||||
move_list.reverse()
|
move_list.reverse()
|
||||||
return move_list
|
return move_list
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -21,7 +21,7 @@ def main():
|
|||||||
pygame.display.update()
|
pygame.display.update()
|
||||||
|
|
||||||
#getting coordinates of a certain tile - test:
|
#getting coordinates of a certain tile - test:
|
||||||
tile_index=2
|
tile_index=22
|
||||||
tile_x, tile_y = get_tile_coordinates(tile_index)
|
tile_x, tile_y = get_tile_coordinates(tile_index)
|
||||||
if tile_x is not None and tile_y is not None:
|
if tile_x is not None and tile_y is not None:
|
||||||
print(f"Coordinates of tile {tile_index} are: ({tile_x}, {tile_y})")
|
print(f"Coordinates of tile {tile_index} are: ({tile_x}, {tile_y})")
|
||||||
|
Loading…
Reference in New Issue
Block a user