From 55c3ea0aa82f67ba139c9fad008ed5f08406989c Mon Sep 17 00:00:00 2001 From: korzepadawid Date: Wed, 13 Apr 2022 18:56:39 +0200 Subject: [PATCH] fix: changed sand cost --- algorithms/a_star.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/algorithms/a_star.py b/algorithms/a_star.py index 2400e5a..1b8db00 100644 --- a/algorithms/a_star.py +++ b/algorithms/a_star.py @@ -55,7 +55,7 @@ class Node: if self.grid[self.state.position[0]][self.state.position[1]] == 'g': self.cost = 1 if not self.parent else self.parent.cost + 1 else: - self.cost = 3 if not self.parent else self.parent.cost + 3 + self.cost = 2 if not self.parent else self.parent.cost + 2 self.depth = 0 if not self.parent else self.parent.depth + 1 def __hash__(self) -> int: