title: Swift: change a variable based on if 1 of 6 buttons are pressed? Syntax?
body: <p>So I have created some "pseudo code" for my problem below ></p>
  
  <p>My variable, playerMark, needs to be equal to a different set of images depending on if 1 of 6 buttons have been pressed, with the red images ("Red_x" and "Red_o") being the default. I really just need some help with the syntax of my pseudo code because I can't make <code>if blueBtnClicked</code> into a boolean to set it to <code>true</code> and I don't know how else to write it. Also, I don't think a naming system is the right way to go with this. </p>
  
  <p>Please thoroughly explain all suggestions, thanks! My code:</p>
  
  <pre><code>func setImgforCircle(spot:Int, player:Int) {
          var playerMark = player == 1 ? "Red_x" : "Red_o"
  
      if blueBtnClicked(sender: UIButton.self) = true {  // This block is the pseudo code
          playerMark = player == 1 ? "Blue_x" : "Blue_o" //
      }
  
      plays[spot] = player
      switch spot {
      case 1:
          circle1.image = UIImage(named: playerMark)
      case 2:
          circle2.image = UIImage(named: playerMark)
      case 3:
          circle3.image = UIImage(named: playerMark)
      case 4:
          circle4.image = UIImage(named: playerMark)
      case 5:
          circle5.image = UIImage(named: playerMark)
      case 6:
          circle6.image = UIImage(named: playerMark)
      case 7:
          circle7.image = UIImage(named: playerMark)
      case 8:
          circle8.image = UIImage(named: playerMark)
      case 9:
          circle9.image = UIImage(named: playerMark)
  
      default:
          circle2.image = UIImage(named: playerMark)
      }
  
  }
  </code></pre>
  
  <p>Blue button:</p>
  
  <pre><code>@IBAction func blueBtnClicked(sender: UIButton) {
          gameboard.image = UIImage(named: "Blue_gb")
          resultsView.image = UIImage(named: "Blue_results")
          colorsView.image = UIImage(named: "Blue_Colors")
          colorsBtn.setTitleColor(UIColor.lightTextColor(), forState: UIControlState.Normal)
          resetBtn.setTitleColor(UIColor.lightTextColor(), forState: UIControlState.Normal)
      }
  </code></pre>