Alice Community

Alice Community (http://www.alice.org/community/index.php)
-   How do I...? (http://www.alice.org/community/forumdisplay.php?f=16)
-   -   Alice 2.2 Ch7 Ex6 Recursion spiral (http://www.alice.org/community/showthread.php?t=7703)

brilliantlypsychotic 11-30-2011 10:15 PM

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!!!

x2495iiii 12-01-2011 11:48 AM

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.

brilliantlypsychotic 12-01-2011 01:28 PM

1 Attachment(s)
Ok, here it is. The robot is doing what I want it to do, I just need it to be recursive.

x2495iiii 12-01-2011 09:34 PM

1 Attachment(s)
Here's the world, but there's a piece missing. You have to figure out what it is.

joncjaffe 04-16-2012 09:33 PM

add an index of 1

TauTrumpsPi 04-17-2012 02:43 PM

[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.

joncjaffe 04-21-2012 04:13 AM

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.