Route_planning_bfs #2

Merged
s481894 merged 12 commits from Route_planning_bfs into master 2024-04-20 14:51:35 +02:00
4 changed files with 3 additions and 3 deletions
Showing only changes of commit 1ac8500c8f - Show all commits

View File

@ -20,7 +20,7 @@ def main():
pygame.display.update() pygame.display.update()
#getting coordinates of our "goal tile": #getting coordinates of our "goal tile":
tile_index=245 tile_index=127
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})")
@ -73,7 +73,7 @@ def main():
do_actions(tractor, WIN, moves) do_actions(tractor, WIN, moves)
tractor.work_on_field(tile1, d1, p1) tractor.work_on_field(tile1, d1, p1)
time.sleep(15) time.sleep(30)
print("\n") print("\n")

View File

@ -44,7 +44,7 @@ class Tile:
self.image = "resources/images/dirt.png" self.image = "resources/images/dirt.png"
self.photo = "resources/images/background.jpg" self.photo = "resources/images/background.jpg"
ground = self.ground ground = self.ground
if ground.obstacle: if ground.obstacle and (self.x, self.y) != (170,100): #warunek po and do zmiany
self.image = "resources/images/rock_dirt.png" self.image = "resources/images/rock_dirt.png"