STEP 9: Now we'll set up our win condition! If the timer reaches 0, then the player wins.

  • Go to and drag if inside the interval event. Make sure it has a ····.
  • Change the test variable to timer.
  • Change the test value to 0.
  • From , drag Text in Color inside the if statement. It should be indented with ········.

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)