Alice 2.2 Ch7 Ex6 Recursion spiral
I am attempting to make a spirally increasing pseudo-square using recursion. I can do it with a loop no problem. With the recursion I have my obect going in a constant square without it spiraling out. Help PLEASE!!!
|
Recursion and looping are nearly the same thing, just implement the code you would have used in the loop, then add something at the end of the method that stops it from being called again if a condition is met.
If you want, you can post your world and we can help you do that. |
1 Attachment(s)
Ok, here it is. The robot is doing what I want it to do, I just need it to be recursive.
|
1 Attachment(s)
Here's the world, but there's a piece missing. You have to figure out what it is.
|
add an index of 1
|
[QUOTE=joncjaffe;48132]-snip-[/QUOTE]
Yah think there might be a reason that the moderator left that to figure out for himself? People have to learn, and giving them answers won't help. |
Not really they were stuck on a certain point; though it through and got stuck point out the obvious is helping.
|
All times are GMT -5. The time now is 04:47 AM. |
Copyright ©2024, Carnegie Mellon University
Alice 2.x © 1999-2012, Alice 3.x © 2008-2012, Carnegie Mellon University. All rights reserved.