 Unit InitGame;

{## 2 }  Interface

 Uses
              Crt, Graph , Game ;

{### 3 } Implementation    { Implementation section }

 Uses         Game4x4;

Procedure Title ;   { Title of the game}
 Begin
  SetBkColor ( Green );
   SetColor ( Red );
  SetTextStyle ( DefaultFont , HorizDir , 2 );
   OutTextXY ( 20 * CharWidth , 4 * CharHeight ,
                  ' MityaSoft Presents ' ) ;
      Delay(600);
  SetBkColor ( Blue );
   SetColor ( Yellow );
    OutTextXY ( 20 * CharWidth , 4 * Charheight ,
                  ' MityaSoft Presents ' ) ;
   SetTextStyle ( GothicFont , HorizDir , 5 );
    SetColor ( Red ) ;
   OutTextXY ( 8 * CharWidth , 33 * CharHeight ,
                  ' Game  Crosses & Zeroes ');
       Field3x3 ( Cx , Cy , DecX );
       Cross ( Cx-DecX , Cy-DecX , Round (DecX / 2.6) , Red );
      ReadKey
    End;
{-------------------------}
Procedure Menu;  Forward;

Procedure Choice;
 Var
  Ch : Char;
 Begin
  Ch := ReadKey;
{}Case Ch of                                                              {}
{}                 '0' : Halt ;                                           {}
{}                 '2' : Game_4x4 ;                                        {}
{}                 Else                                                   {}
{}                  begin                                                 {}
{}                    ClearDevice;                                        {}
{}                     SetBkColor ( Black );                              {}
{}                    SetTextStyle ( DefaultFont , HorizDir , 2 );        {}
{}                      SetColor ( Red );                                 {}
{}                     MakeConst;                                         {}
{}                    OutTextXY ( 1 , CharHeight * 10 ,                   {}
{}                    ' Excuse , but this option desactive now !');       {}
{}                     ReadKey;                                           {}
{}                      SetBkColor ( Blue );                              {}
{}                     Menu;                                              {}
{}                   end;                                                 {}
{}end;
End;

Procedure Menu;
 Begin
   ClearDevice;
   MakeConst;
    SetColor ( Yellow );
     SetTextStyle ( TriplexFont , HorizDir , 5 );
 OutTextXY ( CharWidth * 5 , CharHeight div 2 ,'Crosses & Zeroes' );
     SetTextStyle ( TriplexFont , HorizDir , 1 );
   MakeConst;
   SetColor ( Green );
 OutTextXY ( CharWidth * 20 , CharHeight * 8  , '  1. 3x3 Board.   ');
 OutTextXY ( CharWidth * 20 , CharHeight * 9  , '  2. 4x4 Board.   ');
 OutTextXY ( CharWidth * 20 , CharHeight * 10 , '  0. Exit to DOS. ');
 Choice;
End;



Begin
 MakeConst;
  Title;
 Menu;
End.