Soldier Marching -
10-11-2011, 07:16 AM
Hello,
I have got a lab exercise to do in , I've done it to some extent but I have got some questions.
Exercise: "Edit your marching soldier so that the number of steps he walks forward can be passed to the method using a parameter (Hint: you may have to have separate methods for the initial step and final step. The intermediate steps could be animated using a loop.)"
So I've got my soldier walking, however, one step is for him two, and I cannot make him take e.g. 3, 5 and odd number of steps. I used IF method to make him take one step if the number is 1, and else when the number is any other than 1. Is there any possibility to improve my programme?
I attach my Alice world.
|