I implemented Dijkstra’s algorithm in order to determine how many moves it will take a program to get to a particular grid square. It will be useful both for enemy AI and displaying which squares are within the movement range of a program. It takes obstacles into account.
I made it display the numbers on the grid for illustrative purposes, and to make sure it was working. Each number is how many moves it would take the green slingshot program to get to that square.