Not sure why others are getting errors. I compiled on Lazarus 32bit, and ran the program on Windows 10 probably 60 times and did not get any errors. Included is an animated gif of it working.
For those who did not pick up the pattern, have Red,Blue,Red,Blue,Red, etc. always alternating in that exact order.
I was going to do KodeZwerg's autosizing type coding, but wanted to get the game working for different sizes using a dynamic array. Actually there are 2 arrays one for the frogs shapes and the other for the positions. Perhaps the positions array needs to be freed, as I only freed the frogs shape array. I have only tested this on Windows 10, compiling with Lazarus 32bit compiler. I am kinda interested to find out why others are getting errors. Also maybe got to do with different operating systems?
Attached is an animated gif showing it working. Because I knew the pattern to the solution Red,Blue,Red,Blue,Red, etc., it was not that hard for me to swap the red and blue shapes to opposite sides.
The total number of moves is (numREDShapes + 1) squared - 1
There is also a pattern to the types of moves: slide jump slide jump jump slide jump jump jump slide etc
The jumps increase by one separated by one slide each time.