home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 9 / 09.iso / l / l040 / 10.ddi / CHESS.ZIP / TVCHSCMD.PAS < prev    next >
Encoding:
Pascal/Delphi Source File  |  1992-10-27  |  2.9 KB  |  127 lines

  1. {************************************************}
  2. {                                                }
  3. {   Turbo Vision Chess Demo                      }
  4. {   Copyright (c) 1992 by Borland International  }
  5. {                                                }
  6. {************************************************}
  7.  
  8. unit TVChsCmd;
  9.  
  10. interface
  11.  
  12. uses App, Dialogs;
  13.  
  14. type
  15.   TSettings = record
  16.     TimeMode: Word;    { Game timing mode }
  17.     GameTime: Longint; { Max Game time }
  18.     TurnTime: Longint; { Max Turn time }
  19.     Hints:    Word;    { Hint Options }
  20.     Players:  Word     { Number of players }
  21.   end;
  22.  
  23. const
  24.   { Move event }
  25.   evMove         = $0400;
  26.  
  27.   { Game Menu }
  28.   cmRunDemo      = 100;
  29.   cmStop         = 101;
  30.  
  31.   { Edit menu }
  32.   cmRedo         = 110;
  33.   cmComputerMove = 111;
  34.   cmEnterMove    = 112;
  35.   cmShowHint     = 113;
  36.  
  37.   { Options Menu }
  38.   cmSettings     = 120;
  39.   cmColors       = 121;
  40.  
  41.   { Help Menu }
  42.   cmAbout        = 130;
  43.  
  44.   { Game control }
  45.   cmSubmitMove   = 1000;
  46.   cmMovePiece    = 1001;
  47.   cmUndoMove     = 1002;
  48.   cmClearBoard   = 1003;
  49.   cmFindPiece    = 1004;
  50.   cmGameOver     = 1005;
  51.   cmRegisterSave = 1006;
  52.   cmTimeOptChg   = 1007;
  53.  
  54.   { Pawn Promotion }
  55.   cmQueen        = 2000;
  56.   cmRook         = 2001;
  57.   cmBishop       = 2002;
  58.   cmKnight       = 2003;
  59.  
  60.   { Color palettes }
  61.   CChessAppColor      = CAppColor +
  62.     #$1E#$20#$40#$07#$70#$0F#$7F#$78#$18#$20#$70#$07#$7F#$0F#$1E#$7F +
  63.     #$0F#$3E#$20#$40;
  64.   CChessAppBlackWhite = CAppBlackWhite +
  65.     #$07#$07#$07#$07#$70#$0F#$7F#$07#$07#$07#$70#$07#$7F#$0F#$70#$7F +
  66.     #$0F#$70#$07#$07;
  67.   CChessAppMonochrome = CAppMonochrome +
  68.     #$07#$07#$07#$07#$70#$0F#$7F#$07#$07#$07#$70#$07#$7F#$0F#$70#$7F +
  69.     #$0F#$70#$07#$07;
  70.  
  71.   CChessBoard = #128#129#130#131#132#133#134#146#147;
  72.  
  73.   CSettingsDlg = CGrayDialog + #135#136;
  74.   CStatusDialog = CCyanDialog + #142#143#144#145;
  75.   CPromoteDialog = CGrayDialog + #137#138#139#140#141;
  76.  
  77.   CTimeLabel = #33#33#33#33;
  78.   CTimeInput = #34#34#34#34;
  79.   CGlyphButton = #33#34#35#36#37#15;
  80.  
  81.   CBestLine = #33;
  82.   CWTimerView = #34;
  83.   CBTimerView = #35;
  84.   CGTimerView = #36;
  85.  
  86.   gmOnePlay  = $0000;
  87.   gmTwoPlay  = $0001;
  88.   gmDemo     = $0002;
  89.  
  90.   tmGameLimit  = $0000;
  91.   tmTurnLimit  = $0001;
  92.   tmMatchUser  = $0002;
  93.   tmInfinite   = $0003;
  94.  
  95.   hoAttacks      = $0001;
  96.   hoJeopardies   = $0002;
  97.   hoBestLine     = $0004;
  98.   hoRtClickHints = $0008;
  99.   hoThinkAhead   = $0010;
  100.  
  101.   plOnePlayer  = $0000;
  102.   plTwoPlayer  = $0001;
  103.  
  104.   { Stream registration types }
  105.  
  106.   otChessPiece    = 5001;
  107.   otTimeLabel     = 5002;
  108.   otTimeInput     = 5003;
  109.   otSettingsDlg   = 5004;
  110.   otPromoteDialog = 5005;
  111.   otGlyphButton   = 5006;
  112.   otTimerView     = 5007;
  113.  
  114.   { Global game settings }
  115.  
  116.   Settings: TSettings = (
  117.     TimeMode: tmTurnLimit;
  118.     GameTime: 10;
  119.     TurnTime: 10;
  120.     Hints: hoAttacks + hoJeopardies + hoBestLine + hoRtClickHints +
  121.       hoThinkAhead;
  122.     Players: plOnePlayer);
  123.  
  124. implementation
  125.  
  126. end.
  127.