Instead of plist file which is a dictionary, you should go with array only. Create an array having 18 objects inside it. These objects represent the 18 holes. Just access those object using index(hole which you want to observe) instead of creating a key.
Now each object inside the array is also an array which represents number of players. The index of the array represents the player.
Create an instance variable as holes of type NSMutableArray. Initialise it in below way.
holes = [[NSMutableArray alloc]init];
for(int hole = 0; hole < TOTAL_HOLES; hole++)
{
NSMutableArray *persons = [[NSMutableArray alloc]init];
for(int player = 0; player < TOTAL_PLAYERS; player++)
{
NSNumber *score = [NSNumber numberWithInt:-1];
[persons addObject:score];
}
[holes addObject:persons];
}
Now each object of array holes represents the score of each players for that particular hole. Initial value is set to -1 which means the score of that player for that particular hole is not entered yet. When you want to modify the score of any particular player for any particular hole, you can do it by below way.
NSNumber *score = [NSNumber numberWithInt:SCORE_OF_PLAYER];
NSMutableArray *scoresForHole = [holes objectAtIndex:SCORE_OF_PLAYER_FOR_HOLE];
[scoresForHole replaceObjectAtIndex:PLAYER_NUMBER withObject:score];
[holes replaceObjectAtIndex:3 withObject:scoresForHole];
So, overall structure will become,
[0] = {0,1,2,3... total players},
[1] = {0,1,2,3... total players},
.
.
.
[17] = {0,1,2,3... total players}
Now when you want to access player 5 record for hole number 8, you can do following,
[[holes objectAtIndex:holeNum] objectAtIndex:playerNum];
To write down the array into a file and to initialise the array from file, you can use library routines of array class. Hope that will simplify your problem.