ftp.nice.ch/pub/next/games/action/xox/xox.940213.s.tar.gz#/xoxsrc.940213/xoxsrc/SpaxeWars.bproj/SWSpaceGen.m

This is SWSpaceGen.m in view mode; [Download] [Up]

#import "SWSpaceGen.h"

@implementation SWSpaceGen

- activate:sender :(int)tag
{
	xrate = randBetween(-5, 5);
	yrate = randBetween(-5, 5);
	return [super activate:sender :tag];
}

- oneStep
{
	float oldgx = gx, oldgy = gy;
	gx = (myGx += xrate * timeScale);
	gy = (myGy += yrate * timeScale);
	[super oneStep];
	gx = oldgx;
	gy = oldgy;
	return self;
}
@end

These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Netfuture.ch.