All I want to do is check if the NSNumber
s at the given indexes in the array gameBoard
add up to 3... I am new to Objective-C and I am unsure of all these NSNumber
s... Can someone help me out?
This is what I have.... I presume the ==
is not correct.
if ( [[gameBoard objectAtIndex:0] integerValue] + [[gameBoard objectAtIndex:3] integerValue] + [[gameBoard objectAtIndex:6] integerValue]] == 3);
{
NSLog(@"k");
}
Also what is the difference between intValue
and integerValue
? I notice they are both options... Should I use one or the other?