cocoaTouch/otherSrc/CommodityFunctions.m
changeset 3339 d558bc5a73c5
parent 3335 2520ee7a5484
child 3340 96dd168b080b
equal deleted inserted replaced
3338:dee9beba85cc 3339:d558bc5a73c5
    21     
    21     
    22     NSMutableArray *hedgehogs = [[NSMutableArray alloc] initWithCapacity: MAX_HOGS];
    22     NSMutableArray *hedgehogs = [[NSMutableArray alloc] initWithCapacity: MAX_HOGS];
    23     
    23     
    24     for (int i = 0; i < MAX_HOGS; i++) {
    24     for (int i = 0; i < MAX_HOGS; i++) {
    25         NSString *hogName = [[NSString alloc] initWithFormat:@"hedgehog %d",i];
    25         NSString *hogName = [[NSString alloc] initWithFormat:@"hedgehog %d",i];
    26         NSDictionary *hog = [[NSDictionary alloc] initWithObjectsAndKeys:@"100",@"health", @"0",@"level",
    26 	NSDictionary *hog = [[NSDictionary alloc] initWithObjectsAndKeys:@"100",@"health", [NSNumber numberWithInt:0],@"level",
    27                              hogName,@"hogname", @"NoHat",@"hat", nil];
    27                              hogName,@"hogname", @"NoHat",@"hat", nil];
    28         [hogName release];
    28         [hogName release];
    29         [hedgehogs addObject:hog];
    29         [hedgehogs addObject:hog];
    30         [hog release];
    30         [hog release];
    31     }
    31     }