This is RandomBonusTracker.m in view mode; [Download] [Up]
#import <gamekit/gamekit.h>
#import <bsd/libc.h>
@implementation RandomBonusTracker
- init
{
[super init];
increment = 1;
srandom(time(0));
return self;
}
- (int)bonusValue
{
int range = ((max - min) / increment) + 1;
value = (random() % range) * increment + min;
return value;
}
@end
These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Netfuture.ch.