get the cell danger value self cellDangerAtI opponent currentPlayerCol

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
// get the cell danger
value = [self cellDangerAtI:i J:j opponent:currentPlayerColor];
[danger1 addObject:[NSNumber numberWithInt:value]];
// get the max
if (value > maxDanger1) maxDanger1 = value;
}
else
{
[scores1 addObject:[NSNumber numberWithInt:0]];
[danger1 addObject:[NSNumber numberWithInt:0]];
}