Hey guys,

I am doing a game like Perilous Path, here’s a link showing the game

. So what I did was I am generating a 6x6 grid of buttons.I am assigning randomly 10 buttons with “mines” and assigning randomly 2 buttons with stars representing the buttons that have to be connected.I want to implement a scoring system, i want to use some sort of algorithm that will calculate the shortest path between the “star” buttons, then compare that shortest path with the path the user made by playing the game.Can anyone point me in the right direction, I’ve read a bit about A* but is that the right approach to find the shortest path between two buttons?Btw the algorithm should take the mines into consideration too, so when it calculates the path it should avoid the buttons assigned with mines. Any help would be appreciated.

Thanks in advance