ftp.nice.ch/pub/next/developer/resources/libraries/gamekit_proj.NI.sa.tar.gz#/gamekit_proj/gamekit-1/RandomBonusTracker.m

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.