This is a logical puzzle. You are faced with some frogs sitting in positions as shown. The idea is to swop the positions of the frogs over by following some simple rules: Red frogs can only move to the right. Green frogs can only move to the left. Frogs can either slide into an adjacent empty position, or can hop over one (and only one) frog into the empty space on the other side.
You can move the frogs by clicking on the yellow rectangles underneath.
You will also need to download the pictures of the two frogs, which I have called red.gif and green.gif. Don't change these names as the program will not be able to find the files.
![]() |
To save the picture of the frogs, click the right mouse button over the each frog picture in turn and choose 'Save Picture As' or 'Save Image As'. |
![]() |
Don't forget to keep the names as 'red.gif' and 'green.gif'. |
Occasionally, I find there is a problem when trying to view this program over a rather slow Internet link. One or other of the pictures only loads partially into the program with the result that only part of that picture is displayed. I gather that this is bacause the 'getImage' command in Java sends a command to load in the picture and then returns immediately to get on with the program. By the time the frog has to be displayed on the screen, the picture is only half loaded. I can't think of a solution for this problem other than putting in some artificial delay in the program. If you can think of a way round this, please do let me know: richard.bowles@excite.com. If you find that one of the pictures of the frogs above is incomplete, you should click on Reload or Refresh - that sometimes cures the problem.