I have a Card object, that has a flag isFlipped. I store them in a NSMutableArray. I want to check if two objects in my array have the flag on, and if they do, I remove them. As far as I understand I need to iterate over array, but how do I get another object with a flag?
- (void) checkCards
{
for (Card *card in cards) {
if (card.flipped)
{
if ( ??? )
{
}
}
}
}