STEP 14: We need our program to end AFTER the knight defeats all dragons.

The When Interval block lets us know when a win condition is met.

  • In GRAPHICS, go to and drag in When Interval to the bottom of your program.
  • Change all four times my_var appears in the interval event to the variable dragon_count.

# THIS ACTIVITY IS IN PREVIEW ONLY MODE