home *** CD-ROM | disk | FTP | other *** search
/ DP Tool Club 26 / CD_ASCQ_26_1295.iso / vrac / ysfl12.zip / FILES1.ZIP / magic.imp < prev    next >
Text File  |  1995-04-02  |  1KB  |  46 lines

  1. {$A+,B-,D-,F+,G+,I-,K+,L-,N-,P-,Q-,R-,S+,T+,V-,W-,X+,Y-}
  2. unit MAGIC;
  3. {
  4.      File: MAGIC.IMP
  5.    Author: Bob Swart [100434,2072]
  6.   Purpose: implicit import unit for MAGIC.DLL
  7. }
  8. interface
  9. Const
  10.   NoneID = 0;
  11.   UserID = 1;
  12.   CompID = 2;
  13.  
  14. Type
  15.   TPlayer = NoneID..CompID;
  16.  
  17. Const
  18.   NilPlace   = 0; { move impossible }
  19.   FirstPlace = 1;
  20.   LastPlace  = 9;
  21.  
  22. Type
  23.   TPlace = FirstPlace..LastPlace;
  24.   TMove  = NilPlace..LastPlace;
  25.  
  26. Type
  27.   HGame = Word; { Handle to a game }
  28.  
  29.   function NewGame: HGame;
  30.   procedure EndGame(Game: HGame);
  31.   procedure MakeMove(Game: HGame; ID: TPlayer; Place: TPlace);
  32.   function NextMove(Game: HGame; ID: TPlayer): TMove;
  33.   function IsWinner(Game: HGame): TPlayer;
  34.   function GetValue(Game: HGame; Place: TPlace): TPlayer;
  35.  
  36. implementation
  37.  
  38.   function NewGame;   external 'MAGIC' index 1;
  39.   procedure EndGame;  external 'MAGIC' index 2;
  40.   procedure MakeMove; external 'MAGIC' index 3;
  41.   function NextMove;  external 'MAGIC' index 4;
  42.   function IsWinner;  external 'MAGIC' index 5;
  43.   function GetValue;  external 'MAGIC' index 6;
  44.  
  45. end.
  46.