This site requires JavaScript, please enable it in your browser!
Greenfoot back

danpost's Comments

Back to danpost's profile

Evidently, Greenfoot does not like 'Greenfoot.start();' within a reset (at least in this case). I commented out the line and the freezing of the scenario went away. I added a header screen and did not have that statement in my version.
OK. Yes, the 'Run' button is doing what I asked; however, the 'Reset' button now freezes the scenario. Not sure why, yet!
I guess you are NOT saying there is a problem with the code. Just that people are stopping or not able to solve (which I doubt) at that point. Probably just checking out the scenario more than anything (like me -- I went up to level 8, I think). UserInfo functions seem to be working OK. Good job!
Now, for a bit of a challenge, try to make it so after it is solved, just clicking on the 'Run' button brings up the menu again (if not solved, it should let the user continue to solve the current puzzle). BTW, I know that just clicking on the 'Reset' button brings up the menu, but it could, instead, start with a title screen.
Much better! Looks like it solves every time now. Good job!
@Codex, above and to the right of the scenario window, you will see a large green button that says 'Open in Greenfoot'. Click on it to download the scenario. Move the scenario to a place you can read-write (your 'scenarios' folder would be the appropriate place). Then open that file up while running Greenfoot. You can open the source for the classes and view the code.
I do not think you can randomly place the pieces of the puzzle anywhere and be able to solve it every time. You probably should create the puzzle in the solved position; then, make a bunch of random moves to mix it up. Then, it will always be solvable.
I posted some code in a new Discussion called "On 'platfoms of meh by steved'". I hope it helps.
What do you mean? Are you asking me? If you are referring to my Discussion post, everything I changed was noted.