title: Cannot use variables inside class
body: <p>I'm trying to follow along CS 193P course and I'm currently on a Lecture 2. The lector made <code>var game = Concentration(numberOfPairsOfCards: cardButtons.count / 2)</code> and it worked fine for him, however, it doesn't work at all for me. Am I missing something? I can't pass anything there.</p>
  
  <p>Here's my ViewController class:</p>
  
  <pre><code>class ViewController: UIViewController {
  
      @IBOutlet weak var flipCountLabel: UILabel!
      @IBOutlet var cardButtons: [UIButton]!
  
      var game = Concentration(numberOfPairsOfCards: cardButtons.count / 2)
  
      var emojiChoices = ["", "", "", ""]
  
      var flipCount = 0 {
          didSet {
              flipCountLabel.text = "Flips: \(flipCount)"
          }
      }
  
      //MARK: - IBActions
      @IBAction func touchCard(_ sender: UIButton) {
          flipCount += 1
          if let cardNumber = cardButtons.index(of: sender) {
              flipCard(withEmoji: emojiChoices[cardNumber], on: sender)
          }
      }
  
  
      //MARK: - Methods
      func flipCard(withEmoji emoji: String, on button: UIButton) {
          if button.currentTitle == emoji {
              button.setTitle("", for: .normal)
              button.backgroundColor = #colorLiteral(red: 0.9372549057, green: 0.3490196168, blue: 0.1921568662, alpha: 1)
          } else {
              button.setTitle(emoji, for: .normal)
              button.backgroundColor = #colorLiteral(red: 1, green: 1, blue: 1, alpha: 1)
          }
      }
  
  }
  </code></pre>
  
  <p>And Concentration:</p>
  
  <pre><code>class Concentration {
      var cards = [Card]()
  
      func chooseCard(at index: Int) {
  
      }
  
      init(numberOfPairsOfCards: Int) {
          for _ in 1...numberOfPairsOfCards {
              let card = Card()
              cards += [card, card]
          }
          //TODO: - Shuffle the cards
  
      }
  
  
  }
  </code></pre>
  
  <p>The error is </p>
  
  <blockquote>
    <p>Cannot use instance member 'cardButtons' within property initializer;
    property initializers run before 'self' is available</p>
  </blockquote>
  
  <p>and auto completion doesn't work either</p>