Let's add a point when the ball breaks a brick.

  • In your second if statement, delete the .say() command. Use Add Value to add 1 to score.
  • Use Update Display update the score_board with the new score.
  • Add Random Choice. Name it y_speed. Create a list of negative numbers like [-4, -3, -2].
  • Use a Remove Sprite action to make the block disappear. You have just set the game's logic!

To navigate the page using the TAB key, first press ESC to exit the code editor.

# THIS ACTIVITY IS IN PREVIEW ONLY MODE
  • Run Code
  • Submit Work
  • Next Activity
  • Show Console
  • Reset Code Editor
  • Codesters How To (opens in a new tab)