- launch Alice in your laptop
- visit the Tutorial (if you have not done so before)
- load one of the worlds that already contains a few objects, for example: Ice
- add an object to your 'Alice world'. You can use the online gallery of objects and drag and drop it in the 'Alice world.' For example: a skater
- test the methods the object knows (use right click on the object to call the object's methods)
- by selecting the object in the object tree we will get a list of the animations the object knows how to do)
- to get the object to 'move', drag move on to your MyFirstAnimation.
- when you drop 'move' you will get a menu to specify the details. For example: Forward, 1 meter
- test by Playing your world and see what the skater does.
to continue with sequencial programming we will add more:
- make the skater turn left 1 revolution (complete turn)
To address concurrency, we can make the skater perform two activities simultaneously:
- Use Do Together to execute all the methods inside simultaneously:
- at the same time the skater moves forward, make her raise her left leg
To address repetition, you can make the skater turn multiple times
- Use Loop to make the skater turn 3 times.
If you would like the skater to perform a task based on specific situation, you can use If
Please continue to test different ideas!
For today, please create a method that will have the following specifications:
- use an existing world
- insert an object
- make the object perform at least 5 different things
- use Do Together, If and Loop for the object to compete a specific task (retrieve another object, perform an action: skate, dance, walk, etc)
No comments:
Post a Comment