The objective of the game is to stop the frog from reaching the outside area of the pond, the beach, by sinking lily pads around it. The frog begins in the middle lily pad and is surrounded by an offset grid (probably 9x9) of lily pads to jump on. The game would be turn by turn, first you click a lily pad, it sinks, and the frog must then recompute the shortest path to the shore, jump ONE lily pad, and wait for the player to again select a lily pad to sink, and so on.
X X X X X X X X X
X X X X X X X X X
X X X X X X X X X
X X X X X X X X X
X X X X O X X X X
X X X X X X X X X
X X X X X X X X X
X X X X X X X X X
X X X X X X X X X
I'm just looking for some guidance on how I can program the frog to compute the shortest path to the shoreline based upon the existing lily pads. I've heard of Dijkstra's alrogrithm and looked at the code but I'm having trouble relating network protocols to my game. I'm not looking for any exact answers or anything like that, just some simple guidance on how I can get started on this problem.
Thanks!
Edited by korinkoj1, 24 October 2011 - 11:43 PM.











