Alice Community I need help with conversion function

 I need help with conversion function
Tom2Tom
Junior Member

Status: Offline
Posts: 4
Join Date: Jan 2012
Location: usa
I need help with conversion function - 04-07-2012, 12:02 AM

I answered this question, but i need to complete using the conversion function.

pls help me

Question :

Reversal
In the world below, the row of skeletons (Spooky) is guarding the gate (Spooky). Every so often in this world, the row of skeletons is to reverse order. This project is to animate the reversal using the second form of recursion. The storyboard goes something like the following:

reverse
If the row of skeletons not yet reversed is more than one then
reverse the row of skeletons starting with the second skeleton (by recursively calling reverse)
move the head skeleton to the end of the row

The base case is when there is just one skeleton in the row (that has not yet been reversed). Of course, a row of 1 skeleton is already reversed! The recursive case (for n skeletons, where n is larger than 1) says to first reverse the last n−1 skeletons and then move the first skeleton to the end of the row.
Implement the Skeleton reversal storyboard given above. The program you write should be quite similar to the Towers of Hanoi program, including the which function.
Attached Files
 Reversal.a2w (3.53 MB, 17 views)

 Thread Tools Display Modes Linear Mode

 Posting Rules You may not post new threads You may not post replies You may not post attachments You may not edit your posts BB code is On Smilies are On [IMG] code is On HTML code is Off Forum Rules
 Forum Jump User Control Panel Private Messages Subscriptions Who's Online Search Forums Forums Home Announcements     Community News and Announcements Alice 3     How Do I?     Works In Progress     Share Your World     Share Custom Classes     Bugs and Trouble Shooting     Suggestion Box Alice 2     How do I...?     Works-In-Progress     Share Worlds     Share Objects     Bugs and Troubleshooting     Suggestion Box Educators     Teaching with Alice     Teaching Using Alice 3     Teaching Using Alice 2     CS Principles and Alice     AP CSA and Intro to Java and Alice     Workshops General Discussion     Questions and Comments     The Lounge