title: Randomly coloring sprites, but needs restrictions
body: <p>I have a very, very specific issue.</p>
  
  <p>I have six rectangles.</p>
  
  <p>[] = a rectangle.</p>
  
  <p>They have a format like this on the screen: [] [][] [][] [].
  They all need to be a random color between red, green, and blue.</p>
  
  <pre><code>       var colorize1 = SKAction.colorizeWithColor(.redColor(), colorBlendFactor: 1.0, duration: 0.1)
  
          var colorize2 = SKAction.colorizeWithColor(.greenColor(), colorBlendFactor: 1.0, duration: 0.1)
  
          var colorize3 = SKAction.colorizeWithColor(.blueColor(), colorBlendFactor: 1.0, duration: 0.1)
  
         var actions = [colorize1, colorize2, colorize3]
  
           var randomIndex = Int(arc4random_uniform(3))
  
         var action = actions[randomIndex]
  
  
  
  
  
          greenWall1.runAction(action)
          greenWall2.runAction(action)
  </code></pre>
  
  <p>This code does that. BUT, I can't have the same color adjacent to the next pair.</p>
  
  <p>[Wall1] [Wall2][Wall3] [Wall4][Wall5] [Wall6]</p>
  
  <p>1 and 2 are pairs. 3 and 4 are pairs, etc.</p>
  
  <p>Wall 1 and Wall 2 need to be the same color since they're pairs. 3 and 4 need to be a different random color. 5 and 6 need to be a different than WallPair1 and WallPair2. </p>
  
  <p>Right now, I get up to three of the same colors on each pair. Maybe all reds.</p>
  
  <p>I need to write code that says "if pair 1 (wall1 and wall2) are red for example, then the second pair(wall3 and wall4), and the third pair(wall5 and wall6), can't be red. </p>
  
  <p>I can't figure this out. </p>
  
  <p>Thanks so much for your help.</p>