title: Swift game same message
body: <p>I get the same message every time when (count) is bigger then (highscored).</p>
  
  <p>But what i want is when (count) is lower then (highscored) you get 
  ("You scored (count) points"). </p>
  
  <p>I am an student and did an tutorial about swift, so now i am adding some things to learn, its an tap game, you need to tap as fast as possible to set a new highscore.</p>
  
  <p>This is the section what i am talking about :</p>
  
  <pre><code>func subtractTime() {
      seconds--
      timerLabel.text = "Time: \(seconds)"
  
      if(seconds == 0)  {
          if(highscored &lt; count)
          {
              highscored &lt; count
              saveHighScore(count)
              highscore.text = "Highscore: \(loadhighScore().description)"
          }
  
          if (highscored &gt; count) {
              timer.invalidate()
              let alert = UIAlertController(title: "Time is up!",
                  message: "You scored \(count) points",
                  preferredStyle: UIAlertControllerStyle.Alert)
              alert.addAction (UIAlertAction(title: "Play Again", style: UIAlertActionStyle.Default, handler: {
                  action in self.setupGame()
              }))
              presentViewController(alert, animated: true, completion:nil)
          }
          else{
          timer.invalidate()
          let alert2 = UIAlertController(title: "Time is up!",
              message: "You set a new higscore \(count) points",
              preferredStyle: UIAlertControllerStyle.Alert)
              alert2.addAction (UIAlertAction(title: "Play Again", style: UIAlertActionStyle.Default, handler: {
              action in self.setupGame()
          }))
              presentViewController(alert2, animated: true, completion:nil)}
  
  
  
      }}
  </code></pre>
  
  <p>This is the hole code:</p>
  
  <pre><code>import UIKit
  
  class ViewController: UIViewController {
  
  @IBOutlet var scoreLabel: UILabel!
  @IBOutlet var timerLabel: UILabel!
  @IBOutlet var highscore: UILabel!
  
  
  var count = 0
  var seconds = 0
  var timer = NSTimer()
  var highscored = 0
  
  
  @IBAction func buttonPressed()  {
      count++
      scoreLabel.text = "Score \n\(count)"
  }
  
  
  func setupGame() { if(highscored &gt; count) {
      seconds = 30
      count = 0
      timerLabel.text = "Time: \(seconds)"
      scoreLabel.text = "Score:\(count)"
      timer = NSTimer.scheduledTimerWithTimeInterval(1.0, target: self, selector: Selector("subtractTime"), userInfo: nil, repeats: true)
      }
  else  {
      seconds = 30
      count = 0
      timerLabel.text = "Time: \(seconds)"
      scoreLabel.text = "Score:\(count)"
      highscore.text = "Highscore: \(loadhighScore().description)"
      timer = NSTimer.scheduledTimerWithTimeInterval(1.0, target: self, selector: Selector("subtractTime"), userInfo: nil, repeats: true)
      }
  }
  
  
  func subtractTime() {
      seconds--
      timerLabel.text = "Time: \(seconds)"
  
      if(seconds == 0)  {
          if(highscored &lt; count)
          {
              highscored &lt; count
              saveHighScore(count)
              highscore.text = "Highscore: \(loadhighScore().description)"
          }
  
          if (highscored &gt; count) {
              timer.invalidate()
              let alert = UIAlertController(title: "Time is up!",
                  message: "You scored \(count) points",
                  preferredStyle: UIAlertControllerStyle.Alert)
              alert.addAction (UIAlertAction(title: "Play Again", style: UIAlertActionStyle.Default, handler: {
                  action in self.setupGame()
              }))
              presentViewController(alert, animated: true, completion:nil)
          }
          else{
          timer.invalidate()
          let alert2 = UIAlertController(title: "Time is up!",
              message: "You set a new higscore \(count) points",
              preferredStyle: UIAlertControllerStyle.Alert)
              alert2.addAction (UIAlertAction(title: "Play Again", style: UIAlertActionStyle.Default, handler: {
              action in self.setupGame()
          }))
              presentViewController(alert2, animated: true, completion:nil)}
  
  
  
      }}
  
  
  func saveHighScore(high:Int) {
      NSUserDefaults.standardUserDefaults().setInteger(high, forKey: "highscore")
  }
  func loadhighScore() -&gt; Int {
      return NSUserDefaults.standardUserDefaults().integerForKey("highscore")
  }
  func resetHighScore() {
      NSUserDefaults.standardUserDefaults().removeObjectForKey("highscore")
  }
  
  
  
  
  override func viewDidLoad() {
      super.viewDidLoad()
      // Do any additional setup after loading the view, typically from a nib.
  setupGame()
  
  
  
  }
  
  override func didReceiveMemoryWarning() {
      super.didReceiveMemoryWarning()
      // Dispose of any resources that can be recreated.
  }
  
  
  }
  </code></pre>
  
  <p>any help would be appreciated.</p>