How do I end a game?

I have a project where we have to create a breakout game. I put in the code that I’m familiar with but I don’t know what to do for the “Game Over”. Can someone show the blocks or give tips?

There are two ways to do Game Over:

  • a Quit button
  • counting remaining number of blocks, and running a quit procedure when it falls below 1:
    • stop the Ball
    • pop a Notifier asking (2 buttons) if the player wants to play again or quit the app.

Well you can show a label saying "GAME OVER" or "YOU LOST" and give the person two options- "quit" or "play again", just like ABG said.