title: Swift 1.2 - Setting element in array of optional types to nil-- not allowed when passed in?
body: <p>I've an array of boxes where the types are Box? to allow elements to be set to nil, if there is nothing there. I want the Box to set its spot to nil when it is removed from the scene.</p>
  
  <p><strong>The following causes no complaints from Xcode:</strong></p>
  
  <pre><code>override func removeFromParent() {
          var board = [[Box?]](count: 5, repeatedValue: [Box?](count: 9, repeatedValue: nil))
          board[i][j] = nil
          super.removeFromParent()
      }
  </code></pre>
  
  <p>and neither does making the board variable global and using it that way...</p>
  
  <p><strong>In GameScene.swift:</strong></p>
  
  <pre><code>var board = [[Box?]](count: 5, repeatedValue: [Box?](count: 9, repeatedValue: nil))
  </code></pre>
  
  <p><strong>in Box.swift:</strong></p>
  
  <pre><code>override func removeFromParent() {
          board[i][j] = nil
          super.removeFromParent()
      }
  </code></pre>
  
  <p>But trying to do this wont compile (It's no longer overriding because I added a parameter):</p>
  
  <pre><code>func removeFromParent(board: [[Box?]]) {
          board[i][j] = nil
          super.removeFromParent()
      }
  </code></pre>
  
  <p>Is there any way to make this work? Thanks</p>