#import "RaceDayController.h"
#import "RaceDayDefaultController.h"
#import "RaceDayControlPanelController.h"

@implementation RaceDayController

- appDidInit:sender
	{
	defaultController = [[RaceDayDefaultController alloc] init];
	[self loadDefaults];
	[controlPanel orderFront:self];
	return self;
	}


- setDefaults:sender
	{
	[defaultController setAll:controlPanel];
	return self;
	}


- loadDefaults
	{
	[controlPanel setRaceLaps:[defaultController raceLaps]];
	[controlPanel setRaceOpponents:[defaultController raceOpponents]];
	[controlPanel setRacerCarColor1:[defaultController racerCarColor1]];
	[controlPanel setRacerCarColor2:[defaultController racerCarColor2]];
	[controlPanel setRacerMaxSpeed:[defaultController racerMaxSpeed]];
	[controlPanel setRaceTrackOvalSize:[defaultController raceTrackOvalSize]];
	return self;
	}
	
	
- controlsChanged:sender
	{
	return self;
	}

@end
