Skip to content

Instantly share code, notes, and snippets.

@hcarreras
Created November 23, 2013 22:39
Show Gist options
  • Save hcarreras/7620923 to your computer and use it in GitHub Desktop.
Save hcarreras/7620923 to your computer and use it in GitHub Desktop.
+(NSMutableString *) compara : (NSString *) name1 : (NSMutableArray *) asked_clues1 : (NSString *) name2 : (NSMutableArray *) clues2
{
NSMutableString *respuesta;
Clue *clueA, *clueB;
for (clueA in asked_clues1){
for(clueB in clues2){
if(clueA.attr == clueB.attr){
if(clueA.value != clueB.value){
respuesta = [[NSMutableString alloc] initWithString:name2];
[respuesta appendString:@" "];
[respuesta appendString: clueB.question];
return respuesta;
}
}
else{
respuesta = [[NSMutableString alloc] initWithString:name2];
[respuesta appendString:@" no "];
respuesta appendString: clueA.question];
return respuesta;
}
}
}
return nil;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment