title: Reading sprites from a NSMutableArray to detect collision
body: <p>I am adding sprites to a NSMutableArray like this:</p>
  
  <pre><code>        NSMutableArray * movableSprites;
  
          NSString *image = [images objectAtIndex:3];
          CCSprite *sprite = [CCSprite spriteWithFile:image];
          sprite.position = ccp(AREA_A2_X2 - (i * 56), AREA_A3A5A4_Y);
          [self addChild:sprite];
          [movableSprites addObject:sprite];
  </code></pre>
  
  <p>So far so good.</p>
  
  <p>Now I am trying to detect collisions among them. The user is able to move the sprites around, but I want the sprites to be blocked by one another.</p>
  
  <p>So, when I am working on the translation of them I want it to happen there. By the way, is it the best place to go for a collision detection?</p>
  
  <pre><code>- (void)panForTranslation:(CGPoint)translation {
      if (selSprite) {
  </code></pre>
  
  <p>I intent to do the following in a loop:</p>
  
  <pre><code>    CGRect rect1 = [SpriteUtilities positionRect:selSprite];
  
      CGRect rect2 = [SpriteUtilities positionRect:EVERY_OTHER_SPRITE];
  
      if (!CGRectIsNull(CGRectIntersection(rect1, rect2))) {
          //handle collision
      }
  </code></pre>
  
  <p>The thing is... I didn't find a NSMutableArray method to retrieve the sprite object.</p>
  
  <p>Thank you for your help.</p>