This module allowed us to see how we can group objects together into lists and make each of the objects in the list perform the same action without copying and pasting code. We also saw how we can randomize each action so that all the objects move more naturally.
This idea is useful when you want build a scene that involves many objects performing the same action slightly differently, such as racing or games like BopIt, Whack-a-Mole, Simon, Hot Potato, etc.
Things we learned in this module:
Questions you should be able to answer after completing this module:
[Q11.5.1]: In the code below, what order will the dancers spin?
A) Left to right
B) Right to left
C) Randomly
D) It depends on which one is pinkBallerina and pinkBallerina2, etc.
[Q11.5.2]: In the code below, how many times total will spins happen?
A) As many until all the Ballerinas spin at least once.
B) Four, each Ballerina will spin once in a random order.
C) Four, but some Ballerinas may spin more than once and some not at all.
D) It is unknown, we cannot know how many times a spin will happen.