diff --git a/project_constants.py b/project_constants.py index 0d92497..dbbb3ee 100644 --- a/project_constants.py +++ b/project_constants.py @@ -17,7 +17,7 @@ V_NAME_OF_WINDOW = "MineFusion TM" DIR_ASSETS = os.path.join("resources", "assets") V_FPS = 60 -ACTION_INTERVAL = 0.5 # interval between two actions in seconds +ACTION_INTERVAL = 0.75 # interval between two actions in seconds V_TILE_SIZE = 60 V_GRID_VER_TILES = 10 # vertical (number of rows) @@ -71,9 +71,9 @@ class Coords(Enum): class Terrain(Enum): - CONCRETE = 1 - GRASS = 2 - MUD = 4 + CONCRETE = 2 + GRASS = 4 + MUD = 8 # =============== # diff --git a/searching_algorithms/a_star.py b/searching_algorithms/a_star.py index 302c2b9..d7ddfd9 100644 --- a/searching_algorithms/a_star.py +++ b/searching_algorithms/a_star.py @@ -31,13 +31,12 @@ def get_node_cost(node: Node, minefield: Minefield): row = node.state.row column = node.state.column - # Rotation Cost?? if node.action != Action.GO: return node.parent.cost + 1 # if Tile considered its mine in cost calculation, this code would be priettier if minefield.matrix[row][column].mine is not None: - return node.parent.cost + 10 + return node.parent.cost + 100 else: return node.parent.cost + minefield.matrix[row][column].cost.value