{# 1 }   Unit Game;

{## 2 }  Interface

 Var
   CharWidth , CharHeight , XMax , YMax , DecX , DecY , Cx , Cy : Word;

   Procedure MakeConst;
   Procedure Field3x3 ( X , Y , Size : Word );
   Procedure Field4x4 ( X , Y , Size : Word );
   Procedure Cross ( X , Y , Sz : Word ; Color : Byte );

{### 3 } Implementation    { Implementation section }

 Uses
              Crt, Graph ;

Procedure MakeConst;
 Begin
    CharWidth := TextWidth  ( 'Û' ) ;
   CharHeight := TextHeight ( 'Û' ) ;
         XMax := GetMaxX;
         YMax := GetMaxY;
         Cx   := XMax div 2;
         Cy   := YMax div 2;
         DecX := ( XMax + 1 ) div 10;
         DecY := ( YMax + 1 ) div 10;
 End;
{-------------------------}
Procedure Field4x4 ( X , Y , Size : Word );
 Var Ctr : Integer;
Begin
   SetColor ( White );
    SetLineStyle ( SolidLn , $0000 , ThickWidth );
   For Ctr := -2 to 2 do
    begin
     Line(X-Ctr*Size,Y-2*Size,X-Ctr*Size,Y+2*Size);
     Line(X-2*Size,Y+Ctr*Size,X+2*Size,Y+Ctr*Size);
    end
End;
{----------------------------------}
Procedure Field3x3 ( X , Y , Size : Word );
Begin
   SetColor ( White );
    SetLineStyle ( SolidLn , $0000 , ThickWidth );
Line(X-Round(0.5*Size),Y-Round(1.5*Size),X-Round(0.5*Size),Y+Round(1.5*Size));
Line(X+Round(0.5*Size),Y+Round(1.5*Size),X+Round(0.5*Size),Y-Round(1.5*Size));
Line(X-Round(1.5*Size),Y-Round(0.5*Size),X+Round(1.5*Size),Y-Round(0.5*Size));
Line(X+Round(1.5*Size),Y+Round(0.5*Size),X-Round(1.5*Size),Y+Round(0.5*Size));
End;

{-------------------------}
Procedure Cross ( X , Y , Sz : Word ; Color : Byte );
 Begin
  SetColor ( Color );
   SetLineStyle ( SolidLn , $0000 , ThickWidth );
  Line ( X-Sz , Y-Sz , X+Sz , Y+Sz );
  Line ( X+Sz , Y-Sz , X-Sz , Y+Sz );
 End;
{------------------------------------}
                                                                   {}

{#### 4 }      { Initalization section }
      End.

