title: How do I initialize an alert within a function using SwiftUI?
body: <p>I'm trying to add an alert when <code>gameOver()</code> is called. "Result of 'Alert' initializer is unused". How do I initialize the alert I created?</p>
  
  <pre><code>func gameOver() {
      round = 0
      score = 0
      self.changeTarget()
  }
  </code></pre>
  
  <p>Solution Attempt:</p>
  
  <pre><code>func gameOver() {
      round = 0
      score = 0
      self.changeTarget()
      Alert(title: Text("Game Over"),
      message: Text("Thanks for playing"),
      dismissButton: Alert.Button.default( Text("Play Again")))
  }
  </code></pre>