Hello! I use astar for sokoban game. I must to subtract one for start position and target position for search path and must add one by everyone path point for use in transform.
astar.solve(player_position.x - 1, player_position.y - 1, target.x - 1, target.y - 1)new_position = {path.x + 1, path.y + 1}
I thinks good practice convert start index at one, like lua.
Hello! I use astar for sokoban game. I must to subtract one for start position and target position for search path and must add one by everyone path point for use in transform.
astar.solve(player_position.x - 1, player_position.y - 1, target.x - 1, target.y - 1)
new_position = {path.x + 1, path.y + 1}
I thinks good practice convert start index at one, like lua.