top of page
Abstract 1.png

Abstraction

Abstract 2.png
Abstract 3.png

The top picture to the right shows the initiation of the "End" broadcast. "End" is broadcast when the user finishes the third and final maze (when "Sprite 1" touches the "door" sprite and the "background" variable=2). The "End" broadcast affects two other sets of code. On the Backdrop's coding area, the second picture on the right, when the "End" broadcast is received, the "Score" variable is set to the nearest integer value of 100,000 divided by the value of the timer. This is how the user's score is displayed on the final page. The "End" broadcast also affects coding on the "End" sprite, as shown by the third picture on the right. When the broadcast is received, the backdrop is switched to "final" and the "End" sprite's costume is switched from "blank" to "Hartzler2". Then, the "End" sprite's x value is changed by 10, and after 0.5 seconds, it is changed by 10 again. This repeats 8 times. Then, the "play" sound is started, and the "End" sprite says "Alexa! Play Today's Country Music" for 2 seconds. After this the "When it Rains it Pours" sound is started, then after 3 seconds, the "End" sprite says "Thanks, play again!". This is all caused by the "End" broadcast, which a good example of an abstraction.

©2020 by Thomas' CSP Website. America is the best country in the history of the world!

bottom of page