title: Assigning random image with arc4random?
body: <p>Ok, I'm going to try to make this more clear because my last question was extremely confusing.  I've included a picture this time.  Each one of these circles is a UIImageView and they are each assigned a random image which is one of 7 colors.  So each circle could be one of 7 colors.  I want to make it so that the user has to hit the circles in order of a pre-determined order according to color.  For example, blue, green, yellow, pink, purple, orange, red.  My HUGE problem is that I can't seem to figure out how to determine whether or not a color that isn't supposed to be hit got hit.  Is there a way to assign multiple image views the same value and then somehow have an if statement that says....</p>
  
  <pre><code>if(a blue circle is hit &amp;&amp; ANY ORANGE CIRCLE IS STILL IN VIEW){
  do something
  }
  </code></pre>
  
  <p>The only way I know how to code this would be an insane amount of code, because of all the random images being assigned.  </p>
  
  <pre><code>    bluebubble = [UIImage imageNamed:@"bluebubble.png"];
      greenbubble = [UIImage imageNamed:@"greenbubble.png"];
      redbubble = [UIImage imageNamed:@"redbubble.png"];
      yellowbubble = [UIImage imageNamed:@"yellowbubble.png"];
      orangebubble = [UIImage imageNamed:@"orangebubble.png"];
      pinkbubble = [UIImage imageNamed:@"pinkbubble.png"];
      purplebubble = [UIImage imageNamed:@"purplebubble.png"];
  
  
      image1 = arc4random()%7;
  
      if(image1 == 0){
          [test setImage:bluebubble];
      }
      else if(image1 == 1){
          [test setImage:greenbubble];
      }
      else if(image1 == 2){
          [test setImage:redbubble];
      }
      else if(image1 == 3){
          [test setImage:yellowbubble];
      }
      else if(image1 == 4){
          [test setImage:orangebubble];
      }
      else if(image1 == 5){
          [test setImage:pinkbubble];
      }
      else if(image1 == 6){
          [test setImage:purplebubble];
      }
  
      image2 = arc4random()%7;
  
      if(image2 == 0){
          [test2 setImage:bluebubble];
      }
      else if(image2 == 1){
          [test2 setImage:greenbubble];
      }
      else if(image2 == 2){
          [test2 setImage:redbubble];
      }
      else if(image2 == 3){
          [test2 setImage:yellowbubble];
      }
      else if(image2 == 4){
          [test2 setImage:orangebubble];
      }
      else if(image2 == 5){
          [test2 setImage:pinkbubble];
      }
      else if(image2 == 6){
          [test2 setImage:purplebubble];
      }
  </code></pre>
  
  <p><img src="https://i796.photobucket.com/albums/yy245/NextRev/colors.png?t=1266561378" alt="alt text"></p>