Dijkstra’s Algorithm

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.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s