fix: the cost of entering water in a-star alg is now 1000.

This commit is contained in:
Adam Mikolajczak 2024-05-10 11:25:50 +02:00
parent c30d6ffc5c
commit 697736d7b5

View File

@ -109,6 +109,8 @@ class Tractor(pygame.sprite.Sprite):
match (self.field.tiles.sprites()[y * 16 + x].type): match (self.field.tiles.sprites()[y * 16 + x].type):
case ('grass'): case ('grass'):
cost = 1 cost = 1
case ('water'):
cost = 1000
case _: case _:
cost = 100 cost = 100
return cost return cost