title: updating label variables from a running timer
body: <p>I'm trying to create a counter that does simple math when the timer reaches zero. I have my timer working somewhat correctly, and the labels displaying the original variables, but they are not updating as the timer hits "zero". Where am I going wrong in my code?</p>
  
  <pre><code>    class ViewController: UIViewController {
  
  
      @IBOutlet weak var timerLabel: UILabel!
      @IBOutlet weak var goldCounter: UILabel!
      @IBOutlet weak var turnCounter: UILabel!
  
      var seconds = 15
      var timer = Timer()
      var gold = 1000
      var turns = 1
  
  
  
      func updatelabels () {
      goldCounter.text = String(gold)
      turnCounter.text = String(turns) }
  
  
  
  
      func runTimer() {
          timer = Timer.scheduledTimer(timeInterval: 1, target: self, selector: #selector(updateTimer),userInfo: nil, repeats: true)
      }
  
      @objc func updateTimer() {
          seconds -= 1
          timerLabel.text = String(seconds)
          if seconds == 0 {
              seconds = 15}
          }
  
  
      func increaseGold () {
          if seconds == 1 {
              gold = gold + 1000
              turns = turns + 1
          }}
  
  override func viewDidLoad() {
          super.viewDidLoad()
          self.runTimer()
          goldCounter.text = String(gold)
          turnCounter.text = String(turns)
          // Do any additional setup after loading the view, typically from a nib.
  
      func increaseGold () {
          if seconds == 1 {
              gold = gold + 1000
              turns = turns + 1
          }}
     func updatelabels () {
          goldCounter.text = String(gold)
          turnCounter.text = String(turns) }
  
      }
  }
  </code></pre>