We are close to completing a basic Match 3 game. Let's look at a couple more methods we need to finish it.
-(void) checkMove { // A move was made, so check for potential matches [self checkForMatchesOfType:kGemIdle]; // Did we have any matches? if ([gemMatches count] > 0) { // Iterate through all matched gems for (MAGem *aGem in gemMatches) { // If the gem is not already in scoring state if (aGem.gemState != kGemScoring) { // Trigger the scoring & removal of gem [self animateGemRemoval:aGem]; } } // All matches processed. Clear the array. [gemMatches removeAllObjects]; // If we have any selected/touched gems, we must // have made an incorrect move } else if ([gemsTouched count] > 0) { // If there was only one gem, grab it MAGem *aGem = [gemsTouched objectAtIndex:0]; ...