Alice Community  

Go Back   Alice Community > Alice 2 > How do I...?

Reply
 
Thread Tools Display Modes
Making a snowman flip a Hat
Old
Mdking8638
Guest
 
Status:
Posts: n/a
Default Making a snowman flip a Hat - 10-30-2009, 01:01 AM

Hi i'm currently using Alice is a program design and development class for my degree. I am completely stumped on this exercise. Verbatim from the book.......

"Write a new world level method for the snow people world. The new method name fliphats , will be called when the snowwoman turns to the snowman. In the fliphats method the snowman uses his right arm to grab his hat and graciously tip his hat to the snow woman and then return his hat to his head. After the snowman flips his hat, the snowman flips her hat"

The problem i'm having is how do I get the snowman to "grab" his hat and take it off then return it. I am utterly stumped at this moment and any help would be greatly appreciated.

For those with the Programming with Alice book it is Exercise 4-1.
   
Reply With Quote
Old
x2495iiii
Super Moderator
 
x2495iiii's Avatar
 
Status: Offline
Posts: 3,508
Join Date: Dec 2008
Location: Somewhere in the Continental U.S.
Default 10-30-2009, 03:30 AM

Just have the snowman move his arm so that his hand is near his hat. hen, have the hat set it's vehicle to the snowman's hand. Finally, have the snowman turn his arm so that it looks like he is tipping his hat.


(')>
   
Reply With Quote
Old
xxledzeppelin2x3
Guest
 
Status:
Posts: n/a
Default 10-30-2009, 02:13 PM

Yes, i had this exercise earlier in the year and you need to move the arm of the snowman up to his hat and then do the "set vehicle to" method so the hat will then move with the hand of the snowman downward.
   
Reply With Quote
I am on this excersice now
Old
kjobrien
Guest
 
Status:
Posts: n/a
Default I am on this excersice now - 06-25-2010, 12:31 PM

I am currently attending a class also I have read the problem and the way that have I decided earlier to solve it is the same way suggested here in the forums so far.

Last edited by kjobrien; 06-30-2010 at 08:58 AM. Reason: spelling
   
Reply With Quote
Old
yotaman
Guest
 
Status:
Posts: n/a
Thumbs up 06-29-2010, 09:27 PM

Thanks you guys are awesome at the clues to great learning
   
Reply With Quote
Reply

Thread Tools
Display Modes

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 Jump



Copyright ©2024, Carnegie Mellon University
Alice 2.x © 1999-2012, Alice 3.x © 2008-2012, Carnegie Mellon University. All rights reserved.