Forum > Games

Leap Frogs Logic Game now with Variable Size

<< < (4/5) > >>

Sorry KodeZwerg, I added to new code to the source while hovering over and playing with 4 other graphics related Lazarus projects until late at night (hmm ....early morning = 1 am) and realized next morning after your reply that your code was in fact the move types coding I was interested in. Kinda of a brain fuzz due to too many fun things to play around with ("a case of too much candy all at once").  I will definitely try out your new suggestions.

Been having fun with the Lazarus graphics and trying out new things (stepping out of my comfort zone).
Also been trying out Code Typhon and the Lazarus converter, just to see the difference between the 2 Pascal Programming Environments.

Updated: Added the following for types of moves

--- Code: Pascal  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---  if (abs(Current - Empty) = 1) then  how := 'Slided from ';  if (abs(Current - Empty) > 1) then  how := 'Jumped from ';   Memo1.Lines.AddStrings(how + IntToStr(Current) + ' to ' + IntToStr(Empty) );
Slided from 1 to 2
Jumped from 3 to 1
Slided from 4 to 3
Jumped from 2 to 4
Jumped from 0 to 2
Slided from 1 to 0
Jumped from 3 to 1
Slided from 2 to 3

Now have jumps and slides. Yay. Hipee. Horray!

Got me thinking, how to replay the moves or do the solution (going back the other way). More to play around with.

As always, many thanks KodeZwerg.

I am unsure if it is for use of you, but I've slightly updated a little more.
- undo possibility
- 3 different displays for clicks moves and undo

Added a replay method, enjoy!

//updated "video" to a full length version

Replay does only show the valid moves, every undo action is not recorded.
If you also want that, consider creating a second array of TMoves that capture everything.

If no bugs reported, this is my final version.
Added a CheckLost method to tell that user needs to undo or begin a new game.

Enjoy the puzzle at high levels!  :P

KodeZwerg, once again a great many thanks.

I was always interested in how to do undo and redo. I will needed to look at your code carefully.

Take care buddy.

Here in Australia we are having a heat wave today.
Kind of crazy weather, considering December and January was cold/rainy on some of the days.
Usually it is always a heat wave.


[0] Message Index

[#] Next page

[*] Previous page

Go to full version