Overview
The class starts by using booleans to compare the current value of a sprite property with a target value, using that comparison to determine when a sprite has reached a point on the screen, grown to a given size, or otherwise reached a value using the counter pattern. After using booleans directly to investigate the values or sprite properties, the class adds conditional if statements to write code that responds to those boolean comparisons.
Vocab
- Boolean Expression - in programming, an expression that evaluates to True or False.
- If-Statement - The common programming structure that implements "conditional statements".
New Code