{***********************************************************************
*
* darts.p -- Version 3.0  (Main Program)
*
* Copyright (c)
* Apple Computer, Inc.  1986-1990
* All Rights Reserved.
*
* Developer Technical Support Apple II Sample Code
*
* Written by Steven E. Glass
*
* The darts program has two dart game scoring modes.  The Robin mode
* does a simple running score.  The Crickett mode does the scoring
* for the darts game Crickett.
*
***********************************************************************}
{$R-}

program Darts;

USES 
		types,
		locator,
		memory,
		quickdraw,
		events,
		controls,
		lists,
		windows,
		
        uevent, 			{Darts Code Units}
		umenu, 
		uwindow, 
		uutils,
		uglobals;

var
	initRef : Ref;


BEGIN  { MAIN program }

	initGlobals;				{ Initialize our globals. }

	userID := MMStartUp;		{ Start up and get ID from memory manager }
	TLStartUp;					{ Start up the tool locator }

	{ Startup the tools using the new toolbox call }
	initRef := StartupTools(userID, RefIsResource, Ref(1));
	if _toolErr = 0 then
		begin

			setupMenus;     { Set up menus }
			setupWindows;   { Set up the standard windows }
			mainEvent;      { Use application }
	   
		end;

	ShutDownTools(refIsHandle, initRef);
		{ Let the toolbox shutdown the tools. }
	TLShutDown;			{ ShutDown the Tool Locator }

END.   { MAIN program }
