Hi all,
I'm very new to this and I have a workshop using the ladybug world.
The assignment calls for the ladybug to start at a set location, walk to and eat two leaves then end up at the final location.
I can achieve this by using this code
when I click 'act' the ladybug moves from the start position to the final position immediately. I'd like to see the ladybug walk the steps one-by-one so when I press play, it will walk instead of transport. How would I change my public void act() method to reflect this?
Thanks,
Adrian
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 | public void act() { move(); move(); move(); turnLeft(); move(); move(); move(); eatLeaf(); turnLeft(); turnLeft(); turnLeft(); move(); move(); turnLeft(); move(); move(); eatLeaf(); turnLeft(); turnLeft(); turnLeft(); move(); turnLeft(); move(); } |