Alice Community  

Go Back   Alice Community > General Discussion > The Lounge

Thread Tools Display Modes
Lab 2 ITSE 1429
Junior Member
Status: Offline
Posts: 9
Join Date: Jul 2014
Default Lab 2 ITSE 1429 - 07-25-2014, 05:36 PM

More fun with user inputted variables! This one I created a dojo with a ninja who shows you how to do a roundhouse kick. Users beware of the "evil ninja" object if you are looking for a class of human that is in a prone and in a symmetrical position when it is dropped in the world. His right leg is slightly askew and when he performs any movements with his leg the leg will not return to it's initial starting position. I had already wrote his methods so I had to stick with him and call a few extra methods to get him to move back to a standard position. As far as the assignment went, I enjoyed writing methods with loops and working in variables that require user input. I'm becoming more comfortable with variables and am starting to see the potentials of the various functions for other object possibilities! It took some figuring to get a functional if/else statement to accept three separate forms of yes, including "YES", "Yes", and finally "yes" , as string inputs from the user. I ultimately nested together the three if/else statements to make this happen. Is there a simpler way to accomplish this? Also, I wanted the ninja to say "This concludes our lesson" as the else statement, but when I incorporated this it would sometimes randomly show up after typing in "yes" and still continue on with the loop to repeat the initial method. Any thoughts?
Reply With Quote

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 ©2022, Carnegie Mellon University
Alice 2.x © 1999-2012, Alice 3.x © 2008-2012, Carnegie Mellon University. All rights reserved.