Route_planning_bfs #2
Binary file not shown.
Binary file not shown.
@ -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")
|
||||||
|
|
||||||
|
|
||||||
|
@ -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"
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user