Index Beavers

When there are several objects of the same kind on the screen you can interact with each one of them separately. That is what Array Indexes are for, and now we have 10 new special challenges with arrays of cute beavers breaking it down for you!

Beavers

Indexes can become useful for example when turning and stepping towards a specific banana:

turnTo bananas[1]

step distanceTo bananas[1]

Or when telling each beaver to take a different number of steps:

beaver[0].step 3

beaver[1].step 7

One Reply to “Index Beavers”

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.