Posted 03 March 2012 - 09:21 PM
Hi I had the Idea, since my unsecured nuclear power plant blasted away the neighborhood, to let the turtles fill up the hole.
But I cant get the Bugs out of the program (pasted in pastebin.com) I made.
What i intended to do was: let the turtle check the possible moves, fill up a hole underneath if one is there, move along the left wall and close the empty space in behind.
The difficulty is it also has to check if its entering a "tunnel" which is has to move back.
the tunnel can be end in another open space then it has to go back and close it, or it can end in a dead end.
but I can't figure out why it sometimes moves around unnecessary and other time it walled in itself.
I hope someone can help me.
But I cant get the Bugs out of the program (pasted in pastebin.com) I made.
What i intended to do was: let the turtle check the possible moves, fill up a hole underneath if one is there, move along the left wall and close the empty space in behind.
The difficulty is it also has to check if its entering a "tunnel" which is has to move back.
the tunnel can be end in another open space then it has to go back and close it, or it can end in a dead end.
but I can't figure out why it sometimes moves around unnecessary and other time it walled in itself.
I hope someone can help me.