|
From: Geisschaes <gei...@us...> - 2005-04-29 20:34:08
|
Update of /cvsroot/macattrick/macattrick In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18917 Modified Files: LineUpTree.m Log Message: line up statistic bug fixed Index: LineUpTree.m =================================================================== RCS file: /cvsroot/macattrick/macattrick/LineUpTree.m,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** LineUpTree.m 25 Apr 2005 20:22:37 -0000 1.6 --- LineUpTree.m 29 Apr 2005 20:33:58 -0000 1.7 *************** *** 57,61 **** double strength = 0.0; NSArray *lineUp = [self bestLineUp]; ! if(!([lineUp count] == [[self positions] count])) { return -1; } --- 57,62 ---- double strength = 0.0; NSArray *lineUp = [self bestLineUp]; ! int nrOfPlayers = [lineUp count]; ! if(!(nrOfPlayers == [[self positions] count])) { return -1; } *************** *** 63,67 **** for (i=0; i<[lineUp count]; i++) { if([[positions objectAtIndex:i] belongsToSection: section]) { ! strength += [[[lineUp objectAtIndex:i] player] calculatePositionValue:[positions objectAtIndex:i]]; } } --- 64,68 ---- for (i=0; i<[lineUp count]; i++) { if([[positions objectAtIndex:i] belongsToSection: section]) { ! strength += [[[lineUp objectAtIndex:(nrOfPlayers-i-1)] player] calculatePositionValue:[positions objectAtIndex:i]]; } } |