home *** CD-ROM | disk | FTP | other *** search
- /*
- * Concentation release 1.00
- *
- * 29 Jan 87 Paul DuBois
- *
- * 29 Jan 87 Release 1.00
- * - Created
- * 12 Dec 93
- * - Updated for TransSkel 3.05, THINK C 6.0.1.
- * - Prototyped the source code.
- * - Added check for insufficent number of pieces for board size.
- * 22 Feb 94
- * - Updated for TransSkel 3.11, Blob Manager 1.07.
- *
- * Do:
- * don't need to assign the reference constant until a new
- * game is begun. That will allow all pieces to be brought
- * in sooner or later.
- */
-
- # include <GestaltEqu.h>
-
- # include "TransSkel.h"
- # include "Message.h"
- # if ENABLE_DEBUG
- # include "Debug.h"
- # endif ENABLE_DEBUG
-
- # include "Concentration.h"
-
-
- # define bailString "\pConcentration"
-
-
- static void Terminate (void);
-
-
- static ScoreBoard scoreBoard =
- {
- { /* initial player names */
- "\pPlayer 1",
- "\pPlayer 2",
- "\pPlayer 3",
- "\pPlayer 4"
- },
- { 0, 0, 0, 0 }, /* initial scores */
- 2, /* start with 2 players */
- 0, /* current player */
- 0 /* initial first player */
- };
-
- ScoreBoard *sb = &scoreBoard;
-
-
- int
- main (void)
- {
- SkelInit ((SkelInitParamsPtr) nil);
- randSeed = TickCount ();
-
- SetMessageAlertNum (msgeAlrtNum);
-
- # if ENABLE_DEBUG
- SetupDebugWindow ();
- ShowDebugWindow ();
- # endif
-
- SetupMenus ();
- ReadPieces ();
- WindInit ();
- SkelEventLoop (); /* loop 'til Quit selected */
- DisposeBlobSets (); /* shut down the Blob Manager */
- SkelCleanup (); /* and TransSkel */
- }
-
-
- /*
- * Termination routine
- */
-
- static void
- Terminate (void)
- {
- SkelCleanup ();
- ExitToShell ();
- }
-
-
- void
- Bail (StringPtr msg)
- {
- Message4 (bailString, "\p: ", msg, "\p Bailing out.");
- Terminate ();
- }
-