unit Unit1;

interface

uses
  Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics,
  Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.Grids, Vcl.StdCtrls, Vcl.ExtCtrls;

type
  TForm1 = class(TForm)
    StringGrid1: TStringGrid;
    Timer1: TTimer;
    Button2: TButton;
    Button3: TButton;
    Label1: TLabel;
    Label2: TLabel;
    Label3: TLabel;
    Label5: TLabel;
    Label6: TLabel;
    Label4: TLabel;
    procedure FormCreate(Sender: TObject);
 //   procedure Button1Click(Sender: TObject);
    procedure Timer1Timer(Sender: TObject);
    procedure Button2Click(Sender: TObject);
    procedure Button3Click(Sender: TObject);
    procedure StringGrid1Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form1: TForm1;
 a,b:integer;
 c,d:integer;
 korabley,podlodok,ochkofnabrano:integer;
implementation

{$R *.dfm}

uses frmMain;

{procedure TForm1.Button1Click(Sender: TObject);


begin
a:=a+1;
b:=b+1;
frmMain.Angle:=a;
frmMain.nz1:=b;
end;}

procedure TForm1.Button2Click(Sender: TObject);
begin
a:=a+1;
//frmMain.nx207:=0;

frmMain.nx := 0+a;
  frmMain.nx1 := 0+a;
  frmMain.nx2 := 0+a;
 frmMain.nx3 := 0+a;
 frmMain.nx7 := -1+a;
 frmMain.nx8 := 1+a;
 frmMain.nx9 := -1+a;
  frmMain.nx10 := -2+a;
 frmMain.nx11 := -1+a;
 frmMain.nx12 := 1+a;
 frmMain.nx14 := 1+a;
 frmMain.nx15 := -1+a;
 frmMain.nx16 := -1+a;
 frmMain.nx17 := 1+a;
  frmMain.nx18 := -1+a;
 frmMain.nx19 := 1+a;
 frmMain.nx20 := -1+a;
 frmMain.nx21 := -1+a;
 frmMain.nx22 := 1+a;
  frmMain.nx23 := -1+a;
 frmMain.nx24 := 1+a;
  frmMain.nx25 := 1+a;
 frmMain.nx26 := -1+a;
 frmMain.nx27 := 1+a;
  frmMain.nx28 := -1+a;
  frmMain.nx29 := 1+a;
 frmMain.nx30 := -1+a;

// 1

 frmMain.nx31 := -2+a;
 frmMain.nx32 := 2+a;
 frmMain.nx33 := -2+a;
 frmMain.nx34 :=  2+a;
 frmMain.nx35 := -2+a;
 frmMain.nx36 := 2+a;
  frmMain.nx37 := -2+a;
 frmMain.nx38 := 2+a;
 frmMain.nx39 := -2+a;
 frmMain.nx40 := 2+a;
 frmMain.nx41 := -2+a;
 frmMain.nx42 := 2+a;
 frmMain.nx43 := -2+a;
 frmMain.nx44 := 2+a;
 frmMain.nx45 := -2+a;  //////////////


 //////////////////////

 frmMain.nx46 := -2+a;
 frmMain.nx47 := -2+a;
 frmMain.nx48 := 2+a;
 frmMain.nx49 := -2+a;
 frmMain.nx50 := 2+a;
 frmMain.nx51 := -3+a;
 frmMain.nx52 :=3+a;
 frmMain.nx53 := -3+a;
 frmMain.nx54 :=  3+a;
 frmMain.nx55 := -3+a;
 frmMain.nx56 := 3+a;
 frmMain.nx57 := -3+a;
 frmMain.nx58 := 3+a;
 frmMain.nx59 := -3+a;
 frmMain.nx60 := 3+a;
 frmMain.nx61 := -3+a;
 frmMain.nx62 := 3+a;
 frmMain.nx63 := -3+a;
 frmMain.nx64 := 3+a;
 frmMain.nx65 := -3+a;
 frmMain.nx66 := 3+a;
 frmMain.nx67 := -3+a;
 frmMain.nx68 := 3+a;
 frmMain.nx69 := -3+a;
 frmMain.nx70 := 3+a;


  ///3
 ///
 ///
 frmMain.nx71 := -4+a;
 frmMain.nx72 :=4+a;
 frmMain.nx73 := -4+a;
 frmMain.nx74 :=  4+a;
 frmMain.nx75 := -4+a;
 frmMain.nx76 := 4+a;
 frmMain.nx77 := -4+a;
 frmMain.nx78 := 4+a;
 frmMain.nx79 := -4+a;
 frmMain.nx80 := 4+a;
 frmMain.nx81 := -4+a;
 frmMain.nx82 := 4+a;
 frmMain.nx83 := -4+a;
 frmMain.nx84 := 4+a;
 frmMain.nx85 := -4+a;
 frmMain.nx86 := 4+a;
 frmMain.nx87 := -4+a;
 frmMain.nx88 := 4+a;
 frmMain.nx89 := -4+a;
 frmMain.nx90 := -2+a;
frmMain.nx94 :=0+a;
frmMain.nx95 :=-2+a;  //цифры
frmMain.nx96 :=-4+a;  //цифры
frmMain.nx97 :=-6+a;  //цифры
frmMain.nx98 := 2+a;  //цифры
frmMain.nx99 := 4+a;  //цифры
frmMain.nx100 := 6+a;  //цифры
frmMain.nx101 := 8+a;  //цифры
frmMain.nx102 := 10+a;  //цифры
frmMain.nx103 := 12+a;  //цифры

frmMain.nx104 := -8+a;  //буквы
frmMain.nx105 := -8+a;  //буквы
frmMain.nx106 := -8+a;  //буквы
frmMain.nx107 := -8+a;  //буквы
frmMain.nx108 := -8+a;  //буквы
frmMain.nx109 := -8+a;  //буквы
frmMain.nx110 := -8+a;  //буквы
frmMain.nx111 := -8+a;  //буквы
frmMain.nx112 := -8+a;  //буквы
frmMain.nx113 := -8+a;  //буквы

frmMain.nx114 := -6+a;  //корабль
frmMain.nx115 := 0+a;  //цифры
frmMain.nx116 :=-2+a;  //цифры
frmMain.nx117 :=-4+a;  //цифры
frmMain.nx118 :=-6+a;  //цифры
frmMain.nx119 := 2+a;  //цифры
frmMain.nx120 := 4+a;  //цифры
frmMain.nx121 := 6+a;  //цифры
frmMain.nx122 := 8+a;  //цифры
frmMain.nx123 := 10+a;  //цифры
frmMain.nx124 := 12+a;  //цифры
frmMain.nx125 := 0+a;
frmMain.nx126 := 0+a;
frmMain.nx127 := 0+a;
frmMain.nx128 := 2+a;
frmMain.nx129 := -2+a;
frmMain.nx130 := -4+a;
frmMain.nx131 := 4+a;
frmMain.nx132 := -6+a;
frmMain.nx133 := 6+a;
frmMain.nx134 := 8+a;
frmMain.nx135 := -8+a;
frmMain.nx136 := -2+a;
frmMain.nx137 := 2+a;
frmMain.nx138 := -4+a;
frmMain.nx139 := 4+a;
frmMain.nx140 := -2+a;
frmMain.nx141 := 2+a;
frmMain.nx142 := 0+a;
frmMain.nx143 := 2+a;
frmMain.nx144 := -2+a;
frmMain.nx145 := -4+a;
frmMain.nx146 := 4+a;
frmMain.nx147 := 6+a;
frmMain.nx148 := -6+a;
frmMain.nx149 := -6+a;
frmMain.nx150 := 6+a;
frmMain.nx151 := 2+a;
frmMain.nx152 := -2+a;
frmMain.nx153 := 2+a;
frmMain.nx154 := -2+a;
frmMain.nx155 := 0+a;
frmMain.nx156 := 0+a;
frmMain.nx157 := 4+a;
frmMain.nx158 := -4+a;
frmMain.nx159 := -6+a;
frmMain.nx160 := 6+a;
frmMain.nx161 := 4+a;
frmMain.nx162 := -4+a;
frmMain.nx163 := -6+a;
frmMain.nx164 := 6+a;
frmMain.nx165 := 4+a;
frmMain.nx166 := -4+a;
frmMain.nx167 := -6+a;
frmMain.nx168 := 6+a;
frmMain.nx169 := 4+a;
frmMain.nx170 := -4+a;
frmMain.nx171 := -6+a;
frmMain.nx172 := 6+a;
frmMain.nx173 := 4+a;
frmMain.nx174 := -4+a;
frmMain.nx175 := -6+a;
frmMain.nx176 := 6+a;
frmMain.nx177 := 4+a;
frmMain.nx178 := -4+a;
frmMain.nx179 := -6+a;
frmMain.nx180 := 6+a;
 frmMain.nx181 := 4+a;
 frmMain.nx182 := -4+a;
 frmMain.nx183 := -6+a;
 frmMain.nx184 := 6+a;
 frmMain.nx185 := 4+a;
 frmMain.nx186 := -4+a;
 frmMain.nx187 := -6+a;
 frmMain.nx188 := 6+a;
 frmMain.nx189 := -4+a;
 frmMain.nx190 := 4+a;
 frmMain.nx191 := -6+a;
 frmMain.nx192 := 6+a;
 frmMain.nx193 := -4+a;
 frmMain.nx194 := 4+a;
 frmMain.nx195 := -6+a;
 frmMain.nx196 := 6+a;
 frmMain.nx197 := -4+a;
 frmMain.nx198 := 4+a;
 frmMain.nx199 := -6+a;
 frmMain.nx200 := 6+a;
 frmMain.nx201 := -4+a;
 frmMain.nx202 := 4+a;
 frmMain.nx203 := -6+a;
 frmMain.nx204 := 6+a;
 frmMain.nx205 := 6+a;  //корабль
 frmMain.nx206 := 6+a;  //Подлодка




end;

procedure TForm1.Button3Click(Sender: TObject);
begin
a:=a-1;
frmMain.nx := 0+a;
  frmMain.nx1 := 0+a;
  frmMain.nx2 := 0+a;
 frmMain.nx3 := 0+a;
 frmMain.nx7 := -1+a;
 frmMain.nx8 := 1+a;
 frmMain.nx9 := -1+a;
  frmMain.nx10 := -2+a;
 frmMain.nx11 := -1+a;
 frmMain.nx12 := 1+a;
 frmMain.nx14 := 1+a;
 frmMain.nx15 := -1+a;
 frmMain.nx16 := -1+a;
 frmMain.nx17 := 1+a;
  frmMain.nx18 := -1+a;
 frmMain.nx19 := 1+a;
 frmMain.nx20 := -1+a;
 frmMain.nx21 := -1+a;
 frmMain.nx22 := 1+a;
  frmMain.nx23 := -1+a;
 frmMain.nx24 := 1+a;
  frmMain.nx25 := 1+a;
 frmMain.nx26 := -1+a;
 frmMain.nx27 := 1+a;
  frmMain.nx28 := -1+a;
  frmMain.nx29 := 1+a;
 frmMain.nx30 := -1+a;

// 1

 frmMain.nx31 := -2+a;
 frmMain.nx32 := 2+a;
 frmMain.nx33 := -2+a;
 frmMain.nx34 :=  2+a;
 frmMain.nx35 := -2+a;
 frmMain.nx36 := 2+a;
  frmMain.nx37 := -2+a;
 frmMain.nx38 := 2+a;
 frmMain.nx39 := -2+a;
 frmMain.nx40 := 2+a;
 frmMain.nx41 := -2+a;
 frmMain.nx42 := 2+a;
 frmMain.nx43 := -2+a;
 frmMain.nx44 := 2+a;
 frmMain.nx45 := -2+a;  //////////////


 //////////////////////

 frmMain.nx46 := -2+a;
 frmMain.nx47 := -2+a;
 frmMain.nx48 := 2+a;
 frmMain.nx49 := -2+a;
 frmMain.nx50 := 2+a;
 frmMain.nx51 := -3+a;
 frmMain.nx52 :=3+a;
 frmMain.nx53 := -3+a;
 frmMain.nx54 :=  3+a;
 frmMain.nx55 := -3+a;
 frmMain.nx56 := 3+a;
 frmMain.nx57 := -3+a;
 frmMain.nx58 := 3+a;
 frmMain.nx59 := -3+a;
 frmMain.nx60 := 3+a;
 frmMain.nx61 := -3+a;
 frmMain.nx62 := 3+a;
 frmMain.nx63 := -3+a;
 frmMain.nx64 := 3+a;
 frmMain.nx65 := -3+a;
 frmMain.nx66 := 3+a;
 frmMain.nx67 := -3+a;
 frmMain.nx68 := 3+a;
 frmMain.nx69 := -3+a;
 frmMain.nx70 := 3+a;


  ///3
 ///
 ///
 frmMain.nx71 := -4+a;
 frmMain.nx72 :=4+a;
 frmMain.nx73 := -4+a;
 frmMain.nx74 :=  4+a;
 frmMain.nx75 := -4+a;
 frmMain.nx76 := 4+a;
 frmMain.nx77 := -4+a;
 frmMain.nx78 := 4+a;
 frmMain.nx79 := -4+a;
 frmMain.nx80 := 4+a;
 frmMain.nx81 := -4+a;
 frmMain.nx82 := 4+a;
 frmMain.nx83 := -4+a;
 frmMain.nx84 := 4+a;
 frmMain.nx85 := -4+a;
 frmMain.nx86 := 4+a;
 frmMain.nx87 := -4+a;
 frmMain.nx88 := 4+a;
 frmMain.nx89 := -4+a;
 frmMain.nx90 := -2+a;

frmMain.nx94 :=0+a;
frmMain.nx95 :=-2+a;  //цифры
frmMain.nx96 :=-4+a;  //цифры
frmMain.nx97 :=-6+a;  //цифры
frmMain.nx98 := 2+a;  //цифры
frmMain.nx99 := 4+a;  //цифры
frmMain.nx100 := 6+a;  //цифры
frmMain.nx101 := 8+a;  //цифры
frmMain.nx102 := 10+a;  //цифры
frmMain.nx103 := 12+a;  //цифры

frmMain.nx104 := -8+a;  //буквы
frmMain.nx105 := -8+a;  //буквы
frmMain.nx106 := -8+a;  //буквы
frmMain.nx107 := -8+a;  //буквы
frmMain.nx108 := -8+a;  //буквы
frmMain.nx109 := -8+a;  //буквы
frmMain.nx110 := -8+a;  //буквы
frmMain.nx111 := -8+a;  //буквы
frmMain.nx112 := -8+a;  //буквы
frmMain.nx113 := -8+a;  //буквы

frmMain.nx114 := -6+a;  //корабль
frmMain.nx115 := 0+a;  //цифры
frmMain.nx116 :=-2+a;  //цифры
frmMain.nx117 :=-4+a;  //цифры
frmMain.nx118 :=-6+a;  //цифры
frmMain.nx119 := 2+a;  //цифры
frmMain.nx120 := 4+a;  //цифры
frmMain.nx121 := 6+a;  //цифры
frmMain.nx122 := 8+a;  //цифры
frmMain.nx123 := 10+a;  //цифры
frmMain.nx124 := 12+a;  //цифры
frmMain.nx125 := 0+a;
frmMain.nx126 := 0+a;
frmMain.nx127 := 0+a;
frmMain.nx128 := 2+a;
frmMain.nx129 := -2+a;
frmMain.nx130 := -4+a;
frmMain.nx131 := 4+a;
frmMain.nx132 := -6+a;
frmMain.nx133 := 6+a;
frmMain.nx134 := 8+a;
frmMain.nx135 := -8+a;
frmMain.nx136 := -2+a;
frmMain.nx137 := 2+a;
frmMain.nx138 := -4+a;
frmMain.nx139 := 4+a;
frmMain.nx140 := -2+a;
frmMain.nx141 := 2+a;
frmMain.nx142 := 0+a;
frmMain.nx143 := 2+a;
frmMain.nx144 := -2+a;
frmMain.nx145 := -4+a;
frmMain.nx146 := 4+a;
frmMain.nx147 := 6+a;
frmMain.nx148 := -6+a;
frmMain.nx149 := -6+a;
frmMain.nx150 := 6+a;
frmMain.nx151 := 2+a;
frmMain.nx152 := -2+a;
frmMain.nx153 := 2+a;
frmMain.nx154 := -2+a;
frmMain.nx155 := 0+a;
frmMain.nx156 := 0+a;
frmMain.nx157 := 4+a;
frmMain.nx158 := -4+a;
frmMain.nx159 := -6+a;
frmMain.nx160 := 6+a;
frmMain.nx161 := 4+a;
frmMain.nx162 := -4+a;
frmMain.nx163 := -6+a;
frmMain.nx164 := 6+a;
frmMain.nx165 := 4+a;
frmMain.nx166 := -4+a;
frmMain.nx167 := -6+a;
frmMain.nx168 := 6+a;
frmMain.nx169 := 4+a;
frmMain.nx170 := -4+a;
frmMain.nx171 := -6+a;
frmMain.nx172 := 6+a;
frmMain.nx173 := 4+a;
frmMain.nx174 := -4+a;
frmMain.nx175 := -6+a;
frmMain.nx176 := 6+a;
frmMain.nx177 := 4+a;
frmMain.nx178 := -4+a;
frmMain.nx179 := -6+a;
frmMain.nx180 := 6+a;
 frmMain.nx181 := 4+a;
 frmMain.nx182 := -4+a;
 frmMain.nx183 := -6+a;
 frmMain.nx184 := 6+a;
 frmMain.nx185 := 4+a;
 frmMain.nx186 := -4+a;
 frmMain.nx187 := -6+a;
 frmMain.nx188 := 6+a;
 frmMain.nx189 := -4+a;
 frmMain.nx190 := 4+a;
 frmMain.nx191 := -6+a;
 frmMain.nx192 := 6+a;
 frmMain.nx193 := -4+a;
 frmMain.nx194 := 4+a;
 frmMain.nx195 := -6+a;
 frmMain.nx196 := 6+a;
 frmMain.nx197 := -4+a;
 frmMain.nx198 := 4+a;
 frmMain.nx199 := -6+a;
 frmMain.nx200 := 6+a;
 frmMain.nx201 := -4+a;
 frmMain.nx202 := 4+a;
 frmMain.nx203 := -6+a;
 frmMain.nx204 := 6+a;
 frmMain.nx205 := 6+a;  //корабль
 frmMain.nx206 := 6+a;  //Подлодка
end;

procedure TForm1.FormCreate(Sender: TObject);
begin
korabley:=0;podlodok:=0;ochkofnabrano:=0;
a:=0;
b:=0;
StringGrid1.Cells[1,0]:='1';
StringGrid1.Cells[2,0]:='2';
StringGrid1.Cells[3,0]:='3';
StringGrid1.Cells[4,0]:='4';
StringGrid1.Cells[5,0]:='5';
StringGrid1.Cells[6,0]:='6';
StringGrid1.Cells[7,0]:='7';
StringGrid1.Cells[8,0]:='8';
StringGrid1.Cells[9,0]:='9';
StringGrid1.Cells[10,0]:='10';

StringGrid1.Cells[0,1]:='а';
StringGrid1.Cells[0,2]:='б';
StringGrid1.Cells[0,3]:='в';
StringGrid1.Cells[0,4]:='г';
StringGrid1.Cells[0,5]:='д';
StringGrid1.Cells[0,6]:='е';
StringGrid1.Cells[0,7]:='ж';
StringGrid1.Cells[0,8]:='з';
StringGrid1.Cells[0,9]:='и';
StringGrid1.Cells[0,10]:='к';


//StringGrid1.Cells[1,7]:='1';
//StringGrid1.Cells[1,8]:='1';
//StringGrid1.Cells[3,9]:='1';
//StringGrid1.Cells[7,8]:='1';




end;

procedure TForm1.StringGrid1Click(Sender: TObject);
begin
c := StringGrid1.Col;
d := StringGrid1.Row;


if (c=1) and (d=10) then
begin
StringGrid1.Cells[c,d]:='1';
a:=a+7;

frmMain.nx := 0+a;
  frmMain.nx1 := 0+a;
  frmMain.nx2 := 0+a;
 frmMain.nx3 := 0+a;
 frmMain.nx7 := -1+a;
 frmMain.nx8 := 1+a;
 frmMain.nx9 := -1+a;
  frmMain.nx10 := -2+a;
 frmMain.nx11 := -1+a;
 frmMain.nx12 := 1+a;
 frmMain.nx14 := 1+a;
 frmMain.nx15 := -1+a;
 frmMain.nx16 := -1+a;
 frmMain.nx17 := 1+a;
  frmMain.nx18 := -1+a;
 frmMain.nx19 := 1+a;
 frmMain.nx20 := -1+a;
 frmMain.nx21 := -1+a;
 frmMain.nx22 := 1+a;
  frmMain.nx23 := -1+a;
 frmMain.nx24 := 1+a;
  frmMain.nx25 := 1+a;
 frmMain.nx26 := -1+a;
 frmMain.nx27 := 1+a;
  frmMain.nx28 := -1+a;
  frmMain.nx29 := 1+a;
 frmMain.nx30 := -1+a;

// 1

 frmMain.nx31 := -2+a;
 frmMain.nx32 := 2+a;
 frmMain.nx33 := -2+a;
 frmMain.nx34 :=  2+a;
 frmMain.nx35 := -2+a;
 frmMain.nx36 := 2+a;
  frmMain.nx37 := -2+a;
 frmMain.nx38 := 2+a;
 frmMain.nx39 := -2+a;
 frmMain.nx40 := 2+a;
 frmMain.nx41 := -2+a;
 frmMain.nx42 := 2+a;
 frmMain.nx43 := -2+a;
 frmMain.nx44 := 2+a;
 frmMain.nx45 := -2+a;  //////////////


 //////////////////////

 frmMain.nx46 := -2+a;
 frmMain.nx47 := -2+a;
 frmMain.nx48 := 2+a;
 frmMain.nx49 := -2+a;
 frmMain.nx50 := 2+a;
 frmMain.nx51 := -3+a;
 frmMain.nx52 :=3+a;
 frmMain.nx53 := -3+a;
 frmMain.nx54 :=  3+a;
 frmMain.nx55 := -3+a;
 frmMain.nx56 := 3+a;
 frmMain.nx57 := -3+a;
 frmMain.nx58 := 3+a;
 frmMain.nx59 := -3+a;
 frmMain.nx60 := 3+a;
 frmMain.nx61 := -3+a;
 frmMain.nx62 := 3+a;
 frmMain.nx63 := -3+a;
 frmMain.nx64 := 3+a;
 frmMain.nx65 := -3+a;
 frmMain.nx66 := 3+a;
 frmMain.nx67 := -3+a;
 frmMain.nx68 := 3+a;
 frmMain.nx69 := -3+a;
 frmMain.nx70 := 3+a;


  ///3
 ///
 ///
 frmMain.nx71 := -4+a;
 frmMain.nx72 :=4+a;
 frmMain.nx73 := -4+a;
 frmMain.nx74 :=  4+a;
 frmMain.nx75 := -4+a;
 frmMain.nx76 := 4+a;
 frmMain.nx77 := -4+a;
 frmMain.nx78 := 4+a;
 frmMain.nx79 := -4+a;
 frmMain.nx80 := 4+a;
 frmMain.nx81 := -4+a;
 frmMain.nx82 := 4+a;
 frmMain.nx83 := -4+a;
 frmMain.nx84 := 4+a;
 frmMain.nx85 := -4+a;
 frmMain.nx86 := 4+a;
 frmMain.nx87 := -4+a;
 frmMain.nx88 := 4+a;
 frmMain.nx89 := -4+a;
 frmMain.nx90 := -2+a;

frmMain.nx94 :=0+a;
frmMain.nx95 :=-2+a;  //цифры
frmMain.nx96 :=-4+a;  //цифры
frmMain.nx97 :=-6+a;  //цифры
frmMain.nx98 := 2+a;  //цифры
frmMain.nx99 := 4+a;  //цифры
frmMain.nx100 := 6+a;  //цифры
frmMain.nx101 := 8+a;  //цифры
frmMain.nx102 := 10+a;  //цифры
frmMain.nx103 := 12+a;  //цифры

frmMain.nx104 := -8+a;  //буквы
frmMain.nx105 := -8+a;  //буквы
frmMain.nx106 := -8+a;  //буквы
frmMain.nx107 := -8+a;  //буквы
frmMain.nx108 := -8+a;  //буквы
frmMain.nx109 := -8+a;  //буквы
frmMain.nx110 := -8+a;  //буквы
frmMain.nx111 := -8+a;  //буквы
frmMain.nx112 := -8+a;  //буквы
frmMain.nx113 := -8+a;  //буквы

frmMain.nx114 := -6+a;  //корабль
frmMain.nx115 := 0+a;  //цифры
frmMain.nx116 :=-2+a;  //цифры
frmMain.nx117 :=-4+a;  //цифры
frmMain.nx118 :=-6+a;  //цифры
frmMain.nx119 := 2+a;  //цифры
frmMain.nx120 := 4+a;  //цифры
frmMain.nx121 := 6+a;  //цифры
frmMain.nx122 := 8+a;  //цифры
frmMain.nx123 := 10+a;  //цифры
frmMain.nx124 := 12+a;  //цифры
frmMain.nx125 := 0+a;
frmMain.nx126 := 0+a;
frmMain.nx127 := 0+a;
frmMain.nx128 := 2+a;
frmMain.nx129 := -2+a;
frmMain.nx130 := -4+a;
frmMain.nx131 := 4+a;
frmMain.nx132 := -6+a;
frmMain.nx133 := 6+a;
frmMain.nx134 := 8+a;
frmMain.nx135 := -8+a;
frmMain.nx136 := -2+a;
frmMain.nx137 := 2+a;
frmMain.nx138 := -4+a;
frmMain.nx139 := 4+a;
frmMain.nx140 := -2+a;
frmMain.nx141 := 2+a;
frmMain.nx142 := 0+a;
frmMain.nx143 := 2+a;
frmMain.nx144 := -2+a;
frmMain.nx145 := -4+a;
frmMain.nx146 := 4+a;
frmMain.nx147 := 6+a;
frmMain.nx148 := -6+a;
frmMain.nx149 := -6+a;
frmMain.nx150 := 6+a;
frmMain.nx151 := 2+a;
frmMain.nx152 := -2+a;
frmMain.nx153 := 2+a;
frmMain.nx154 := -2+a;
frmMain.nx155 := 0+a;
frmMain.nx156 := 0+a;
frmMain.nx157 := 4+a;
frmMain.nx158 := -4+a;
frmMain.nx159 := -6+a;
frmMain.nx160 := 6+a;
frmMain.nx161 := 4+a;
frmMain.nx162 := -4+a;
frmMain.nx163 := -6+a;
frmMain.nx164 := 6+a;
frmMain.nx165 := 4+a;
frmMain.nx166 := -4+a;
frmMain.nx167 := -6+a;
frmMain.nx168 := 6+a;
frmMain.nx169 := 4+a;
frmMain.nx170 := -4+a;
frmMain.nx171 := -6+a;
frmMain.nx172 := 6+a;
frmMain.nx173 := 4+a;
frmMain.nx174 := -4+a;
frmMain.nx175 := -6+a;
frmMain.nx176 := 6+a;
frmMain.nx177 := 4+a;
frmMain.nx178 := -4+a;
frmMain.nx179 := -6+a;
frmMain.nx180 := 6+a;
 frmMain.nx181 := 4+a;
 frmMain.nx182 := -4+a;
 frmMain.nx183 := -6+a;
 frmMain.nx184 := 6+a;
 frmMain.nx185 := 4+a;
 frmMain.nx186 := -4+a;
 frmMain.nx187 := -6+a;
 frmMain.nx188 := 6+a;
 frmMain.nx189 := -4+a;
 frmMain.nx190 := 4+a;
 frmMain.nx191 := -6+a;
 frmMain.nx192 := 6+a;
 frmMain.nx193 := -4+a;
 frmMain.nx194 := 4+a;
 frmMain.nx195 := -6+a;
 frmMain.nx196 := 6+a;
 frmMain.nx197 := -4+a;
 frmMain.nx198 := 4+a;
 frmMain.nx199 := -6+a;
 frmMain.nx200 := 6+a;
 frmMain.nx201 := -4+a;
 frmMain.nx202 := 4+a;
 frmMain.nx203 := -6+a;
 frmMain.nx204 := 6+a;
 frmMain.nx205 := 6+a;  //корабль
 frmMain.nx206 := 6+a;  //Подлодка
 frmMain.nx215 := -6+a;
 frmMain.frmGL.Width:=800;
 a:=0;
end;

if (c=4) and (d=10) then
begin

StringGrid1.Cells[c,d]:='1';
a:=a+1;
frmMain.nx := 0+a;
  frmMain.nx1 := 0+a;
  frmMain.nx2 := 0+a;
 frmMain.nx3 := 0+a;
 frmMain.nx7 := -1+a;
 frmMain.nx8 := 1+a;
 frmMain.nx9 := -1+a;
  frmMain.nx10 := -2+a;
 frmMain.nx11 := -1+a;
 frmMain.nx12 := 1+a;
 frmMain.nx14 := 1+a;
 frmMain.nx15 := -1+a;
 frmMain.nx16 := -1+a;
 frmMain.nx17 := 1+a;
  frmMain.nx18 := -1+a;
 frmMain.nx19 := 1+a;
 frmMain.nx20 := -1+a;
 frmMain.nx21 := -1+a;
 frmMain.nx22 := 1+a;
  frmMain.nx23 := -1+a;
 frmMain.nx24 := 1+a;
  frmMain.nx25 := 1+a;
 frmMain.nx26 := -1+a;
 frmMain.nx27 := 1+a;
  frmMain.nx28 := -1+a;
  frmMain.nx29 := 1+a;
 frmMain.nx30 := -1+a;

// 1

 frmMain.nx31 := -2+a;
 frmMain.nx32 := 2+a;
 frmMain.nx33 := -2+a;
 frmMain.nx34 :=  2+a;
 frmMain.nx35 := -2+a;
 frmMain.nx36 := 2+a;
  frmMain.nx37 := -2+a;
 frmMain.nx38 := 2+a;
 frmMain.nx39 := -2+a;
 frmMain.nx40 := 2+a;
 frmMain.nx41 := -2+a;
 frmMain.nx42 := 2+a;
 frmMain.nx43 := -2+a;
 frmMain.nx44 := 2+a;
 frmMain.nx45 := -2+a;  //////////////


 //////////////////////

 frmMain.nx46 := -2+a;
 frmMain.nx47 := -2+a;
 frmMain.nx48 := 2+a;
 frmMain.nx49 := -2+a;
 frmMain.nx50 := 2+a;
 frmMain.nx51 := -3+a;
 frmMain.nx52 :=3+a;
 frmMain.nx53 := -3+a;
 frmMain.nx54 :=  3+a;
 frmMain.nx55 := -3+a;
 frmMain.nx56 := 3+a;
 frmMain.nx57 := -3+a;
 frmMain.nx58 := 3+a;
 frmMain.nx59 := -3+a;
 frmMain.nx60 := 3+a;
 frmMain.nx61 := -3+a;
 frmMain.nx62 := 3+a;
 frmMain.nx63 := -3+a;
 frmMain.nx64 := 3+a;
 frmMain.nx65 := -3+a;
 frmMain.nx66 := 3+a;
 frmMain.nx67 := -3+a;
 frmMain.nx68 := 3+a;
 frmMain.nx69 := -3+a;
 frmMain.nx70 := 3+a;


  ///3
 ///
 ///
 frmMain.nx71 := -4+a;
 frmMain.nx72 :=4+a;
 frmMain.nx73 := -4+a;
 frmMain.nx74 :=  4+a;
 frmMain.nx75 := -4+a;
 frmMain.nx76 := 4+a;
 frmMain.nx77 := -4+a;
 frmMain.nx78 := 4+a;
 frmMain.nx79 := -4+a;
 frmMain.nx80 := 4+a;
 frmMain.nx81 := -4+a;
 frmMain.nx82 := 4+a;
 frmMain.nx83 := -4+a;
 frmMain.nx84 := 4+a;
 frmMain.nx85 := -4+a;
 frmMain.nx86 := 4+a;
 frmMain.nx87 := -4+a;
 frmMain.nx88 := 4+a;
 frmMain.nx89 := -4+a;
 frmMain.nx90 := -2+a;

frmMain.nx94 :=0+a;
frmMain.nx95 :=-2+a;  //цифры
frmMain.nx96 :=-4+a;  //цифры
frmMain.nx97 :=-6+a;  //цифры
frmMain.nx98 := 2+a;  //цифры
frmMain.nx99 := 4+a;  //цифры
frmMain.nx100 := 6+a;  //цифры
frmMain.nx101 := 8+a;  //цифры
frmMain.nx102 := 10+a;  //цифры
frmMain.nx103 := 12+a;  //цифры

frmMain.nx104 := -8+a;  //буквы
frmMain.nx105 := -8+a;  //буквы
frmMain.nx106 := -8+a;  //буквы
frmMain.nx107 := -8+a;  //буквы
frmMain.nx108 := -8+a;  //буквы
frmMain.nx109 := -8+a;  //буквы
frmMain.nx110 := -8+a;  //буквы
frmMain.nx111 := -8+a;  //буквы
frmMain.nx112 := -8+a;  //буквы
frmMain.nx113 := -8+a;  //буквы

frmMain.nx114 := -6+a;  //корабль
frmMain.nx115 := 0+a;  //цифры
frmMain.nx116 :=-2+a;  //цифры
frmMain.nx117 :=-4+a;  //цифры
frmMain.nx118 :=-6+a;  //цифры
frmMain.nx119 := 2+a;  //цифры
frmMain.nx120 := 4+a;  //цифры
frmMain.nx121 := 6+a;  //цифры
frmMain.nx122 := 8+a;  //цифры
frmMain.nx123 := 10+a;  //цифры
frmMain.nx124 := 12+a;  //цифры
frmMain.nx125 := 0+a;
frmMain.nx126 := 0+a;
frmMain.nx127 := 0+a;
frmMain.nx128 := 2+a;
frmMain.nx129 := -2+a;
frmMain.nx130 := -4+a;
frmMain.nx131 := 4+a;
frmMain.nx132 := -6+a;
frmMain.nx133 := 6+a;
frmMain.nx134 := 8+a;
frmMain.nx135 := -8+a;
frmMain.nx136 := -2+a;
frmMain.nx137 := 2+a;
frmMain.nx138 := -4+a;
frmMain.nx139 := 4+a;
frmMain.nx140 := -2+a;
frmMain.nx141 := 2+a;
frmMain.nx142 := 0+a;
frmMain.nx143 := 2+a;
frmMain.nx144 := -2+a;
frmMain.nx145 := -4+a;
frmMain.nx146 := 4+a;
frmMain.nx147 := 6+a;
frmMain.nx148 := -6+a;
frmMain.nx149 := -6+a;
frmMain.nx150 := 6+a;
frmMain.nx151 := 2+a;
frmMain.nx152 := -2+a;
frmMain.nx153 := 2+a;
frmMain.nx154 := -2+a;
frmMain.nx155 := 0+a;
frmMain.nx156 := 0+a;
frmMain.nx157 := 4+a;
frmMain.nx158 := -4+a;
frmMain.nx159 := -6+a;
frmMain.nx160 := 6+a;
frmMain.nx161 := 4+a;
frmMain.nx162 := -4+a;
frmMain.nx163 := -6+a;
frmMain.nx164 := 6+a;
frmMain.nx165 := 4+a;
frmMain.nx166 := -4+a;
frmMain.nx167 := -6+a;
frmMain.nx168 := 6+a;
frmMain.nx169 := 4+a;
frmMain.nx170 := -4+a;
frmMain.nx171 := -6+a;
frmMain.nx172 := 6+a;
frmMain.nx173 := 4+a;
frmMain.nx174 := -4+a;
frmMain.nx175 := -6+a;
frmMain.nx176 := 6+a;
frmMain.nx177 := 4+a;
frmMain.nx178 := -4+a;
frmMain.nx179 := -6+a;
frmMain.nx180 := 6+a;
 frmMain.nx181 := 4+a;
 frmMain.nx182 := -4+a;
 frmMain.nx183 := -6+a;
 frmMain.nx184 := 6+a;
 frmMain.nx185 := 4+a;
 frmMain.nx186 := -4+a;
 frmMain.nx187 := -6+a;
 frmMain.nx188 := 6+a;
 frmMain.nx189 := -4+a;
 frmMain.nx190 := 4+a;
 frmMain.nx191 := -6+a;
 frmMain.nx192 := 6+a;
 frmMain.nx193 := -4+a;
 frmMain.nx194 := 4+a;
 frmMain.nx195 := -6+a;
 frmMain.nx196 := 6+a;
 frmMain.nx197 := -4+a;
 frmMain.nx198 := 4+a;
 frmMain.nx199 := -6+a;
 frmMain.nx200 := 6+a;
 frmMain.nx201 := -4+a;
 frmMain.nx202 := 4+a;
 frmMain.nx203 := -6+a;
 frmMain.nx204 := 6+a;
 frmMain.nx205 := 6+a;  //корабль
 frmMain.nx206 := 6+a;  //Подлодка
 frmMain.nx215 := -6+a;
 frmMain.frmGL.Width:=800;
 a:=0;
end;

if (c=3) and (d=10) then
begin
StringGrid1.Cells[c,d]:='1';
a:=a+3;
frmMain.nx := 0+a;
  frmMain.nx1 := 0+a;
  frmMain.nx2 := 0+a;
 frmMain.nx3 := 0+a;
 frmMain.nx7 := -1+a;
 frmMain.nx8 := 1+a;
 frmMain.nx9 := -1+a;
  frmMain.nx10 := -2+a;
 frmMain.nx11 := -1+a;
 frmMain.nx12 := 1+a;
 frmMain.nx14 := 1+a;
 frmMain.nx15 := -1+a;
 frmMain.nx16 := -1+a;
 frmMain.nx17 := 1+a;
  frmMain.nx18 := -1+a;
 frmMain.nx19 := 1+a;
 frmMain.nx20 := -1+a;
 frmMain.nx21 := -1+a;
 frmMain.nx22 := 1+a;
  frmMain.nx23 := -1+a;
 frmMain.nx24 := 1+a;
  frmMain.nx25 := 1+a;
 frmMain.nx26 := -1+a;
 frmMain.nx27 := 1+a;
  frmMain.nx28 := -1+a;
  frmMain.nx29 := 1+a;
 frmMain.nx30 := -1+a;

// 1

 frmMain.nx31 := -2+a;
 frmMain.nx32 := 2+a;
 frmMain.nx33 := -2+a;
 frmMain.nx34 :=  2+a;
 frmMain.nx35 := -2+a;
 frmMain.nx36 := 2+a;
  frmMain.nx37 := -2+a;
 frmMain.nx38 := 2+a;
 frmMain.nx39 := -2+a;
 frmMain.nx40 := 2+a;
 frmMain.nx41 := -2+a;
 frmMain.nx42 := 2+a;
 frmMain.nx43 := -2+a;
 frmMain.nx44 := 2+a;
 frmMain.nx45 := -2+a;  //////////////


 //////////////////////

 frmMain.nx46 := -2+a;
 frmMain.nx47 := -2+a;
 frmMain.nx48 := 2+a;
 frmMain.nx49 := -2+a;
 frmMain.nx50 := 2+a;
 frmMain.nx51 := -3+a;
 frmMain.nx52 :=3+a;
 frmMain.nx53 := -3+a;
 frmMain.nx54 :=  3+a;
 frmMain.nx55 := -3+a;
 frmMain.nx56 := 3+a;
 frmMain.nx57 := -3+a;
 frmMain.nx58 := 3+a;
 frmMain.nx59 := -3+a;
 frmMain.nx60 := 3+a;
 frmMain.nx61 := -3+a;
 frmMain.nx62 := 3+a;
 frmMain.nx63 := -3+a;
 frmMain.nx64 := 3+a;
 frmMain.nx65 := -3+a;
 frmMain.nx66 := 3+a;
 frmMain.nx67 := -3+a;
 frmMain.nx68 := 3+a;
 frmMain.nx69 := -3+a;
 frmMain.nx70 := 3+a;


  ///3
 ///
 ///
 frmMain.nx71 := -4+a;
 frmMain.nx72 :=4+a;
 frmMain.nx73 := -4+a;
 frmMain.nx74 :=  4+a;
 frmMain.nx75 := -4+a;
 frmMain.nx76 := 4+a;
 frmMain.nx77 := -4+a;
 frmMain.nx78 := 4+a;
 frmMain.nx79 := -4+a;
 frmMain.nx80 := 4+a;
 frmMain.nx81 := -4+a;
 frmMain.nx82 := 4+a;
 frmMain.nx83 := -4+a;
 frmMain.nx84 := 4+a;
 frmMain.nx85 := -4+a;
 frmMain.nx86 := 4+a;
 frmMain.nx87 := -4+a;
 frmMain.nx88 := 4+a;
 frmMain.nx89 := -4+a;
 frmMain.nx90 := -2+a;

frmMain.nx94 :=0+a;
frmMain.nx95 :=-2+a;  //цифры
frmMain.nx96 :=-4+a;  //цифры
frmMain.nx97 :=-6+a;  //цифры
frmMain.nx98 := 2+a;  //цифры
frmMain.nx99 := 4+a;  //цифры
frmMain.nx100 := 6+a;  //цифры
frmMain.nx101 := 8+a;  //цифры
frmMain.nx102 := 10+a;  //цифры
frmMain.nx103 := 12+a;  //цифры

frmMain.nx104 := -8+a;  //буквы
frmMain.nx105 := -8+a;  //буквы
frmMain.nx106 := -8+a;  //буквы
frmMain.nx107 := -8+a;  //буквы
frmMain.nx108 := -8+a;  //буквы
frmMain.nx109 := -8+a;  //буквы
frmMain.nx110 := -8+a;  //буквы
frmMain.nx111 := -8+a;  //буквы
frmMain.nx112 := -8+a;  //буквы
frmMain.nx113 := -8+a;  //буквы

frmMain.nx114 := -6+a;  //корабль
frmMain.nx115 := 0+a;  //цифры
frmMain.nx116 :=-2+a;  //цифры
frmMain.nx117 :=-4+a;  //цифры
frmMain.nx118 :=-6+a;  //цифры
frmMain.nx119 := 2+a;  //цифры
frmMain.nx120 := 4+a;  //цифры
frmMain.nx121 := 6+a;  //цифры
frmMain.nx122 := 8+a;  //цифры
frmMain.nx123 := 10+a;  //цифры
frmMain.nx124 := 12+a;  //цифры
frmMain.nx125 := 0+a;
frmMain.nx126 := 0+a;
frmMain.nx127 := 0+a;
frmMain.nx128 := 2+a;
frmMain.nx129 := -2+a;
frmMain.nx130 := -4+a;
frmMain.nx131 := 4+a;
frmMain.nx132 := -6+a;
frmMain.nx133 := 6+a;
frmMain.nx134 := 8+a;
frmMain.nx135 := -8+a;
frmMain.nx136 := -2+a;
frmMain.nx137 := 2+a;
frmMain.nx138 := -4+a;
frmMain.nx139 := 4+a;
frmMain.nx140 := -2+a;
frmMain.nx141 := 2+a;
frmMain.nx142 := 0+a;
frmMain.nx143 := 2+a;
frmMain.nx144 := -2+a;
frmMain.nx145 := -4+a;
frmMain.nx146 := 4+a;
frmMain.nx147 := 6+a;
frmMain.nx148 := -6+a;
frmMain.nx149 := -6+a;
frmMain.nx150 := 6+a;
frmMain.nx151 := 2+a;
frmMain.nx152 := -2+a;
frmMain.nx153 := 2+a;
frmMain.nx154 := -2+a;
frmMain.nx155 := 0+a;
frmMain.nx156 := 0+a;
frmMain.nx157 := 4+a;
frmMain.nx158 := -4+a;
frmMain.nx159 := -6+a;
frmMain.nx160 := 6+a;
frmMain.nx161 := 4+a;
frmMain.nx162 := -4+a;
frmMain.nx163 := -6+a;
frmMain.nx164 := 6+a;
frmMain.nx165 := 4+a;
frmMain.nx166 := -4+a;
frmMain.nx167 := -6+a;
frmMain.nx168 := 6+a;
frmMain.nx169 := 4+a;
frmMain.nx170 := -4+a;
frmMain.nx171 := -6+a;
frmMain.nx172 := 6+a;
frmMain.nx173 := 4+a;
frmMain.nx174 := -4+a;
frmMain.nx175 := -6+a;
frmMain.nx176 := 6+a;
frmMain.nx177 := 4+a;
frmMain.nx178 := -4+a;
frmMain.nx179 := -6+a;
frmMain.nx180 := 6+a;
 frmMain.nx181 := 4+a;
 frmMain.nx182 := -4+a;
 frmMain.nx183 := -6+a;
 frmMain.nx184 := 6+a;
 frmMain.nx185 := 4+a;
 frmMain.nx186 := -4+a;
 frmMain.nx187 := -6+a;
 frmMain.nx188 := 6+a;
 frmMain.nx189 := -4+a;
 frmMain.nx190 := 4+a;
 frmMain.nx191 := -6+a;
 frmMain.nx192 := 6+a;
 frmMain.nx193 := -4+a;
 frmMain.nx194 := 4+a;
 frmMain.nx195 := -6+a;
 frmMain.nx196 := 6+a;
 frmMain.nx197 := -4+a;
 frmMain.nx198 := 4+a;
 frmMain.nx199 := -6+a;
 frmMain.nx200 := 6+a;
 frmMain.nx201 := -4+a;
 frmMain.nx202 := 4+a;
 frmMain.nx203 := -6+a;
 frmMain.nx204 := 6+a;
 frmMain.nx205 := 6+a;  //корабль
 frmMain.nx206 := 6+a;  //Подлодка
 frmMain.nx215 := -6+a;

 frmMain.frmGL.Width:=800;
 a:=0;
end;

if (c=5) and (d=10) then
begin
StringGrid1.Cells[c,d]:='1';
a:=a-1;
frmMain.nx := 0+a;
  frmMain.nx1 := 0+a;
  frmMain.nx2 := 0+a;
 frmMain.nx3 := 0+a;
 frmMain.nx7 := -1+a;
 frmMain.nx8 := 1+a;
 frmMain.nx9 := -1+a;
  frmMain.nx10 := -2+a;
 frmMain.nx11 := -1+a;
 frmMain.nx12 := 1+a;
 frmMain.nx14 := 1+a;
 frmMain.nx15 := -1+a;
 frmMain.nx16 := -1+a;
 frmMain.nx17 := 1+a;
  frmMain.nx18 := -1+a;
 frmMain.nx19 := 1+a;
 frmMain.nx20 := -1+a;
 frmMain.nx21 := -1+a;
 frmMain.nx22 := 1+a;
  frmMain.nx23 := -1+a;
 frmMain.nx24 := 1+a;
  frmMain.nx25 := 1+a;
 frmMain.nx26 := -1+a;
 frmMain.nx27 := 1+a;
  frmMain.nx28 := -1+a;
  frmMain.nx29 := 1+a;
 frmMain.nx30 := -1+a;

// 1

 frmMain.nx31 := -2+a;
 frmMain.nx32 := 2+a;
 frmMain.nx33 := -2+a;
 frmMain.nx34 :=  2+a;
 frmMain.nx35 := -2+a;
 frmMain.nx36 := 2+a;
  frmMain.nx37 := -2+a;
 frmMain.nx38 := 2+a;
 frmMain.nx39 := -2+a;
 frmMain.nx40 := 2+a;
 frmMain.nx41 := -2+a;
 frmMain.nx42 := 2+a;
 frmMain.nx43 := -2+a;
 frmMain.nx44 := 2+a;
 frmMain.nx45 := -2+a;  //////////////


 //////////////////////

 frmMain.nx46 := -2+a;
 frmMain.nx47 := -2+a;
 frmMain.nx48 := 2+a;
 frmMain.nx49 := -2+a;
 frmMain.nx50 := 2+a;
 frmMain.nx51 := -3+a;
 frmMain.nx52 :=3+a;
 frmMain.nx53 := -3+a;
 frmMain.nx54 :=  3+a;
 frmMain.nx55 := -3+a;
 frmMain.nx56 := 3+a;
 frmMain.nx57 := -3+a;
 frmMain.nx58 := 3+a;
 frmMain.nx59 := -3+a;
 frmMain.nx60 := 3+a;
 frmMain.nx61 := -3+a;
 frmMain.nx62 := 3+a;
 frmMain.nx63 := -3+a;
 frmMain.nx64 := 3+a;
 frmMain.nx65 := -3+a;
 frmMain.nx66 := 3+a;
 frmMain.nx67 := -3+a;
 frmMain.nx68 := 3+a;
 frmMain.nx69 := -3+a;
 frmMain.nx70 := 3+a;


  ///3
 ///
 ///
 frmMain.nx71 := -4+a;
 frmMain.nx72 :=4+a;
 frmMain.nx73 := -4+a;
 frmMain.nx74 :=  4+a;
 frmMain.nx75 := -4+a;
 frmMain.nx76 := 4+a;
 frmMain.nx77 := -4+a;
 frmMain.nx78 := 4+a;
 frmMain.nx79 := -4+a;
 frmMain.nx80 := 4+a;
 frmMain.nx81 := -4+a;
 frmMain.nx82 := 4+a;
 frmMain.nx83 := -4+a;
 frmMain.nx84 := 4+a;
 frmMain.nx85 := -4+a;
 frmMain.nx86 := 4+a;
 frmMain.nx87 := -4+a;
 frmMain.nx88 := 4+a;
 frmMain.nx89 := -4+a;
 frmMain.nx90 := -2+a;

frmMain.nx94 :=0+a;
frmMain.nx95 :=-2+a;  //цифры
frmMain.nx96 :=-4+a;  //цифры
frmMain.nx97 :=-6+a;  //цифры
frmMain.nx98 := 2+a;  //цифры
frmMain.nx99 := 4+a;  //цифры
frmMain.nx100 := 6+a;  //цифры
frmMain.nx101 := 8+a;  //цифры
frmMain.nx102 := 10+a;  //цифры
frmMain.nx103 := 12+a;  //цифры

frmMain.nx104 := -8+a;  //буквы
frmMain.nx105 := -8+a;  //буквы
frmMain.nx106 := -8+a;  //буквы
frmMain.nx107 := -8+a;  //буквы
frmMain.nx108 := -8+a;  //буквы
frmMain.nx109 := -8+a;  //буквы
frmMain.nx110 := -8+a;  //буквы
frmMain.nx111 := -8+a;  //буквы
frmMain.nx112 := -8+a;  //буквы
frmMain.nx113 := -8+a;  //буквы

frmMain.nx114 := -6+a;  //корабль
frmMain.nx115 := 0+a;  //цифры
frmMain.nx116 :=-2+a;  //цифры
frmMain.nx117 :=-4+a;  //цифры
frmMain.nx118 :=-6+a;  //цифры
frmMain.nx119 := 2+a;  //цифры
frmMain.nx120 := 4+a;  //цифры
frmMain.nx121 := 6+a;  //цифры
frmMain.nx122 := 8+a;  //цифры
frmMain.nx123 := 10+a;  //цифры
frmMain.nx124 := 12+a;  //цифры
frmMain.nx125 := 0+a;
frmMain.nx126 := 0+a;
frmMain.nx127 := 0+a;
frmMain.nx128 := 2+a;
frmMain.nx129 := -2+a;
frmMain.nx130 := -4+a;
frmMain.nx131 := 4+a;
frmMain.nx132 := -6+a;
frmMain.nx133 := 6+a;
frmMain.nx134 := 8+a;
frmMain.nx135 := -8+a;
frmMain.nx136 := -2+a;
frmMain.nx137 := 2+a;
frmMain.nx138 := -4+a;
frmMain.nx139 := 4+a;
frmMain.nx140 := -2+a;
frmMain.nx141 := 2+a;
frmMain.nx142 := 0+a;
frmMain.nx143 := 2+a;
frmMain.nx144 := -2+a;
frmMain.nx145 := -4+a;
frmMain.nx146 := 4+a;
frmMain.nx147 := 6+a;
frmMain.nx148 := -6+a;
frmMain.nx149 := -6+a;
frmMain.nx150 := 6+a;
frmMain.nx151 := 2+a;
frmMain.nx152 := -2+a;
frmMain.nx153 := 2+a;
frmMain.nx154 := -2+a;
frmMain.nx155 := 0+a;
frmMain.nx156 := 0+a;
frmMain.nx157 := 4+a;
frmMain.nx158 := -4+a;
frmMain.nx159 := -6+a;
frmMain.nx160 := 6+a;
frmMain.nx161 := 4+a;
frmMain.nx162 := -4+a;
frmMain.nx163 := -6+a;
frmMain.nx164 := 6+a;
frmMain.nx165 := 4+a;
frmMain.nx166 := -4+a;
frmMain.nx167 := -6+a;
frmMain.nx168 := 6+a;
frmMain.nx169 := 4+a;
frmMain.nx170 := -4+a;
frmMain.nx171 := -6+a;
frmMain.nx172 := 6+a;
frmMain.nx173 := 4+a;
frmMain.nx174 := -4+a;
frmMain.nx175 := -6+a;
frmMain.nx176 := 6+a;
frmMain.nx177 := 4+a;
frmMain.nx178 := -4+a;
frmMain.nx179 := -6+a;
frmMain.nx180 := 6+a;
 frmMain.nx181 := 4+a;
 frmMain.nx182 := -4+a;
 frmMain.nx183 := -6+a;
 frmMain.nx184 := 6+a;
 frmMain.nx185 := 4+a;
 frmMain.nx186 := -4+a;
 frmMain.nx187 := -6+a;
 frmMain.nx188 := 6+a;
 frmMain.nx189 := -4+a;
 frmMain.nx190 := 4+a;
 frmMain.nx191 := -6+a;
 frmMain.nx192 := 6+a;
 frmMain.nx193 := -4+a;
 frmMain.nx194 := 4+a;
 frmMain.nx195 := -6+a;
 frmMain.nx196 := 6+a;
 frmMain.nx197 := -4+a;
 frmMain.nx198 := 4+a;
 frmMain.nx199 := -6+a;
 frmMain.nx200 := 6+a;
 frmMain.nx201 := -4+a;
 frmMain.nx202 := 4+a;
 frmMain.nx203 := -6+a;
 frmMain.nx204 := 6+a;
 frmMain.nx205 := 6+a;  //корабль
 frmMain.nx206 := 6+a;  //Подлодка
 frmMain.nx215 := -6+a;
 frmMain.nz215 := -12+b;
 frmMain.frmGL.Width:=800;
 a:=0;
end;

if (c=2) and (d=10) then
begin
StringGrid1.Cells[c,d]:='1';
a:=a+5;
frmMain.nx := 0+a;
  frmMain.nx1 := 0+a;
  frmMain.nx2 := 0+a;
 frmMain.nx3 := 0+a;
 frmMain.nx7 := -1+a;
 frmMain.nx8 := 1+a;
 frmMain.nx9 := -1+a;
  frmMain.nx10 := -2+a;
 frmMain.nx11 := -1+a;
 frmMain.nx12 := 1+a;
 frmMain.nx14 := 1+a;
 frmMain.nx15 := -1+a;
 frmMain.nx16 := -1+a;
 frmMain.nx17 := 1+a;
  frmMain.nx18 := -1+a;
 frmMain.nx19 := 1+a;
 frmMain.nx20 := -1+a;
 frmMain.nx21 := -1+a;
 frmMain.nx22 := 1+a;
  frmMain.nx23 := -1+a;
 frmMain.nx24 := 1+a;
  frmMain.nx25 := 1+a;
 frmMain.nx26 := -1+a;
 frmMain.nx27 := 1+a;
  frmMain.nx28 := -1+a;
  frmMain.nx29 := 1+a;
 frmMain.nx30 := -1+a;

// 1

 frmMain.nx31 := -2+a;
 frmMain.nx32 := 2+a;
 frmMain.nx33 := -2+a;
 frmMain.nx34 :=  2+a;
 frmMain.nx35 := -2+a;
 frmMain.nx36 := 2+a;
  frmMain.nx37 := -2+a;
 frmMain.nx38 := 2+a;
 frmMain.nx39 := -2+a;
 frmMain.nx40 := 2+a;
 frmMain.nx41 := -2+a;
 frmMain.nx42 := 2+a;
 frmMain.nx43 := -2+a;
 frmMain.nx44 := 2+a;
 frmMain.nx45 := -2+a;  //////////////


 //////////////////////

 frmMain.nx46 := -2+a;
 frmMain.nx47 := -2+a;
 frmMain.nx48 := 2+a;
 frmMain.nx49 := -2+a;
 frmMain.nx50 := 2+a;
 frmMain.nx51 := -3+a;
 frmMain.nx52 :=3+a;
 frmMain.nx53 := -3+a;
 frmMain.nx54 :=  3+a;
 frmMain.nx55 := -3+a;
 frmMain.nx56 := 3+a;
 frmMain.nx57 := -3+a;
 frmMain.nx58 := 3+a;
 frmMain.nx59 := -3+a;
 frmMain.nx60 := 3+a;
 frmMain.nx61 := -3+a;
 frmMain.nx62 := 3+a;
 frmMain.nx63 := -3+a;
 frmMain.nx64 := 3+a;
 frmMain.nx65 := -3+a;
 frmMain.nx66 := 3+a;
 frmMain.nx67 := -3+a;
 frmMain.nx68 := 3+a;
 frmMain.nx69 := -3+a;
 frmMain.nx70 := 3+a;


  ///3
 ///
 ///
 frmMain.nx71 := -4+a;
 frmMain.nx72 :=4+a;
 frmMain.nx73 := -4+a;
 frmMain.nx74 :=  4+a;
 frmMain.nx75 := -4+a;
 frmMain.nx76 := 4+a;
 frmMain.nx77 := -4+a;
 frmMain.nx78 := 4+a;
 frmMain.nx79 := -4+a;
 frmMain.nx80 := 4+a;
 frmMain.nx81 := -4+a;
 frmMain.nx82 := 4+a;
 frmMain.nx83 := -4+a;
 frmMain.nx84 := 4+a;
 frmMain.nx85 := -4+a;
 frmMain.nx86 := 4+a;
 frmMain.nx87 := -4+a;
 frmMain.nx88 := 4+a;
 frmMain.nx89 := -4+a;
 frmMain.nx90 := -2+a;

frmMain.nx94 :=0+a;
frmMain.nx95 :=-2+a;  //цифры
frmMain.nx96 :=-4+a;  //цифры
frmMain.nx97 :=-6+a;  //цифры
frmMain.nx98 := 2+a;  //цифры
frmMain.nx99 := 4+a;  //цифры
frmMain.nx100 := 6+a;  //цифры
frmMain.nx101 := 8+a;  //цифры
frmMain.nx102 := 10+a;  //цифры
frmMain.nx103 := 12+a;  //цифры

frmMain.nx104 := -8+a;  //буквы
frmMain.nx105 := -8+a;  //буквы
frmMain.nx106 := -8+a;  //буквы
frmMain.nx107 := -8+a;  //буквы
frmMain.nx108 := -8+a;  //буквы
frmMain.nx109 := -8+a;  //буквы
frmMain.nx110 := -8+a;  //буквы
frmMain.nx111 := -8+a;  //буквы
frmMain.nx112 := -8+a;  //буквы
frmMain.nx113 := -8+a;  //буквы

frmMain.nx114 := -6+a;  //корабль
frmMain.nx115 := 0+a;  //цифры
frmMain.nx116 :=-2+a;  //цифры
frmMain.nx117 :=-4+a;  //цифры
frmMain.nx118 :=-6+a;  //цифры
frmMain.nx119 := 2+a;  //цифры
frmMain.nx120 := 4+a;  //цифры
frmMain.nx121 := 6+a;  //цифры
frmMain.nx122 := 8+a;  //цифры
frmMain.nx123 := 10+a;  //цифры
frmMain.nx124 := 12+a;  //цифры
frmMain.nx125 := 0+a;
frmMain.nx126 := 0+a;
frmMain.nx127 := 0+a;
frmMain.nx128 := 2+a;
frmMain.nx129 := -2+a;
frmMain.nx130 := -4+a;
frmMain.nx131 := 4+a;
frmMain.nx132 := -6+a;
frmMain.nx133 := 6+a;
frmMain.nx134 := 8+a;
frmMain.nx135 := -8+a;
frmMain.nx136 := -2+a;
frmMain.nx137 := 2+a;
frmMain.nx138 := -4+a;
frmMain.nx139 := 4+a;
frmMain.nx140 := -2+a;
frmMain.nx141 := 2+a;
frmMain.nx142 := 0+a;
frmMain.nx143 := 2+a;
frmMain.nx144 := -2+a;
frmMain.nx145 := -4+a;
frmMain.nx146 := 4+a;
frmMain.nx147 := 6+a;
frmMain.nx148 := -6+a;
frmMain.nx149 := -6+a;
frmMain.nx150 := 6+a;
frmMain.nx151 := 2+a;
frmMain.nx152 := -2+a;
frmMain.nx153 := 2+a;
frmMain.nx154 := -2+a;
frmMain.nx155 := 0+a;
frmMain.nx156 := 0+a;
frmMain.nx157 := 4+a;
frmMain.nx158 := -4+a;
frmMain.nx159 := -6+a;
frmMain.nx160 := 6+a;
frmMain.nx161 := 4+a;
frmMain.nx162 := -4+a;
frmMain.nx163 := -6+a;
frmMain.nx164 := 6+a;
frmMain.nx165 := 4+a;
frmMain.nx166 := -4+a;
frmMain.nx167 := -6+a;
frmMain.nx168 := 6+a;
frmMain.nx169 := 4+a;
frmMain.nx170 := -4+a;
frmMain.nx171 := -6+a;
frmMain.nx172 := 6+a;
frmMain.nx173 := 4+a;
frmMain.nx174 := -4+a;
frmMain.nx175 := -6+a;
frmMain.nx176 := 6+a;
frmMain.nx177 := 4+a;
frmMain.nx178 := -4+a;
frmMain.nx179 := -6+a;
frmMain.nx180 := 6+a;
 frmMain.nx181 := 4+a;
 frmMain.nx182 := -4+a;
 frmMain.nx183 := -6+a;
 frmMain.nx184 := 6+a;
 frmMain.nx185 := 4+a;
 frmMain.nx186 := -4+a;
 frmMain.nx187 := -6+a;
 frmMain.nx188 := 6+a;
 frmMain.nx189 := -4+a;
 frmMain.nx190 := 4+a;
 frmMain.nx191 := -6+a;
 frmMain.nx192 := 6+a;
 frmMain.nx193 := -4+a;
 frmMain.nx194 := 4+a;
 frmMain.nx195 := -6+a;
 frmMain.nx196 := 6+a;
 frmMain.nx197 := -4+a;
 frmMain.nx198 := 4+a;
 frmMain.nx199 := -6+a;
 frmMain.nx200 := 6+a;
 frmMain.nx201 := -4+a;
 frmMain.nx202 := 4+a;
 frmMain.nx203 := -6+a;
 frmMain.nx204 := 6+a;
 frmMain.nx205 := 6+a;  //корабль
 frmMain.nx206 := 6+a;  //Подлодка
 frmMain.frmGL.Width:=800;
 a:=0;
end;

if (c=6) and (d=10) then
begin
StringGrid1.Cells[c,d]:='1';
a:=a-3;
frmMain.nx := 0+a;
  frmMain.nx1 := 0+a;
  frmMain.nx2 := 0+a;
 frmMain.nx3 := 0+a;
 frmMain.nx7 := -1+a;
 frmMain.nx8 := 1+a;
 frmMain.nx9 := -1+a;
  frmMain.nx10 := -2+a;
 frmMain.nx11 := -1+a;
 frmMain.nx12 := 1+a;
 frmMain.nx14 := 1+a;
 frmMain.nx15 := -1+a;
 frmMain.nx16 := -1+a;
 frmMain.nx17 := 1+a;
  frmMain.nx18 := -1+a;
 frmMain.nx19 := 1+a;
 frmMain.nx20 := -1+a;
 frmMain.nx21 := -1+a;
 frmMain.nx22 := 1+a;
  frmMain.nx23 := -1+a;
 frmMain.nx24 := 1+a;
  frmMain.nx25 := 1+a;
 frmMain.nx26 := -1+a;
 frmMain.nx27 := 1+a;
  frmMain.nx28 := -1+a;
  frmMain.nx29 := 1+a;
 frmMain.nx30 := -1+a;

// 1

 frmMain.nx31 := -2+a;
 frmMain.nx32 := 2+a;
 frmMain.nx33 := -2+a;
 frmMain.nx34 :=  2+a;
 frmMain.nx35 := -2+a;
 frmMain.nx36 := 2+a;
  frmMain.nx37 := -2+a;
 frmMain.nx38 := 2+a;
 frmMain.nx39 := -2+a;
 frmMain.nx40 := 2+a;
 frmMain.nx41 := -2+a;
 frmMain.nx42 := 2+a;
 frmMain.nx43 := -2+a;
 frmMain.nx44 := 2+a;
 frmMain.nx45 := -2+a;  //////////////


 //////////////////////

 frmMain.nx46 := -2+a;
 frmMain.nx47 := -2+a;
 frmMain.nx48 := 2+a;
 frmMain.nx49 := -2+a;
 frmMain.nx50 := 2+a;
 frmMain.nx51 := -3+a;
 frmMain.nx52 :=3+a;
 frmMain.nx53 := -3+a;
 frmMain.nx54 :=  3+a;
 frmMain.nx55 := -3+a;
 frmMain.nx56 := 3+a;
 frmMain.nx57 := -3+a;
 frmMain.nx58 := 3+a;
 frmMain.nx59 := -3+a;
 frmMain.nx60 := 3+a;
 frmMain.nx61 := -3+a;
 frmMain.nx62 := 3+a;
 frmMain.nx63 := -3+a;
 frmMain.nx64 := 3+a;
 frmMain.nx65 := -3+a;
 frmMain.nx66 := 3+a;
 frmMain.nx67 := -3+a;
 frmMain.nx68 := 3+a;
 frmMain.nx69 := -3+a;
 frmMain.nx70 := 3+a;


  ///3
 ///
 ///
 frmMain.nx71 := -4+a;
 frmMain.nx72 :=4+a;
 frmMain.nx73 := -4+a;
 frmMain.nx74 :=  4+a;
 frmMain.nx75 := -4+a;
 frmMain.nx76 := 4+a;
 frmMain.nx77 := -4+a;
 frmMain.nx78 := 4+a;
 frmMain.nx79 := -4+a;
 frmMain.nx80 := 4+a;
 frmMain.nx81 := -4+a;
 frmMain.nx82 := 4+a;
 frmMain.nx83 := -4+a;
 frmMain.nx84 := 4+a;
 frmMain.nx85 := -4+a;
 frmMain.nx86 := 4+a;
 frmMain.nx87 := -4+a;
 frmMain.nx88 := 4+a;
 frmMain.nx89 := -4+a;
 frmMain.nx90 := -2+a;

frmMain.nx94 :=0+a;
frmMain.nx95 :=-2+a;  //цифры
frmMain.nx96 :=-4+a;  //цифры
frmMain.nx97 :=-6+a;  //цифры
frmMain.nx98 := 2+a;  //цифры
frmMain.nx99 := 4+a;  //цифры
frmMain.nx100 := 6+a;  //цифры
frmMain.nx101 := 8+a;  //цифры
frmMain.nx102 := 10+a;  //цифры
frmMain.nx103 := 12+a;  //цифры

frmMain.nx104 := -8+a;  //буквы
frmMain.nx105 := -8+a;  //буквы
frmMain.nx106 := -8+a;  //буквы
frmMain.nx107 := -8+a;  //буквы
frmMain.nx108 := -8+a;  //буквы
frmMain.nx109 := -8+a;  //буквы
frmMain.nx110 := -8+a;  //буквы
frmMain.nx111 := -8+a;  //буквы
frmMain.nx112 := -8+a;  //буквы
frmMain.nx113 := -8+a;  //буквы

frmMain.nx114 := -6+a;  //корабль
frmMain.nx115 := 0+a;  //цифры
frmMain.nx116 :=-2+a;  //цифры
frmMain.nx117 :=-4+a;  //цифры
frmMain.nx118 :=-6+a;  //цифры
frmMain.nx119 := 2+a;  //цифры
frmMain.nx120 := 4+a;  //цифры
frmMain.nx121 := 6+a;  //цифры
frmMain.nx122 := 8+a;  //цифры
frmMain.nx123 := 10+a;  //цифры
frmMain.nx124 := 12+a;  //цифры
frmMain.nx125 := 0+a;
frmMain.nx126 := 0+a;
frmMain.nx127 := 0+a;
frmMain.nx128 := 2+a;
frmMain.nx129 := -2+a;
frmMain.nx130 := -4+a;
frmMain.nx131 := 4+a;
frmMain.nx132 := -6+a;
frmMain.nx133 := 6+a;
frmMain.nx134 := 8+a;
frmMain.nx135 := -8+a;
frmMain.nx136 := -2+a;
frmMain.nx137 := 2+a;
frmMain.nx138 := -4+a;
frmMain.nx139 := 4+a;
frmMain.nx140 := -2+a;
frmMain.nx141 := 2+a;
frmMain.nx142 := 0+a;
frmMain.nx143 := 2+a;
frmMain.nx144 := -2+a;
frmMain.nx145 := -4+a;
frmMain.nx146 := 4+a;
frmMain.nx147 := 6+a;
frmMain.nx148 := -6+a;
frmMain.nx149 := -6+a;
frmMain.nx150 := 6+a;
frmMain.nx151 := 2+a;
frmMain.nx152 := -2+a;
frmMain.nx153 := 2+a;
frmMain.nx154 := -2+a;
frmMain.nx155 := 0+a;
frmMain.nx156 := 0+a;
frmMain.nx157 := 4+a;
frmMain.nx158 := -4+a;
frmMain.nx159 := -6+a;
frmMain.nx160 := 6+a;
frmMain.nx161 := 4+a;
frmMain.nx162 := -4+a;
frmMain.nx163 := -6+a;
frmMain.nx164 := 6+a;
frmMain.nx165 := 4+a;
frmMain.nx166 := -4+a;
frmMain.nx167 := -6+a;
frmMain.nx168 := 6+a;
frmMain.nx169 := 4+a;
frmMain.nx170 := -4+a;
frmMain.nx171 := -6+a;
frmMain.nx172 := 6+a;
frmMain.nx173 := 4+a;
frmMain.nx174 := -4+a;
frmMain.nx175 := -6+a;
frmMain.nx176 := 6+a;
frmMain.nx177 := 4+a;
frmMain.nx178 := -4+a;
frmMain.nx179 := -6+a;
frmMain.nx180 := 6+a;
 frmMain.nx181 := 4+a;
 frmMain.nx182 := -4+a;
 frmMain.nx183 := -6+a;
 frmMain.nx184 := 6+a;
 frmMain.nx185 := 4+a;
 frmMain.nx186 := -4+a;
 frmMain.nx187 := -6+a;
 frmMain.nx188 := 6+a;
 frmMain.nx189 := -4+a;
 frmMain.nx190 := 4+a;
 frmMain.nx191 := -6+a;
 frmMain.nx192 := 6+a;
 frmMain.nx193 := -4+a;
 frmMain.nx194 := 4+a;
 frmMain.nx195 := -6+a;
 frmMain.nx196 := 6+a;
 frmMain.nx197 := -4+a;
 frmMain.nx198 := 4+a;
 frmMain.nx199 := -6+a;
 frmMain.nx200 := 6+a;
 frmMain.nx201 := -4+a;
 frmMain.nx202 := 4+a;
 frmMain.nx203 := -6+a;
 frmMain.nx204 := 6+a;
 frmMain.nx205 := 6+a;  //корабль
 frmMain.nx206 := 6+a;  //Подлодка
 frmMain.frmGL.Width:=800;
 a:=0;
end;

if (c=7) and (d=10) then
begin
StringGrid1.Cells[c,d]:='1';
a:=a-5;
frmMain.nx := 0+a;
  frmMain.nx1 := 0+a;
  frmMain.nx2 := 0+a;
 frmMain.nx3 := 0+a;
 frmMain.nx7 := -1+a;
 frmMain.nx8 := 1+a;
 frmMain.nx9 := -1+a;
  frmMain.nx10 := -2+a;
 frmMain.nx11 := -1+a;
 frmMain.nx12 := 1+a;
 frmMain.nx14 := 1+a;
 frmMain.nx15 := -1+a;
 frmMain.nx16 := -1+a;
 frmMain.nx17 := 1+a;
  frmMain.nx18 := -1+a;
 frmMain.nx19 := 1+a;
 frmMain.nx20 := -1+a;
 frmMain.nx21 := -1+a;
 frmMain.nx22 := 1+a;
  frmMain.nx23 := -1+a;
 frmMain.nx24 := 1+a;
  frmMain.nx25 := 1+a;
 frmMain.nx26 := -1+a;
 frmMain.nx27 := 1+a;
  frmMain.nx28 := -1+a;
  frmMain.nx29 := 1+a;
 frmMain.nx30 := -1+a;

// 1

 frmMain.nx31 := -2+a;
 frmMain.nx32 := 2+a;
 frmMain.nx33 := -2+a;
 frmMain.nx34 :=  2+a;
 frmMain.nx35 := -2+a;
 frmMain.nx36 := 2+a;
  frmMain.nx37 := -2+a;
 frmMain.nx38 := 2+a;
 frmMain.nx39 := -2+a;
 frmMain.nx40 := 2+a;
 frmMain.nx41 := -2+a;
 frmMain.nx42 := 2+a;
 frmMain.nx43 := -2+a;
 frmMain.nx44 := 2+a;
 frmMain.nx45 := -2+a;  //////////////


 //////////////////////

 frmMain.nx46 := -2+a;
 frmMain.nx47 := -2+a;
 frmMain.nx48 := 2+a;
 frmMain.nx49 := -2+a;
 frmMain.nx50 := 2+a;
 frmMain.nx51 := -3+a;
 frmMain.nx52 :=3+a;
 frmMain.nx53 := -3+a;
 frmMain.nx54 :=  3+a;
 frmMain.nx55 := -3+a;
 frmMain.nx56 := 3+a;
 frmMain.nx57 := -3+a;
 frmMain.nx58 := 3+a;
 frmMain.nx59 := -3+a;
 frmMain.nx60 := 3+a;
 frmMain.nx61 := -3+a;
 frmMain.nx62 := 3+a;
 frmMain.nx63 := -3+a;
 frmMain.nx64 := 3+a;
 frmMain.nx65 := -3+a;
 frmMain.nx66 := 3+a;
 frmMain.nx67 := -3+a;
 frmMain.nx68 := 3+a;
 frmMain.nx69 := -3+a;
 frmMain.nx70 := 3+a;


  ///3
 ///
 ///
 frmMain.nx71 := -4+a;
 frmMain.nx72 :=4+a;
 frmMain.nx73 := -4+a;
 frmMain.nx74 :=  4+a;
 frmMain.nx75 := -4+a;
 frmMain.nx76 := 4+a;
 frmMain.nx77 := -4+a;
 frmMain.nx78 := 4+a;
 frmMain.nx79 := -4+a;
 frmMain.nx80 := 4+a;
 frmMain.nx81 := -4+a;
 frmMain.nx82 := 4+a;
 frmMain.nx83 := -4+a;
 frmMain.nx84 := 4+a;
 frmMain.nx85 := -4+a;
 frmMain.nx86 := 4+a;
 frmMain.nx87 := -4+a;
 frmMain.nx88 := 4+a;
 frmMain.nx89 := -4+a;
 frmMain.nx90 := -2+a;

frmMain.nx94 :=0+a;
frmMain.nx95 :=-2+a;  //цифры
frmMain.nx96 :=-4+a;  //цифры
frmMain.nx97 :=-6+a;  //цифры
frmMain.nx98 := 2+a;  //цифры
frmMain.nx99 := 4+a;  //цифры
frmMain.nx100 := 6+a;  //цифры
frmMain.nx101 := 8+a;  //цифры
frmMain.nx102 := 10+a;  //цифры
frmMain.nx103 := 12+a;  //цифры

frmMain.nx104 := -8+a;  //буквы
frmMain.nx105 := -8+a;  //буквы
frmMain.nx106 := -8+a;  //буквы
frmMain.nx107 := -8+a;  //буквы
frmMain.nx108 := -8+a;  //буквы
frmMain.nx109 := -8+a;  //буквы
frmMain.nx110 := -8+a;  //буквы
frmMain.nx111 := -8+a;  //буквы
frmMain.nx112 := -8+a;  //буквы
frmMain.nx113 := -8+a;  //буквы

frmMain.nx114 := -6+a;  //корабль
frmMain.nx115 := 0+a;  //цифры
frmMain.nx116 :=-2+a;  //цифры
frmMain.nx117 :=-4+a;  //цифры
frmMain.nx118 :=-6+a;  //цифры
frmMain.nx119 := 2+a;  //цифры
frmMain.nx120 := 4+a;  //цифры
frmMain.nx121 := 6+a;  //цифры
frmMain.nx122 := 8+a;  //цифры
frmMain.nx123 := 10+a;  //цифры
frmMain.nx124 := 12+a;  //цифры
frmMain.nx125 := 0+a;
frmMain.nx126 := 0+a;
frmMain.nx127 := 0+a;
frmMain.nx128 := 2+a;
frmMain.nx129 := -2+a;
frmMain.nx130 := -4+a;
frmMain.nx131 := 4+a;
frmMain.nx132 := -6+a;
frmMain.nx133 := 6+a;
frmMain.nx134 := 8+a;
frmMain.nx135 := -8+a;
frmMain.nx136 := -2+a;
frmMain.nx137 := 2+a;
frmMain.nx138 := -4+a;
frmMain.nx139 := 4+a;
frmMain.nx140 := -2+a;
frmMain.nx141 := 2+a;
frmMain.nx142 := 0+a;
frmMain.nx143 := 2+a;
frmMain.nx144 := -2+a;
frmMain.nx145 := -4+a;
frmMain.nx146 := 4+a;
frmMain.nx147 := 6+a;
frmMain.nx148 := -6+a;
frmMain.nx149 := -6+a;
frmMain.nx150 := 6+a;
frmMain.nx151 := 2+a;
frmMain.nx152 := -2+a;
frmMain.nx153 := 2+a;
frmMain.nx154 := -2+a;
frmMain.nx155 := 0+a;
frmMain.nx156 := 0+a;
frmMain.nx157 := 4+a;
frmMain.nx158 := -4+a;
frmMain.nx159 := -6+a;
frmMain.nx160 := 6+a;
frmMain.nx161 := 4+a;
frmMain.nx162 := -4+a;
frmMain.nx163 := -6+a;
frmMain.nx164 := 6+a;
frmMain.nx165 := 4+a;
frmMain.nx166 := -4+a;
frmMain.nx167 := -6+a;
frmMain.nx168 := 6+a;
frmMain.nx169 := 4+a;
frmMain.nx170 := -4+a;
frmMain.nx171 := -6+a;
frmMain.nx172 := 6+a;
frmMain.nx173 := 4+a;
frmMain.nx174 := -4+a;
frmMain.nx175 := -6+a;
frmMain.nx176 := 6+a;
frmMain.nx177 := 4+a;
frmMain.nx178 := -4+a;
frmMain.nx179 := -6+a;
frmMain.nx180 := 6+a;
 frmMain.nx181 := 4+a;
 frmMain.nx182 := -4+a;
 frmMain.nx183 := -6+a;
 frmMain.nx184 := 6+a;
 frmMain.nx185 := 4+a;
 frmMain.nx186 := -4+a;
 frmMain.nx187 := -6+a;
 frmMain.nx188 := 6+a;
 frmMain.nx189 := -4+a;
 frmMain.nx190 := 4+a;
 frmMain.nx191 := -6+a;
 frmMain.nx192 := 6+a;
 frmMain.nx193 := -4+a;
 frmMain.nx194 := 4+a;
 frmMain.nx195 := -6+a;
 frmMain.nx196 := 6+a;
 frmMain.nx197 := -4+a;
 frmMain.nx198 := 4+a;
 frmMain.nx199 := -6+a;
 frmMain.nx200 := 6+a;
 frmMain.nx201 := -4+a;
 frmMain.nx202 := 4+a;
 frmMain.nx203 := -6+a;
 frmMain.nx204 := 6+a;
 frmMain.nx205 := 6+a;  //корабль
 frmMain.nx206 := 6+a;  //Подлодка
 frmMain.nx215 := -6+a;
 frmMain.frmGL.Width:=800;
 a:=0;
end;

if (c=8) and (d=10) then
begin
StringGrid1.Cells[c,d]:='1';
a:=a-7;
frmMain.nx := 0+a;
  frmMain.nx1 := 0+a;
  frmMain.nx2 := 0+a;
 frmMain.nx3 := 0+a;
 frmMain.nx7 := -1+a;
 frmMain.nx8 := 1+a;
 frmMain.nx9 := -1+a;
  frmMain.nx10 := -2+a;
 frmMain.nx11 := -1+a;
 frmMain.nx12 := 1+a;
 frmMain.nx14 := 1+a;
 frmMain.nx15 := -1+a;
 frmMain.nx16 := -1+a;
 frmMain.nx17 := 1+a;
  frmMain.nx18 := -1+a;
 frmMain.nx19 := 1+a;
 frmMain.nx20 := -1+a;
 frmMain.nx21 := -1+a;
 frmMain.nx22 := 1+a;
  frmMain.nx23 := -1+a;
 frmMain.nx24 := 1+a;
  frmMain.nx25 := 1+a;
 frmMain.nx26 := -1+a;
 frmMain.nx27 := 1+a;
  frmMain.nx28 := -1+a;
  frmMain.nx29 := 1+a;
 frmMain.nx30 := -1+a;

// 1

 frmMain.nx31 := -2+a;
 frmMain.nx32 := 2+a;
 frmMain.nx33 := -2+a;
 frmMain.nx34 :=  2+a;
 frmMain.nx35 := -2+a;
 frmMain.nx36 := 2+a;
  frmMain.nx37 := -2+a;
 frmMain.nx38 := 2+a;
 frmMain.nx39 := -2+a;
 frmMain.nx40 := 2+a;
 frmMain.nx41 := -2+a;
 frmMain.nx42 := 2+a;
 frmMain.nx43 := -2+a;
 frmMain.nx44 := 2+a;
 frmMain.nx45 := -2+a;  //////////////


 //////////////////////

 frmMain.nx46 := -2+a;
 frmMain.nx47 := -2+a;
 frmMain.nx48 := 2+a;
 frmMain.nx49 := -2+a;
 frmMain.nx50 := 2+a;
 frmMain.nx51 := -3+a;
 frmMain.nx52 :=3+a;
 frmMain.nx53 := -3+a;
 frmMain.nx54 :=  3+a;
 frmMain.nx55 := -3+a;
 frmMain.nx56 := 3+a;
 frmMain.nx57 := -3+a;
 frmMain.nx58 := 3+a;
 frmMain.nx59 := -3+a;
 frmMain.nx60 := 3+a;
 frmMain.nx61 := -3+a;
 frmMain.nx62 := 3+a;
 frmMain.nx63 := -3+a;
 frmMain.nx64 := 3+a;
 frmMain.nx65 := -3+a;
 frmMain.nx66 := 3+a;
 frmMain.nx67 := -3+a;
 frmMain.nx68 := 3+a;
 frmMain.nx69 := -3+a;
 frmMain.nx70 := 3+a;


  ///3
 ///
 ///
 frmMain.nx71 := -4+a;
 frmMain.nx72 :=4+a;
 frmMain.nx73 := -4+a;
 frmMain.nx74 :=  4+a;
 frmMain.nx75 := -4+a;
 frmMain.nx76 := 4+a;
 frmMain.nx77 := -4+a;
 frmMain.nx78 := 4+a;
 frmMain.nx79 := -4+a;
 frmMain.nx80 := 4+a;
 frmMain.nx81 := -4+a;
 frmMain.nx82 := 4+a;
 frmMain.nx83 := -4+a;
 frmMain.nx84 := 4+a;
 frmMain.nx85 := -4+a;
 frmMain.nx86 := 4+a;
 frmMain.nx87 := -4+a;
 frmMain.nx88 := 4+a;
 frmMain.nx89 := -4+a;
 frmMain.nx90 := -2+a;

frmMain.nx94 :=0+a;
frmMain.nx95 :=-2+a;  //цифры
frmMain.nx96 :=-4+a;  //цифры
frmMain.nx97 :=-6+a;  //цифры
frmMain.nx98 := 2+a;  //цифры
frmMain.nx99 := 4+a;  //цифры
frmMain.nx100 := 6+a;  //цифры
frmMain.nx101 := 8+a;  //цифры
frmMain.nx102 := 10+a;  //цифры
frmMain.nx103 := 12+a;  //цифры

frmMain.nx104 := -8+a;  //буквы
frmMain.nx105 := -8+a;  //буквы
frmMain.nx106 := -8+a;  //буквы
frmMain.nx107 := -8+a;  //буквы
frmMain.nx108 := -8+a;  //буквы
frmMain.nx109 := -8+a;  //буквы
frmMain.nx110 := -8+a;  //буквы
frmMain.nx111 := -8+a;  //буквы
frmMain.nx112 := -8+a;  //буквы
frmMain.nx113 := -8+a;  //буквы

frmMain.nx114 := -6+a;  //корабль
frmMain.nx115 := 0+a;  //цифры
frmMain.nx116 :=-2+a;  //цифры
frmMain.nx117 :=-4+a;  //цифры
frmMain.nx118 :=-6+a;  //цифры
frmMain.nx119 := 2+a;  //цифры
frmMain.nx120 := 4+a;  //цифры
frmMain.nx121 := 6+a;  //цифры
frmMain.nx122 := 8+a;  //цифры
frmMain.nx123 := 10+a;  //цифры
frmMain.nx124 := 12+a;  //цифры
frmMain.nx125 := 0+a;
frmMain.nx126 := 0+a;
frmMain.nx127 := 0+a;
frmMain.nx128 := 2+a;
frmMain.nx129 := -2+a;
frmMain.nx130 := -4+a;
frmMain.nx131 := 4+a;
frmMain.nx132 := -6+a;
frmMain.nx133 := 6+a;
frmMain.nx134 := 8+a;
frmMain.nx135 := -8+a;
frmMain.nx136 := -2+a;
frmMain.nx137 := 2+a;
frmMain.nx138 := -4+a;
frmMain.nx139 := 4+a;
frmMain.nx140 := -2+a;
frmMain.nx141 := 2+a;
frmMain.nx142 := 0+a;
frmMain.nx143 := 2+a;
frmMain.nx144 := -2+a;
frmMain.nx145 := -4+a;
frmMain.nx146 := 4+a;
frmMain.nx147 := 6+a;
frmMain.nx148 := -6+a;
frmMain.nx149 := -6+a;
frmMain.nx150 := 6+a;
frmMain.nx151 := 2+a;
frmMain.nx152 := -2+a;
frmMain.nx153 := 2+a;
frmMain.nx154 := -2+a;
frmMain.nx155 := 0+a;
frmMain.nx156 := 0+a;
frmMain.nx157 := 4+a;
frmMain.nx158 := -4+a;
frmMain.nx159 := -6+a;
frmMain.nx160 := 6+a;
frmMain.nx161 := 4+a;
frmMain.nx162 := -4+a;
frmMain.nx163 := -6+a;
frmMain.nx164 := 6+a;
frmMain.nx165 := 4+a;
frmMain.nx166 := -4+a;
frmMain.nx167 := -6+a;
frmMain.nx168 := 6+a;
frmMain.nx169 := 4+a;
frmMain.nx170 := -4+a;
frmMain.nx171 := -6+a;
frmMain.nx172 := 6+a;
frmMain.nx173 := 4+a;
frmMain.nx174 := -4+a;
frmMain.nx175 := -6+a;
frmMain.nx176 := 6+a;
frmMain.nx177 := 4+a;
frmMain.nx178 := -4+a;
frmMain.nx179 := -6+a;
frmMain.nx180 := 6+a;
 frmMain.nx181 := 4+a;
 frmMain.nx182 := -4+a;
 frmMain.nx183 := -6+a;
 frmMain.nx184 := 6+a;
 frmMain.nx185 := 4+a;
 frmMain.nx186 := -4+a;
 frmMain.nx187 := -6+a;
 frmMain.nx188 := 6+a;
 frmMain.nx189 := -4+a;
 frmMain.nx190 := 4+a;
 frmMain.nx191 := -6+a;
 frmMain.nx192 := 6+a;
 frmMain.nx193 := -4+a;
 frmMain.nx194 := 4+a;
 frmMain.nx195 := -6+a;
 frmMain.nx196 := 6+a;
 frmMain.nx197 := -4+a;
 frmMain.nx198 := 4+a;
 frmMain.nx199 := -6+a;
 frmMain.nx200 := 6+a;
 frmMain.nx201 := -4+a;
 frmMain.nx202 := 4+a;
 frmMain.nx203 := -6+a;
 frmMain.nx204 := 6+a;
 frmMain.nx205 := 6+a;  //корабль
 frmMain.nx206 := 6+a;  //Подлодка
 frmMain.nz215 := -12+b;
 frmMain.frmGL.Width:=800;
 a:=0;
end;

if (c=9) and (d=10) then
begin
StringGrid1.Cells[c,d]:='1';
a:=a-9;
frmMain.nx := 0+a;
  frmMain.nx1 := 0+a;
  frmMain.nx2 := 0+a;
 frmMain.nx3 := 0+a;
 frmMain.nx7 := -1+a;
 frmMain.nx8 := 1+a;
 frmMain.nx9 := -1+a;
  frmMain.nx10 := -2+a;
 frmMain.nx11 := -1+a;
 frmMain.nx12 := 1+a;
 frmMain.nx14 := 1+a;
 frmMain.nx15 := -1+a;
 frmMain.nx16 := -1+a;
 frmMain.nx17 := 1+a;
  frmMain.nx18 := -1+a;
 frmMain.nx19 := 1+a;
 frmMain.nx20 := -1+a;
 frmMain.nx21 := -1+a;
 frmMain.nx22 := 1+a;
  frmMain.nx23 := -1+a;
 frmMain.nx24 := 1+a;
  frmMain.nx25 := 1+a;
 frmMain.nx26 := -1+a;
 frmMain.nx27 := 1+a;
  frmMain.nx28 := -1+a;
  frmMain.nx29 := 1+a;
 frmMain.nx30 := -1+a;

// 1

 frmMain.nx31 := -2+a;
 frmMain.nx32 := 2+a;
 frmMain.nx33 := -2+a;
 frmMain.nx34 :=  2+a;
 frmMain.nx35 := -2+a;
 frmMain.nx36 := 2+a;
  frmMain.nx37 := -2+a;
 frmMain.nx38 := 2+a;
 frmMain.nx39 := -2+a;
 frmMain.nx40 := 2+a;
 frmMain.nx41 := -2+a;
 frmMain.nx42 := 2+a;
 frmMain.nx43 := -2+a;
 frmMain.nx44 := 2+a;
 frmMain.nx45 := -2+a;  //////////////


 //////////////////////

 frmMain.nx46 := -2+a;
 frmMain.nx47 := -2+a;
 frmMain.nx48 := 2+a;
 frmMain.nx49 := -2+a;
 frmMain.nx50 := 2+a;
 frmMain.nx51 := -3+a;
 frmMain.nx52 :=3+a;
 frmMain.nx53 := -3+a;
 frmMain.nx54 :=  3+a;
 frmMain.nx55 := -3+a;
 frmMain.nx56 := 3+a;
 frmMain.nx57 := -3+a;
 frmMain.nx58 := 3+a;
 frmMain.nx59 := -3+a;
 frmMain.nx60 := 3+a;
 frmMain.nx61 := -3+a;
 frmMain.nx62 := 3+a;
 frmMain.nx63 := -3+a;
 frmMain.nx64 := 3+a;
 frmMain.nx65 := -3+a;
 frmMain.nx66 := 3+a;
 frmMain.nx67 := -3+a;
 frmMain.nx68 := 3+a;
 frmMain.nx69 := -3+a;
 frmMain.nx70 := 3+a;


  ///3
 ///
 ///
 frmMain.nx71 := -4+a;
 frmMain.nx72 :=4+a;
 frmMain.nx73 := -4+a;
 frmMain.nx74 :=  4+a;
 frmMain.nx75 := -4+a;
 frmMain.nx76 := 4+a;
 frmMain.nx77 := -4+a;
 frmMain.nx78 := 4+a;
 frmMain.nx79 := -4+a;
 frmMain.nx80 := 4+a;
 frmMain.nx81 := -4+a;
 frmMain.nx82 := 4+a;
 frmMain.nx83 := -4+a;
 frmMain.nx84 := 4+a;
 frmMain.nx85 := -4+a;
 frmMain.nx86 := 4+a;
 frmMain.nx87 := -4+a;
 frmMain.nx88 := 4+a;
 frmMain.nx89 := -4+a;
 frmMain.nx90 := -2+a;

frmMain.nx94 :=0+a;
frmMain.nx95 :=-2+a;  //цифры
frmMain.nx96 :=-4+a;  //цифры
frmMain.nx97 :=-6+a;  //цифры
frmMain.nx98 := 2+a;  //цифры
frmMain.nx99 := 4+a;  //цифры
frmMain.nx100 := 6+a;  //цифры
frmMain.nx101 := 8+a;  //цифры
frmMain.nx102 := 10+a;  //цифры
frmMain.nx103 := 12+a;  //цифры

frmMain.nx104 := -8+a;  //буквы
frmMain.nx105 := -8+a;  //буквы
frmMain.nx106 := -8+a;  //буквы
frmMain.nx107 := -8+a;  //буквы
frmMain.nx108 := -8+a;  //буквы
frmMain.nx109 := -8+a;  //буквы
frmMain.nx110 := -8+a;  //буквы
frmMain.nx111 := -8+a;  //буквы
frmMain.nx112 := -8+a;  //буквы
frmMain.nx113 := -8+a;  //буквы

frmMain.nx114 := -6+a;  //корабль
frmMain.nx115 := 0+a;  //цифры
frmMain.nx116 :=-2+a;  //цифры
frmMain.nx117 :=-4+a;  //цифры
frmMain.nx118 :=-6+a;  //цифры
frmMain.nx119 := 2+a;  //цифры
frmMain.nx120 := 4+a;  //цифры
frmMain.nx121 := 6+a;  //цифры
frmMain.nx122 := 8+a;  //цифры
frmMain.nx123 := 10+a;  //цифры
frmMain.nx124 := 12+a;  //цифры
frmMain.nx125 := 0+a;
frmMain.nx126 := 0+a;
frmMain.nx127 := 0+a;
frmMain.nx128 := 2+a;
frmMain.nx129 := -2+a;
frmMain.nx130 := -4+a;
frmMain.nx131 := 4+a;
frmMain.nx132 := -6+a;
frmMain.nx133 := 6+a;
frmMain.nx134 := 8+a;
frmMain.nx135 := -8+a;
frmMain.nx136 := -2+a;
frmMain.nx137 := 2+a;
frmMain.nx138 := -4+a;
frmMain.nx139 := 4+a;
frmMain.nx140 := -2+a;
frmMain.nx141 := 2+a;
frmMain.nx142 := 0+a;
frmMain.nx143 := 2+a;
frmMain.nx144 := -2+a;
frmMain.nx145 := -4+a;
frmMain.nx146 := 4+a;
frmMain.nx147 := 6+a;
frmMain.nx148 := -6+a;
frmMain.nx149 := -6+a;
frmMain.nx150 := 6+a;
frmMain.nx151 := 2+a;
frmMain.nx152 := -2+a;
frmMain.nx153 := 2+a;
frmMain.nx154 := -2+a;
frmMain.nx155 := 0+a;
frmMain.nx156 := 0+a;
frmMain.nx157 := 4+a;
frmMain.nx158 := -4+a;
frmMain.nx159 := -6+a;
frmMain.nx160 := 6+a;
frmMain.nx161 := 4+a;
frmMain.nx162 := -4+a;
frmMain.nx163 := -6+a;
frmMain.nx164 := 6+a;
frmMain.nx165 := 4+a;
frmMain.nx166 := -4+a;
frmMain.nx167 := -6+a;
frmMain.nx168 := 6+a;
frmMain.nx169 := 4+a;
frmMain.nx170 := -4+a;
frmMain.nx171 := -6+a;
frmMain.nx172 := 6+a;
frmMain.nx173 := 4+a;
frmMain.nx174 := -4+a;
frmMain.nx175 := -6+a;
frmMain.nx176 := 6+a;
frmMain.nx177 := 4+a;
frmMain.nx178 := -4+a;
frmMain.nx179 := -6+a;
frmMain.nx180 := 6+a;
 frmMain.nx181 := 4+a;
 frmMain.nx182 := -4+a;
 frmMain.nx183 := -6+a;
 frmMain.nx184 := 6+a;
 frmMain.nx185 := 4+a;
 frmMain.nx186 := -4+a;
 frmMain.nx187 := -6+a;
 frmMain.nx188 := 6+a;
 frmMain.nx189 := -4+a;
 frmMain.nx190 := 4+a;
 frmMain.nx191 := -6+a;
 frmMain.nx192 := 6+a;
 frmMain.nx193 := -4+a;
 frmMain.nx194 := 4+a;
 frmMain.nx195 := -6+a;
 frmMain.nx196 := 6+a;
 frmMain.nx197 := -4+a;
 frmMain.nx198 := 4+a;
 frmMain.nx199 := -6+a;
 frmMain.nx200 := 6+a;
 frmMain.nx201 := -4+a;
 frmMain.nx202 := 4+a;
 frmMain.nx203 := -6+a;
 frmMain.nx204 := 6+a;
 frmMain.nx205 := 6+a;  //корабль
 frmMain.nx206 := 6+a;  //Подлодка
 frmMain.frmGL.Width:=800;
 a:=0;
end;

if (c=10) and (d=10) then
begin
StringGrid1.Cells[c,d]:='1';
a:=a-11;
frmMain.nx := 0+a;
  frmMain.nx1 := 0+a;
  frmMain.nx2 := 0+a;
 frmMain.nx3 := 0+a;
 frmMain.nx7 := -1+a;
 frmMain.nx8 := 1+a;
 frmMain.nx9 := -1+a;
  frmMain.nx10 := -2+a;
 frmMain.nx11 := -1+a;
 frmMain.nx12 := 1+a;
 frmMain.nx14 := 1+a;
 frmMain.nx15 := -1+a;
 frmMain.nx16 := -1+a;
 frmMain.nx17 := 1+a;
  frmMain.nx18 := -1+a;
 frmMain.nx19 := 1+a;
 frmMain.nx20 := -1+a;
 frmMain.nx21 := -1+a;
 frmMain.nx22 := 1+a;
  frmMain.nx23 := -1+a;
 frmMain.nx24 := 1+a;
  frmMain.nx25 := 1+a;
 frmMain.nx26 := -1+a;
 frmMain.nx27 := 1+a;
  frmMain.nx28 := -1+a;
  frmMain.nx29 := 1+a;
 frmMain.nx30 := -1+a;

// 1

 frmMain.nx31 := -2+a;
 frmMain.nx32 := 2+a;
 frmMain.nx33 := -2+a;
 frmMain.nx34 :=  2+a;
 frmMain.nx35 := -2+a;
 frmMain.nx36 := 2+a;
  frmMain.nx37 := -2+a;
 frmMain.nx38 := 2+a;
 frmMain.nx39 := -2+a;
 frmMain.nx40 := 2+a;
 frmMain.nx41 := -2+a;
 frmMain.nx42 := 2+a;
 frmMain.nx43 := -2+a;
 frmMain.nx44 := 2+a;
 frmMain.nx45 := -2+a;  //////////////


 //////////////////////

 frmMain.nx46 := -2+a;
 frmMain.nx47 := -2+a;
 frmMain.nx48 := 2+a;
 frmMain.nx49 := -2+a;
 frmMain.nx50 := 2+a;
 frmMain.nx51 := -3+a;
 frmMain.nx52 :=3+a;
 frmMain.nx53 := -3+a;
 frmMain.nx54 :=  3+a;
 frmMain.nx55 := -3+a;
 frmMain.nx56 := 3+a;
 frmMain.nx57 := -3+a;
 frmMain.nx58 := 3+a;
 frmMain.nx59 := -3+a;
 frmMain.nx60 := 3+a;
 frmMain.nx61 := -3+a;
 frmMain.nx62 := 3+a;
 frmMain.nx63 := -3+a;
 frmMain.nx64 := 3+a;
 frmMain.nx65 := -3+a;
 frmMain.nx66 := 3+a;
 frmMain.nx67 := -3+a;
 frmMain.nx68 := 3+a;
 frmMain.nx69 := -3+a;
 frmMain.nx70 := 3+a;


  ///3
 ///
 ///
 frmMain.nx71 := -4+a;
 frmMain.nx72 :=4+a;
 frmMain.nx73 := -4+a;
 frmMain.nx74 :=  4+a;
 frmMain.nx75 := -4+a;
 frmMain.nx76 := 4+a;
 frmMain.nx77 := -4+a;
 frmMain.nx78 := 4+a;
 frmMain.nx79 := -4+a;
 frmMain.nx80 := 4+a;
 frmMain.nx81 := -4+a;
 frmMain.nx82 := 4+a;
 frmMain.nx83 := -4+a;
 frmMain.nx84 := 4+a;
 frmMain.nx85 := -4+a;
 frmMain.nx86 := 4+a;
 frmMain.nx87 := -4+a;
 frmMain.nx88 := 4+a;
 frmMain.nx89 := -4+a;
 frmMain.nx90 := -2+a;

frmMain.nx94 :=0+a;
frmMain.nx95 :=-2+a;  //цифры
frmMain.nx96 :=-4+a;  //цифры
frmMain.nx97 :=-6+a;  //цифры
frmMain.nx98 := 2+a;  //цифры
frmMain.nx99 := 4+a;  //цифры
frmMain.nx100 := 6+a;  //цифры
frmMain.nx101 := 8+a;  //цифры
frmMain.nx102 := 10+a;  //цифры
frmMain.nx103 := 12+a;  //цифры

frmMain.nx104 := -8+a;  //буквы
frmMain.nx105 := -8+a;  //буквы
frmMain.nx106 := -8+a;  //буквы
frmMain.nx107 := -8+a;  //буквы
frmMain.nx108 := -8+a;  //буквы
frmMain.nx109 := -8+a;  //буквы
frmMain.nx110 := -8+a;  //буквы
frmMain.nx111 := -8+a;  //буквы
frmMain.nx112 := -8+a;  //буквы
frmMain.nx113 := -8+a;  //буквы

frmMain.nx114 := -6+a;  //корабль
frmMain.nx115 := 0+a;  //цифры
frmMain.nx116 :=-2+a;  //цифры
frmMain.nx117 :=-4+a;  //цифры
frmMain.nx118 :=-6+a;  //цифры
frmMain.nx119 := 2+a;  //цифры
frmMain.nx120 := 4+a;  //цифры
frmMain.nx121 := 6+a;  //цифры
frmMain.nx122 := 8+a;  //цифры
frmMain.nx123 := 10+a;  //цифры
frmMain.nx124 := 12+a;  //цифры
frmMain.nx125 := 0+a;
frmMain.nx126 := 0+a;
frmMain.nx127 := 0+a;
frmMain.nx128 := 2+a;
frmMain.nx129 := -2+a;
frmMain.nx130 := -4+a;
frmMain.nx131 := 4+a;
frmMain.nx132 := -6+a;
frmMain.nx133 := 6+a;
frmMain.nx134 := 8+a;
frmMain.nx135 := -8+a;
frmMain.nx136 := -2+a;
frmMain.nx137 := 2+a;
frmMain.nx138 := -4+a;
frmMain.nx139 := 4+a;
frmMain.nx140 := -2+a;
frmMain.nx141 := 2+a;
frmMain.nx142 := 0+a;
frmMain.nx143 := 2+a;
frmMain.nx144 := -2+a;
frmMain.nx145 := -4+a;
frmMain.nx146 := 4+a;
frmMain.nx147 := 6+a;
frmMain.nx148 := -6+a;
frmMain.nx149 := -6+a;
frmMain.nx150 := 6+a;
frmMain.nx151 := 2+a;
frmMain.nx152 := -2+a;
frmMain.nx153 := 2+a;
frmMain.nx154 := -2+a;
frmMain.nx155 := 0+a;
frmMain.nx156 := 0+a;
frmMain.nx157 := 4+a;
frmMain.nx158 := -4+a;
frmMain.nx159 := -6+a;
frmMain.nx160 := 6+a;
frmMain.nx161 := 4+a;
frmMain.nx162 := -4+a;
frmMain.nx163 := -6+a;
frmMain.nx164 := 6+a;
frmMain.nx165 := 4+a;
frmMain.nx166 := -4+a;
frmMain.nx167 := -6+a;
frmMain.nx168 := 6+a;
frmMain.nx169 := 4+a;
frmMain.nx170 := -4+a;
frmMain.nx171 := -6+a;
frmMain.nx172 := 6+a;
frmMain.nx173 := 4+a;
frmMain.nx174 := -4+a;
frmMain.nx175 := -6+a;
frmMain.nx176 := 6+a;
frmMain.nx177 := 4+a;
frmMain.nx178 := -4+a;
frmMain.nx179 := -6+a;
frmMain.nx180 := 6+a;
 frmMain.nx181 := 4+a;
 frmMain.nx182 := -4+a;
 frmMain.nx183 := -6+a;
 frmMain.nx184 := 6+a;
 frmMain.nx185 := 4+a;
 frmMain.nx186 := -4+a;
 frmMain.nx187 := -6+a;
 frmMain.nx188 := 6+a;
 frmMain.nx189 := -4+a;
 frmMain.nx190 := 4+a;
 frmMain.nx191 := -6+a;
 frmMain.nx192 := 6+a;
 frmMain.nx193 := -4+a;
 frmMain.nx194 := 4+a;
 frmMain.nx195 := -6+a;
 frmMain.nx196 := 6+a;
 frmMain.nx197 := -4+a;
 frmMain.nx198 := 4+a;
 frmMain.nx199 := -6+a;
 frmMain.nx200 := 6+a;
 frmMain.nx201 := -4+a;
 frmMain.nx202 := 4+a;
 frmMain.nx203 := -6+a;
 frmMain.nx204 := 6+a;
 frmMain.nx205 := 6+a;  //корабль
 frmMain.nx206 := 6+a;  //Подлодка
 frmMain.frmGL.Width:=800;
 a:=0;
end;



////////////////вертикаль
///
 if (c=1) and (d=9) then
begin
StringGrid1.Cells[c,d]:='1';
a:=a+7;
b:=b+3;
frmMain.nx := 0+a;
  frmMain.nx1 := 0+a;
  frmMain.nx2 := 0+a;
 frmMain.nx3 := 0+a;
 frmMain.nx7 := -1+a;
 frmMain.nx8 := 1+a;
 frmMain.nx9 := -1+a;
  frmMain.nx10 := -2+a;
 frmMain.nx11 := -1+a;
 frmMain.nx12 := 1+a;
 frmMain.nx14 := 1+a;
 frmMain.nx15 := -1+a;
 frmMain.nx16 := -1+a;
 frmMain.nx17 := 1+a;
  frmMain.nx18 := -1+a;
 frmMain.nx19 := 1+a;
 frmMain.nx20 := -1+a;
 frmMain.nx21 := -1+a;
 frmMain.nx22 := 1+a;
  frmMain.nx23 := -1+a;
 frmMain.nx24 := 1+a;
  frmMain.nx25 := 1+a;
 frmMain.nx26 := -1+a;
 frmMain.nx27 := 1+a;
  frmMain.nx28 := -1+a;
  frmMain.nx29 := 1+a;
 frmMain.nx30 := -1+a;

// 1

 frmMain.nx31 := -2+a;
 frmMain.nx32 := 2+a;
 frmMain.nx33 := -2+a;
 frmMain.nx34 :=  2+a;
 frmMain.nx35 := -2+a;
 frmMain.nx36 := 2+a;
  frmMain.nx37 := -2+a;
 frmMain.nx38 := 2+a;
 frmMain.nx39 := -2+a;
 frmMain.nx40 := 2+a;
 frmMain.nx41 := -2+a;
 frmMain.nx42 := 2+a;
 frmMain.nx43 := -2+a;
 frmMain.nx44 := 2+a;
 frmMain.nx45 := -2+a;  //////////////


 //////////////////////

 frmMain.nx46 := -2+a;
 frmMain.nx47 := -2+a;
 frmMain.nx48 := 2+a;
 frmMain.nx49 := -2+a;
 frmMain.nx50 := 2+a;
 frmMain.nx51 := -3+a;
 frmMain.nx52 :=3+a;
 frmMain.nx53 := -3+a;
 frmMain.nx54 :=  3+a;
 frmMain.nx55 := -3+a;
 frmMain.nx56 := 3+a;
 frmMain.nx57 := -3+a;
 frmMain.nx58 := 3+a;
 frmMain.nx59 := -3+a;
 frmMain.nx60 := 3+a;
 frmMain.nx61 := -3+a;
 frmMain.nx62 := 3+a;
 frmMain.nx63 := -3+a;
 frmMain.nx64 := 3+a;
 frmMain.nx65 := -3+a;
 frmMain.nx66 := 3+a;
 frmMain.nx67 := -3+a;
 frmMain.nx68 := 3+a;
 frmMain.nx69 := -3+a;
 frmMain.nx70 := 3+a;


  ///3
 ///
 ///
 frmMain.nx71 := -4+a;
 frmMain.nx72 :=4+a;
 frmMain.nx73 := -4+a;
 frmMain.nx74 :=  4+a;
 frmMain.nx75 := -4+a;
 frmMain.nx76 := 4+a;
 frmMain.nx77 := -4+a;
 frmMain.nx78 := 4+a;
 frmMain.nx79 := -4+a;
 frmMain.nx80 := 4+a;
 frmMain.nx81 := -4+a;
 frmMain.nx82 := 4+a;
 frmMain.nx83 := -4+a;
 frmMain.nx84 := 4+a;
 frmMain.nx85 := -4+a;
 frmMain.nx86 := 4+a;
 frmMain.nx87 := -4+a;
 frmMain.nx88 := 4+a;
 frmMain.nx89 := -4+a;
 frmMain.nx90 := -2+a;

frmMain.nx94 :=0+a;
frmMain.nx95 :=-2+a;  //цифры
frmMain.nx96 :=-4+a;  //цифры
frmMain.nx97 :=-6+a;  //цифры
frmMain.nx98 := 2+a;  //цифры
frmMain.nx99 := 4+a;  //цифры
frmMain.nx100 := 6+a;  //цифры
frmMain.nx101 := 8+a;  //цифры
frmMain.nx102 := 10+a;  //цифры
frmMain.nx103 := 12+a;  //цифры

frmMain.nx104 := -8+a;  //буквы
frmMain.nx105 := -8+a;  //буквы
frmMain.nx106 := -8+a;  //буквы
frmMain.nx107 := -8+a;  //буквы
frmMain.nx108 := -8+a;  //буквы
frmMain.nx109 := -8+a;  //буквы
frmMain.nx110 := -8+a;  //буквы
frmMain.nx111 := -8+a;  //буквы
frmMain.nx112 := -8+a;  //буквы
frmMain.nx113 := -8+a;  //буквы

frmMain.nx114 := -6+a;  //корабль
frmMain.nx115 := 0+a;  //цифры
frmMain.nx116 :=-2+a;  //цифры
frmMain.nx117 :=-4+a;  //цифры
frmMain.nx118 :=-6+a;  //цифры
frmMain.nx119 := 2+a;  //цифры
frmMain.nx120 := 4+a;  //цифры
frmMain.nx121 := 6+a;  //цифры
frmMain.nx122 := 8+a;  //цифры
frmMain.nx123 := 10+a;  //цифры
frmMain.nx124 := 12+a;  //цифры
frmMain.nx125 := 0+a;
frmMain.nx126 := 0+a;
frmMain.nx127 := 0+a;
frmMain.nx128 := 2+a;
frmMain.nx129 := -2+a;
frmMain.nx130 := -4+a;
frmMain.nx131 := 4+a;
frmMain.nx132 := -6+a;
frmMain.nx133 := 6+a;
frmMain.nx134 := 8+a;
frmMain.nx135 := -8+a;
frmMain.nx136 := -2+a;
frmMain.nx137 := 2+a;
frmMain.nx138 := -4+a;
frmMain.nx139 := 4+a;
frmMain.nx140 := -2+a;
frmMain.nx141 := 2+a;
frmMain.nx142 := 0+a;
frmMain.nx143 := 2+a;
frmMain.nx144 := -2+a;
frmMain.nx145 := -4+a;
frmMain.nx146 := 4+a;
frmMain.nx147 := 6+a;
frmMain.nx148 := -6+a;
frmMain.nx149 := -6+a;
frmMain.nx150 := 6+a;
frmMain.nx151 := 2+a;
frmMain.nx152 := -2+a;
frmMain.nx153 := 2+a;
frmMain.nx154 := -2+a;
frmMain.nx155 := 0+a;
frmMain.nx156 := 0+a;
frmMain.nx157 := 4+a;
frmMain.nx158 := -4+a;
frmMain.nx159 := -6+a;
frmMain.nx160 := 6+a;
frmMain.nx161 := 4+a;
frmMain.nx162 := -4+a;
frmMain.nx163 := -6+a;
frmMain.nx164 := 6+a;
frmMain.nx165 := 4+a;
frmMain.nx166 := -4+a;
frmMain.nx167 := -6+a;
frmMain.nx168 := 6+a;
frmMain.nx169 := 4+a;
frmMain.nx170 := -4+a;
frmMain.nx171 := -6+a;
frmMain.nx172 := 6+a;
frmMain.nx173 := 4+a;
frmMain.nx174 := -4+a;
frmMain.nx175 := -6+a;
frmMain.nx176 := 6+a;
frmMain.nx177 := 4+a;
frmMain.nx178 := -4+a;
frmMain.nx179 := -6+a;
frmMain.nx180 := 6+a;
 frmMain.nx181 := 4+a;
 frmMain.nx182 := -4+a;
 frmMain.nx183 := -6+a;
 frmMain.nx184 := 6+a;
 frmMain.nx185 := 4+a;
 frmMain.nx186 := -4+a;
 frmMain.nx187 := -6+a;
 frmMain.nx188 := 6+a;
 frmMain.nx189 := -4+a;
 frmMain.nx190 := 4+a;
 frmMain.nx191 := -6+a;
 frmMain.nx192 := 6+a;
 frmMain.nx193 := -4+a;
 frmMain.nx194 := 4+a;
 frmMain.nx195 := -6+a;
 frmMain.nx196 := 6+a;
 frmMain.nx197 := -4+a;
 frmMain.nx198 := 4+a;
 frmMain.nx199 := -6+a;
 frmMain.nx200 := 6+a;
 frmMain.nx201 := -4+a;
 frmMain.nx202 := 4+a;
 frmMain.nx203 := -6+a;
 frmMain.nx204 := 6+a;
 frmMain.nx205 := 6+a;  //корабль
 frmMain.nx206 := 6+a;  //Подлодка
 frmMain.nx215 := -6+a;
 frmMain.frmGL.Width:=800;
 a:=0;
 frmMain.nz := 0+b;
  frmMain.nz1 := 0+b;
  frmMain.nz2 := 0+b;
 frmMain.nz3 := 1+b;
 frmMain.nz7 := 0+b;
 frmMain.nz8 := 2+b;
 frmMain.nz9 := 2+b;
  frmMain.nz10 := -2+b;
 frmMain.nz11 := -2+b;
 frmMain.nz12 := -2+b;
 frmMain.nz14 := -3+b;
 frmMain.nz15 := -3+b;
 frmMain.nz16 := -4+b;
 frmMain.nz17 := -4+b;
  frmMain.nz18 := -5+b;
 frmMain.nz19 := -5+b;
 frmMain.nz20 := -6+b;
 frmMain.nz21 := -7+b;
 frmMain.nz22 := -7+b;
  frmMain.nz23 := -8+b;
 frmMain.nz24 := -8+b;
  frmMain.nz25 := -9+b;
 frmMain.nz26 := -9+b;
 frmMain.nz27 := -10+b;
  frmMain.nz28 := -10+b;
  frmMain.nz29 := -11+b;
 frmMain.nz30 := -11+b;

// 1

 frmMain.nz31 := -2+b;
 frmMain.nz32 := -2+b;
 frmMain.nz33 := -3+b;
 frmMain.nz34 := -3+b;
 frmMain.nz35 := -4+b;
 frmMain.nz36 := -4+b;
  frmMain.nz37 := -5+b;
 frmMain.nz38 := -5+b;
 frmMain.nz39 := -6+b;
 frmMain.nz40 := -6+b;
 frmMain.nz41 := -7+b;
 frmMain.nz42 := -7+b;
 frmMain.nz43 := -8+b;
 frmMain.nz44 := -8+b;
 frmMain.nz45 := -9+b;  //////////////


 //////////////////////

 frmMain.nz46 := -9+b;
 frmMain.nz47 := -9+b;
 frmMain.nz48 := -10+b;
 frmMain.nz49 := -11+b;
 frmMain.nz50 := -11+b;
 frmMain.nz51 := -2+b;
 frmMain.nz52 :=-2+b;
 frmMain.nz53 := -3+b;
 frmMain.nz54 :=  3+b;
 frmMain.nz55 := -3+b;
 frmMain.nz56 := -4+b;
 frmMain.nz57 := -5+b;
 frmMain.nz58 := -5+b;
 frmMain.nz59 := -6+b;
 frmMain.nz60 := -6+b;
 frmMain.nz61 := -7+b;
 frmMain.nz62 := -7+b;
 frmMain.nz63 := -8+b;
 frmMain.nz64 := -8+b;
 frmMain.nz65 := -9+b;
 frmMain.nz66 := -9+b;
 frmMain.nz67 := -10+b;
 frmMain.nz68 := -10+b;
 frmMain.nz69 := -11+b;
 frmMain.nz70 := -11+b;


  ///3
 ///
 ///
 frmMain.nz71 := -2+b;
 frmMain.nz72 :=-2+b;
 frmMain.nz73 := -3+b;
 frmMain.nz74 :=  -3+b;
 frmMain.nz75 := -4+b;
 frmMain.nz76 := -4+b;
 frmMain.nz77 := -5+b;
 frmMain.nz78 := -5+b;
 frmMain.nz79 := -6+b;
 frmMain.nz80 := -6+b;
 frmMain.nz81 := -7+b;
 frmMain.nz82 := -7+b;
 frmMain.nz83 := -8+b;
 frmMain.nz84 := -8+b;
 frmMain.nz85 := -9+b;
 frmMain.nz86 := -9+b;
 frmMain.nz87 := -10+b;
 frmMain.nz88 := -10+b;
 frmMain.nz89 := -11+b;
 frmMain.nz90 := -2+b;

frmMain.nz94 :=1+b;
frmMain.nz95 :=1+b;  //цифры
frmMain.nz96 :=1+b;  //цифры
frmMain.nz97 :=1+b;  //цифры
frmMain.nz98 := 1+b;  //цифры
frmMain.nz99 := 1+b;  //цифры
frmMain.nz100 := 1+b;  //цифры
frmMain.nz101 := 1+b;  //цифры
frmMain.nz102 := 1+b;  //цифры
frmMain.nz103 := 1+b;  //цифры

frmMain.nz104 := -0+b;  //буквы
frmMain.nz105 := -2+b;  //буквы
frmMain.nz106 := -4+b;  //буквы
frmMain.nz107 := -6+b;  //буквы
frmMain.nz108 := -8+b;  //буквы
frmMain.nz109 := -10+b;  //буквы
frmMain.nz110 := -12+b;  //буквы
frmMain.nz111 := -14+b;  //буквы
frmMain.nz112 := -16+b;  //буквы
frmMain.nz113 := -18+b;  //буквы

frmMain.nz114 := -4+b;  //корабль
frmMain.nz115 := -18+b;  //цифры
frmMain.nz116 :=-18+b;  //цифры
frmMain.nz117 :=-18+b;  //цифры
frmMain.nz118 :=-18+b;  //цифры
frmMain.nz119 := -18+b;  //цифры
frmMain.nz120 := -18+b;  //цифры
frmMain.nz121 := -18+b;  //цифры
frmMain.nz122 := -18+b;  //цифры
frmMain.nz123 := -18+b;  //цифры
frmMain.nz124 := -18+b;  //цифры
frmMain.nz125 := -16+b;
frmMain.nz126 := -14+b;
frmMain.nz127 := -12+b;
frmMain.nz128 := -16+b;
frmMain.nz129 := -16+b;
frmMain.nz130 := -16+b;
frmMain.nz131 := -16+b;
frmMain.nz132 := -16+b;
frmMain.nz133 := -16+b;
frmMain.nz134 := -16+b;
frmMain.nz135 := -16+b;
frmMain.nz136 := -14+b;
frmMain.nz137 := -14+b;
frmMain.nz138 := -14+b;
frmMain.nz139 := -14+b;
frmMain.nz140 := -14+b;
frmMain.nz141 := -15+b;
frmMain.nz142 := -15+b;
frmMain.nz143 := -15+b;
frmMain.nz144 := -15+b;
frmMain.nz145 := -15+b;
frmMain.nz146 := -15+b;
frmMain.nz147 := -15+b;
frmMain.nz148 := -15+b;
frmMain.nz149 := -14+b;
frmMain.nz150 := -14+b;
frmMain.nz151 := -12+b;
frmMain.nz152 := -12+b;
frmMain.nz153 := -13+b;
frmMain.nz154 := -13+b;
frmMain.nz155 := -13+b;
frmMain.nz156 := -6+b;
frmMain.nz157 := -12+b;
frmMain.nz158 := -12+b;
frmMain.nz159 := -12+b;
frmMain.nz160 := -12+b;
frmMain.nz161 := -10+b;
frmMain.nz162 := -10+b;
frmMain.nz163 := -10+b;
frmMain.nz164 := -10+b;
frmMain.nz165 := -8+b;
frmMain.nz166 := -8+b;
frmMain.nz167 := -8+b;
frmMain.nz168 := -8+b;
frmMain.nz169 := -6+b;
frmMain.nz170 := -6+b;
frmMain.nz171 := -6+b;
frmMain.nz172 := -6+b;
frmMain.nz173 := -4+b;
frmMain.nz174 := -4+b;
frmMain.nz175 := -4+b;
frmMain.nz176 := -4+b;
frmMain.nz177 := -2+b;
frmMain.nz178 := -2+b;
frmMain.nz179 := -2+b;
frmMain.nz180 := -2+b;
 frmMain.nz181 := -3+b;
 frmMain.nz182 := -3+b;
 frmMain.nz183 := -3+b;
 frmMain.nz184 := -3+b;
 frmMain.nz185 := -5+b;
 frmMain.nz186 := -5+b;
 frmMain.nz187 := -5+b;
 frmMain.nz188 := -5+b;
 frmMain.nz189 := -7+b;
 frmMain.nz190 := -7+b;
 frmMain.nz191 := -7+b;
 frmMain.nz192 := -7+b;
 frmMain.nz193 := -9+b;
 frmMain.nz194 := -9+b;
 frmMain.nz195 := -9+b;
 frmMain.nz196 := -9+b;
 frmMain.nz197 := -11+b;
 frmMain.nz198 := -11+b;
 frmMain.nz199 := -11+b;
 frmMain.nz200 := -11+b;
 frmMain.nz201 := -13+b;
 frmMain.nz202 := -13+b;
 frmMain.nz203 := -13+b;
 frmMain.nz204 := -13+b;
 frmMain.nz205 := -4+b;  //корабль
 frmMain.nz206 := -8+b;  //Подлодка
 frmMain.nz215 := -12+b;
 frmMain.frmGL.Width:=800;
 b:=0;
 b:=0;


end;









if (c=2) and (d=9) then
begin
StringGrid1.Cells[c,d]:='1';
a:=a+5;
b:=b+3;
frmMain.nx := 0+a;
  frmMain.nx1 := 0+a;
  frmMain.nx2 := 0+a;
 frmMain.nx3 := 0+a;
 frmMain.nx7 := -1+a;
 frmMain.nx8 := 1+a;
 frmMain.nx9 := -1+a;
  frmMain.nx10 := -2+a;
 frmMain.nx11 := -1+a;
 frmMain.nx12 := 1+a;
 frmMain.nx14 := 1+a;
 frmMain.nx15 := -1+a;
 frmMain.nx16 := -1+a;
 frmMain.nx17 := 1+a;
  frmMain.nx18 := -1+a;
 frmMain.nx19 := 1+a;
 frmMain.nx20 := -1+a;
 frmMain.nx21 := -1+a;
 frmMain.nx22 := 1+a;
  frmMain.nx23 := -1+a;
 frmMain.nx24 := 1+a;
  frmMain.nx25 := 1+a;
 frmMain.nx26 := -1+a;
 frmMain.nx27 := 1+a;
  frmMain.nx28 := -1+a;
  frmMain.nx29 := 1+a;
 frmMain.nx30 := -1+a;

// 1

 frmMain.nx31 := -2+a;
 frmMain.nx32 := 2+a;
 frmMain.nx33 := -2+a;
 frmMain.nx34 :=  2+a;
 frmMain.nx35 := -2+a;
 frmMain.nx36 := 2+a;
  frmMain.nx37 := -2+a;
 frmMain.nx38 := 2+a;
 frmMain.nx39 := -2+a;
 frmMain.nx40 := 2+a;
 frmMain.nx41 := -2+a;
 frmMain.nx42 := 2+a;
 frmMain.nx43 := -2+a;
 frmMain.nx44 := 2+a;
 frmMain.nx45 := -2+a;  //////////////


 //////////////////////

 frmMain.nx46 := -2+a;
 frmMain.nx47 := -2+a;
 frmMain.nx48 := 2+a;
 frmMain.nx49 := -2+a;
 frmMain.nx50 := 2+a;
 frmMain.nx51 := -3+a;
 frmMain.nx52 :=3+a;
 frmMain.nx53 := -3+a;
 frmMain.nx54 :=  3+a;
 frmMain.nx55 := -3+a;
 frmMain.nx56 := 3+a;
 frmMain.nx57 := -3+a;
 frmMain.nx58 := 3+a;
 frmMain.nx59 := -3+a;
 frmMain.nx60 := 3+a;
 frmMain.nx61 := -3+a;
 frmMain.nx62 := 3+a;
 frmMain.nx63 := -3+a;
 frmMain.nx64 := 3+a;
 frmMain.nx65 := -3+a;
 frmMain.nx66 := 3+a;
 frmMain.nx67 := -3+a;
 frmMain.nx68 := 3+a;
 frmMain.nx69 := -3+a;
 frmMain.nx70 := 3+a;


  ///3
 ///
 ///
 frmMain.nx71 := -4+a;
 frmMain.nx72 :=4+a;
 frmMain.nx73 := -4+a;
 frmMain.nx74 :=  4+a;
 frmMain.nx75 := -4+a;
 frmMain.nx76 := 4+a;
 frmMain.nx77 := -4+a;
 frmMain.nx78 := 4+a;
 frmMain.nx79 := -4+a;
 frmMain.nx80 := 4+a;
 frmMain.nx81 := -4+a;
 frmMain.nx82 := 4+a;
 frmMain.nx83 := -4+a;
 frmMain.nx84 := 4+a;
 frmMain.nx85 := -4+a;
 frmMain.nx86 := 4+a;
 frmMain.nx87 := -4+a;
 frmMain.nx88 := 4+a;
 frmMain.nx89 := -4+a;
 frmMain.nx90 := -2+a;

frmMain.nx94 :=0+a;
frmMain.nx95 :=-2+a;  //цифры
frmMain.nx96 :=-4+a;  //цифры
frmMain.nx97 :=-6+a;  //цифры
frmMain.nx98 := 2+a;  //цифры
frmMain.nx99 := 4+a;  //цифры
frmMain.nx100 := 6+a;  //цифры
frmMain.nx101 := 8+a;  //цифры
frmMain.nx102 := 10+a;  //цифры
frmMain.nx103 := 12+a;  //цифры

frmMain.nx104 := -8+a;  //буквы
frmMain.nx105 := -8+a;  //буквы
frmMain.nx106 := -8+a;  //буквы
frmMain.nx107 := -8+a;  //буквы
frmMain.nx108 := -8+a;  //буквы
frmMain.nx109 := -8+a;  //буквы
frmMain.nx110 := -8+a;  //буквы
frmMain.nx111 := -8+a;  //буквы
frmMain.nx112 := -8+a;  //буквы
frmMain.nx113 := -8+a;  //буквы

frmMain.nx114 := -6+a;  //корабль
frmMain.nx115 := 0+a;  //цифры
frmMain.nx116 :=-2+a;  //цифры
frmMain.nx117 :=-4+a;  //цифры
frmMain.nx118 :=-6+a;  //цифры
frmMain.nx119 := 2+a;  //цифры
frmMain.nx120 := 4+a;  //цифры
frmMain.nx121 := 6+a;  //цифры
frmMain.nx122 := 8+a;  //цифры
frmMain.nx123 := 10+a;  //цифры
frmMain.nx124 := 12+a;  //цифры
frmMain.nx125 := 0+a;
frmMain.nx126 := 0+a;
frmMain.nx127 := 0+a;
frmMain.nx128 := 2+a;
frmMain.nx129 := -2+a;
frmMain.nx130 := -4+a;
frmMain.nx131 := 4+a;
frmMain.nx132 := -6+a;
frmMain.nx133 := 6+a;
frmMain.nx134 := 8+a;
frmMain.nx135 := -8+a;
frmMain.nx136 := -2+a;
frmMain.nx137 := 2+a;
frmMain.nx138 := -4+a;
frmMain.nx139 := 4+a;
frmMain.nx140 := -2+a;
frmMain.nx141 := 2+a;
frmMain.nx142 := 0+a;
frmMain.nx143 := 2+a;
frmMain.nx144 := -2+a;
frmMain.nx145 := -4+a;
frmMain.nx146 := 4+a;
frmMain.nx147 := 6+a;
frmMain.nx148 := -6+a;
frmMain.nx149 := -6+a;
frmMain.nx150 := 6+a;
frmMain.nx151 := 2+a;
frmMain.nx152 := -2+a;
frmMain.nx153 := 2+a;
frmMain.nx154 := -2+a;
frmMain.nx155 := 0+a;
frmMain.nx156 := 0+a;
frmMain.nx157 := 4+a;
frmMain.nx158 := -4+a;
frmMain.nx159 := -6+a;
frmMain.nx160 := 6+a;
frmMain.nx161 := 4+a;
frmMain.nx162 := -4+a;
frmMain.nx163 := -6+a;
frmMain.nx164 := 6+a;
frmMain.nx165 := 4+a;
frmMain.nx166 := -4+a;
frmMain.nx167 := -6+a;
frmMain.nx168 := 6+a;
frmMain.nx169 := 4+a;
frmMain.nx170 := -4+a;
frmMain.nx171 := -6+a;
frmMain.nx172 := 6+a;
frmMain.nx173 := 4+a;
frmMain.nx174 := -4+a;
frmMain.nx175 := -6+a;
frmMain.nx176 := 6+a;
frmMain.nx177 := 4+a;
frmMain.nx178 := -4+a;
frmMain.nx179 := -6+a;
frmMain.nx180 := 6+a;
 frmMain.nx181 := 4+a;
 frmMain.nx182 := -4+a;
 frmMain.nx183 := -6+a;
 frmMain.nx184 := 6+a;
 frmMain.nx185 := 4+a;
 frmMain.nx186 := -4+a;
 frmMain.nx187 := -6+a;
 frmMain.nx188 := 6+a;
 frmMain.nx189 := -4+a;
 frmMain.nx190 := 4+a;
 frmMain.nx191 := -6+a;
 frmMain.nx192 := 6+a;
 frmMain.nx193 := -4+a;
 frmMain.nx194 := 4+a;
 frmMain.nx195 := -6+a;
 frmMain.nx196 := 6+a;
 frmMain.nx197 := -4+a;
 frmMain.nx198 := 4+a;
 frmMain.nx199 := -6+a;
 frmMain.nx200 := 6+a;
 frmMain.nx201 := -4+a;
 frmMain.nx202 := 4+a;
 frmMain.nx203 := -6+a;
 frmMain.nx204 := 6+a;
 frmMain.nx205 := 6+a;  //корабль
 frmMain.nx206 := 6+a;  //Подлодка
 frmMain.nx215 := -6+a;
 frmMain.frmGL.Width:=800;
 a:=0;
 frmMain.nz := 0+b;
  frmMain.nz1 := 0+b;
  frmMain.nz2 := 0+b;
 frmMain.nz3 := 1+b;
 frmMain.nz7 := 0+b;
 frmMain.nz8 := 2+b;
 frmMain.nz9 := 2+b;
  frmMain.nz10 := -2+b;
 frmMain.nz11 := -2+b;
 frmMain.nz12 := -2+b;
 frmMain.nz14 := -3+b;
 frmMain.nz15 := -3+b;
 frmMain.nz16 := -4+b;
 frmMain.nz17 := -4+b;
  frmMain.nz18 := -5+b;
 frmMain.nz19 := -5+b;
 frmMain.nz20 := -6+b;
 frmMain.nz21 := -7+b;
 frmMain.nz22 := -7+b;
  frmMain.nz23 := -8+b;
 frmMain.nz24 := -8+b;
  frmMain.nz25 := -9+b;
 frmMain.nz26 := -9+b;
 frmMain.nz27 := -10+b;
  frmMain.nz28 := -10+b;
  frmMain.nz29 := -11+b;
 frmMain.nz30 := -11+b;

// 1

 frmMain.nz31 := -2+b;
 frmMain.nz32 := -2+b;
 frmMain.nz33 := -3+b;
 frmMain.nz34 := -3+b;
 frmMain.nz35 := -4+b;
 frmMain.nz36 := -4+b;
  frmMain.nz37 := -5+b;
 frmMain.nz38 := -5+b;
 frmMain.nz39 := -6+b;
 frmMain.nz40 := -6+b;
 frmMain.nz41 := -7+b;
 frmMain.nz42 := -7+b;
 frmMain.nz43 := -8+b;
 frmMain.nz44 := -8+b;
 frmMain.nz45 := -9+b;  //////////////


 //////////////////////

 frmMain.nz46 := -9+b;
 frmMain.nz47 := -9+b;
 frmMain.nz48 := -10+b;
 frmMain.nz49 := -11+b;
 frmMain.nz50 := -11+b;
 frmMain.nz51 := -2+b;
 frmMain.nz52 :=-2+b;
 frmMain.nz53 := -3+b;
 frmMain.nz54 :=  3+b;
 frmMain.nz55 := -3+b;
 frmMain.nz56 := -4+b;
 frmMain.nz57 := -5+b;
 frmMain.nz58 := -5+b;
 frmMain.nz59 := -6+b;
 frmMain.nz60 := -6+b;
 frmMain.nz61 := -7+b;
 frmMain.nz62 := -7+b;
 frmMain.nz63 := -8+b;
 frmMain.nz64 := -8+b;
 frmMain.nz65 := -9+b;
 frmMain.nz66 := -9+b;
 frmMain.nz67 := -10+b;
 frmMain.nz68 := -10+b;
 frmMain.nz69 := -11+b;
 frmMain.nz70 := -11+b;


  ///3
 ///
 ///
 frmMain.nz71 := -2+b;
 frmMain.nz72 :=-2+b;
 frmMain.nz73 := -3+b;
 frmMain.nz74 :=  -3+b;
 frmMain.nz75 := -4+b;
 frmMain.nz76 := -4+b;
 frmMain.nz77 := -5+b;
 frmMain.nz78 := -5+b;
 frmMain.nz79 := -6+b;
 frmMain.nz80 := -6+b;
 frmMain.nz81 := -7+b;
 frmMain.nz82 := -7+b;
 frmMain.nz83 := -8+b;
 frmMain.nz84 := -8+b;
 frmMain.nz85 := -9+b;
 frmMain.nz86 := -9+b;
 frmMain.nz87 := -10+b;
 frmMain.nz88 := -10+b;
 frmMain.nz89 := -11+b;
 frmMain.nz90 := -2+b;

frmMain.nz94 :=1+b;
frmMain.nz95 :=1+b;  //цифры
frmMain.nz96 :=1+b;  //цифры
frmMain.nz97 :=1+b;  //цифры
frmMain.nz98 := 1+b;  //цифры
frmMain.nz99 := 1+b;  //цифры
frmMain.nz100 := 1+b;  //цифры
frmMain.nz101 := 1+b;  //цифры
frmMain.nz102 := 1+b;  //цифры
frmMain.nz103 := 1+b;  //цифры

frmMain.nz104 := -0+b;  //буквы
frmMain.nz105 := -2+b;  //буквы
frmMain.nz106 := -4+b;  //буквы
frmMain.nz107 := -6+b;  //буквы
frmMain.nz108 := -8+b;  //буквы
frmMain.nz109 := -10+b;  //буквы
frmMain.nz110 := -12+b;  //буквы
frmMain.nz111 := -14+b;  //буквы
frmMain.nz112 := -16+b;  //буквы
frmMain.nz113 := -18+b;  //буквы

frmMain.nz114 := -4+b;  //корабль
frmMain.nz115 := -18+b;  //цифры
frmMain.nz116 :=-18+b;  //цифры
frmMain.nz117 :=-18+b;  //цифры
frmMain.nz118 :=-18+b;  //цифры
frmMain.nz119 := -18+b;  //цифры
frmMain.nz120 := -18+b;  //цифры
frmMain.nz121 := -18+b;  //цифры
frmMain.nz122 := -18+b;  //цифры
frmMain.nz123 := -18+b;  //цифры
frmMain.nz124 := -18+b;  //цифры
frmMain.nz125 := -16+b;
frmMain.nz126 := -14+b;
frmMain.nz127 := -12+b;
frmMain.nz128 := -16+b;
frmMain.nz129 := -16+b;
frmMain.nz130 := -16+b;
frmMain.nz131 := -16+b;
frmMain.nz132 := -16+b;
frmMain.nz133 := -16+b;
frmMain.nz134 := -16+b;
frmMain.nz135 := -16+b;
frmMain.nz136 := -14+b;
frmMain.nz137 := -14+b;
frmMain.nz138 := -14+b;
frmMain.nz139 := -14+b;
frmMain.nz140 := -14+b;
frmMain.nz141 := -15+b;
frmMain.nz142 := -15+b;
frmMain.nz143 := -15+b;
frmMain.nz144 := -15+b;
frmMain.nz145 := -15+b;
frmMain.nz146 := -15+b;
frmMain.nz147 := -15+b;
frmMain.nz148 := -15+b;
frmMain.nz149 := -14+b;
frmMain.nz150 := -14+b;
frmMain.nz151 := -12+b;
frmMain.nz152 := -12+b;
frmMain.nz153 := -13+b;
frmMain.nz154 := -13+b;
frmMain.nz155 := -13+b;
frmMain.nz156 := -6+b;
frmMain.nz157 := -12+b;
frmMain.nz158 := -12+b;
frmMain.nz159 := -12+b;
frmMain.nz160 := -12+b;
frmMain.nz161 := -10+b;
frmMain.nz162 := -10+b;
frmMain.nz163 := -10+b;
frmMain.nz164 := -10+b;
frmMain.nz165 := -8+b;
frmMain.nz166 := -8+b;
frmMain.nz167 := -8+b;
frmMain.nz168 := -8+b;
frmMain.nz169 := -6+b;
frmMain.nz170 := -6+b;
frmMain.nz171 := -6+b;
frmMain.nz172 := -6+b;
frmMain.nz173 := -4+b;
frmMain.nz174 := -4+b;
frmMain.nz175 := -4+b;
frmMain.nz176 := -4+b;
frmMain.nz177 := -2+b;
frmMain.nz178 := -2+b;
frmMain.nz179 := -2+b;
frmMain.nz180 := -2+b;
 frmMain.nz181 := -3+b;
 frmMain.nz182 := -3+b;
 frmMain.nz183 := -3+b;
 frmMain.nz184 := -3+b;
 frmMain.nz185 := -5+b;
 frmMain.nz186 := -5+b;
 frmMain.nz187 := -5+b;
 frmMain.nz188 := -5+b;
 frmMain.nz189 := -7+b;
 frmMain.nz190 := -7+b;
 frmMain.nz191 := -7+b;
 frmMain.nz192 := -7+b;
 frmMain.nz193 := -9+b;
 frmMain.nz194 := -9+b;
 frmMain.nz195 := -9+b;
 frmMain.nz196 := -9+b;
 frmMain.nz197 := -11+b;
 frmMain.nz198 := -11+b;
 frmMain.nz199 := -11+b;
 frmMain.nz200 := -11+b;
 frmMain.nz201 := -13+b;
 frmMain.nz202 := -13+b;
 frmMain.nz203 := -13+b;
 frmMain.nz204 := -13+b;
 frmMain.nz205 := -4+b;  //корабль
 frmMain.nz206 := -8+b;  //Подлодка
 frmMain.nz215 := -12+b;  //Подлодка
 frmMain.frmGL.Width:=800;
 b:=0;


end;



if (c=3) and (d=9) then
begin
StringGrid1.Cells[c,d]:='1';
a:=a+3;
b:=b+3;
frmMain.nx := 0+a;
  frmMain.nx1 := 0+a;
  frmMain.nx2 := 0+a;
 frmMain.nx3 := 0+a;
 frmMain.nx7 := -1+a;
 frmMain.nx8 := 1+a;
 frmMain.nx9 := -1+a;
  frmMain.nx10 := -2+a;
 frmMain.nx11 := -1+a;
 frmMain.nx12 := 1+a;
 frmMain.nx14 := 1+a;
 frmMain.nx15 := -1+a;
 frmMain.nx16 := -1+a;
 frmMain.nx17 := 1+a;
  frmMain.nx18 := -1+a;
 frmMain.nx19 := 1+a;
 frmMain.nx20 := -1+a;
 frmMain.nx21 := -1+a;
 frmMain.nx22 := 1+a;
  frmMain.nx23 := -1+a;
 frmMain.nx24 := 1+a;
  frmMain.nx25 := 1+a;
 frmMain.nx26 := -1+a;
 frmMain.nx27 := 1+a;
  frmMain.nx28 := -1+a;
  frmMain.nx29 := 1+a;
 frmMain.nx30 := -1+a;

// 1

 frmMain.nx31 := -2+a;
 frmMain.nx32 := 2+a;
 frmMain.nx33 := -2+a;
 frmMain.nx34 :=  2+a;
 frmMain.nx35 := -2+a;
 frmMain.nx36 := 2+a;
  frmMain.nx37 := -2+a;
 frmMain.nx38 := 2+a;
 frmMain.nx39 := -2+a;
 frmMain.nx40 := 2+a;
 frmMain.nx41 := -2+a;
 frmMain.nx42 := 2+a;
 frmMain.nx43 := -2+a;
 frmMain.nx44 := 2+a;
 frmMain.nx45 := -2+a;  //////////////


 //////////////////////

 frmMain.nx46 := -2+a;
 frmMain.nx47 := -2+a;
 frmMain.nx48 := 2+a;
 frmMain.nx49 := -2+a;
 frmMain.nx50 := 2+a;
 frmMain.nx51 := -3+a;
 frmMain.nx52 :=3+a;
 frmMain.nx53 := -3+a;
 frmMain.nx54 :=  3+a;
 frmMain.nx55 := -3+a;
 frmMain.nx56 := 3+a;
 frmMain.nx57 := -3+a;
 frmMain.nx58 := 3+a;
 frmMain.nx59 := -3+a;
 frmMain.nx60 := 3+a;
 frmMain.nx61 := -3+a;
 frmMain.nx62 := 3+a;
 frmMain.nx63 := -3+a;
 frmMain.nx64 := 3+a;
 frmMain.nx65 := -3+a;
 frmMain.nx66 := 3+a;
 frmMain.nx67 := -3+a;
 frmMain.nx68 := 3+a;
 frmMain.nx69 := -3+a;
 frmMain.nx70 := 3+a;


  ///3
 ///
 ///
 frmMain.nx71 := -4+a;
 frmMain.nx72 :=4+a;
 frmMain.nx73 := -4+a;
 frmMain.nx74 :=  4+a;
 frmMain.nx75 := -4+a;
 frmMain.nx76 := 4+a;
 frmMain.nx77 := -4+a;
 frmMain.nx78 := 4+a;
 frmMain.nx79 := -4+a;
 frmMain.nx80 := 4+a;
 frmMain.nx81 := -4+a;
 frmMain.nx82 := 4+a;
 frmMain.nx83 := -4+a;
 frmMain.nx84 := 4+a;
 frmMain.nx85 := -4+a;
 frmMain.nx86 := 4+a;
 frmMain.nx87 := -4+a;
 frmMain.nx88 := 4+a;
 frmMain.nx89 := -4+a;
 frmMain.nx90 := -2+a;

frmMain.nx94 :=0+a;
frmMain.nx95 :=-2+a;  //цифры
frmMain.nx96 :=-4+a;  //цифры
frmMain.nx97 :=-6+a;  //цифры
frmMain.nx98 := 2+a;  //цифры
frmMain.nx99 := 4+a;  //цифры
frmMain.nx100 := 6+a;  //цифры
frmMain.nx101 := 8+a;  //цифры
frmMain.nx102 := 10+a;  //цифры
frmMain.nx103 := 12+a;  //цифры

frmMain.nx104 := -8+a;  //буквы
frmMain.nx105 := -8+a;  //буквы
frmMain.nx106 := -8+a;  //буквы
frmMain.nx107 := -8+a;  //буквы
frmMain.nx108 := -8+a;  //буквы
frmMain.nx109 := -8+a;  //буквы
frmMain.nx110 := -8+a;  //буквы
frmMain.nx111 := -8+a;  //буквы
frmMain.nx112 := -8+a;  //буквы
frmMain.nx113 := -8+a;  //буквы

frmMain.nx114 := -6+a;  //корабль
frmMain.nx115 := 0+a;  //цифры
frmMain.nx116 :=-2+a;  //цифры
frmMain.nx117 :=-4+a;  //цифры
frmMain.nx118 :=-6+a;  //цифры
frmMain.nx119 := 2+a;  //цифры
frmMain.nx120 := 4+a;  //цифры
frmMain.nx121 := 6+a;  //цифры
frmMain.nx122 := 8+a;  //цифры
frmMain.nx123 := 10+a;  //цифры
frmMain.nx124 := 12+a;  //цифры
frmMain.nx125 := 0+a;
frmMain.nx126 := 0+a;
frmMain.nx127 := 0+a;
frmMain.nx128 := 2+a;
frmMain.nx129 := -2+a;
frmMain.nx130 := -4+a;
frmMain.nx131 := 4+a;
frmMain.nx132 := -6+a;
frmMain.nx133 := 6+a;
frmMain.nx134 := 8+a;
frmMain.nx135 := -8+a;
frmMain.nx136 := -2+a;
frmMain.nx137 := 2+a;
frmMain.nx138 := -4+a;
frmMain.nx139 := 4+a;
frmMain.nx140 := -2+a;
frmMain.nx141 := 2+a;
frmMain.nx142 := 0+a;
frmMain.nx143 := 2+a;
frmMain.nx144 := -2+a;
frmMain.nx145 := -4+a;
frmMain.nx146 := 4+a;
frmMain.nx147 := 6+a;
frmMain.nx148 := -6+a;
frmMain.nx149 := -6+a;
frmMain.nx150 := 6+a;
frmMain.nx151 := 2+a;
frmMain.nx152 := -2+a;
frmMain.nx153 := 2+a;
frmMain.nx154 := -2+a;
frmMain.nx155 := 0+a;
frmMain.nx156 := 0+a;
frmMain.nx157 := 4+a;
frmMain.nx158 := -4+a;
frmMain.nx159 := -6+a;
frmMain.nx160 := 6+a;
frmMain.nx161 := 4+a;
frmMain.nx162 := -4+a;
frmMain.nx163 := -6+a;
frmMain.nx164 := 6+a;
frmMain.nx165 := 4+a;
frmMain.nx166 := -4+a;
frmMain.nx167 := -6+a;
frmMain.nx168 := 6+a;
frmMain.nx169 := 4+a;
frmMain.nx170 := -4+a;
frmMain.nx171 := -6+a;
frmMain.nx172 := 6+a;
frmMain.nx173 := 4+a;
frmMain.nx174 := -4+a;
frmMain.nx175 := -6+a;
frmMain.nx176 := 6+a;
frmMain.nx177 := 4+a;
frmMain.nx178 := -4+a;
frmMain.nx179 := -6+a;
frmMain.nx180 := 6+a;
 frmMain.nx181 := 4+a;
 frmMain.nx182 := -4+a;
 frmMain.nx183 := -6+a;
 frmMain.nx184 := 6+a;
 frmMain.nx185 := 4+a;
 frmMain.nx186 := -4+a;
 frmMain.nx187 := -6+a;
 frmMain.nx188 := 6+a;
 frmMain.nx189 := -4+a;
 frmMain.nx190 := 4+a;
 frmMain.nx191 := -6+a;
 frmMain.nx192 := 6+a;
 frmMain.nx193 := -4+a;
 frmMain.nx194 := 4+a;
 frmMain.nx195 := -6+a;
 frmMain.nx196 := 6+a;
 frmMain.nx197 := -4+a;
 frmMain.nx198 := 4+a;
 frmMain.nx199 := -6+a;
 frmMain.nx200 := 6+a;
 frmMain.nx201 := -4+a;
 frmMain.nx202 := 4+a;
 frmMain.nx203 := -6+a;
 frmMain.nx204 := 6+a;
 frmMain.nx205 := 6+a;  //корабль
 frmMain.nx206 := 6+a;  //Подлодка
 frmMain.nx215 := -6+a;
 frmMain.nx215 := -6+a;
 frmMain.frmGL.Width:=800;
 a:=0;
 frmMain.nz := 0+b;
  frmMain.nz1 := 0+b;
  frmMain.nz2 := 0+b;
 frmMain.nz3 := 1+b;
 frmMain.nz7 := 0+b;
 frmMain.nz8 := 2+b;
 frmMain.nz9 := 2+b;
  frmMain.nz10 := -2+b;
 frmMain.nz11 := -2+b;
 frmMain.nz12 := -2+b;
 frmMain.nz14 := -3+b;
 frmMain.nz15 := -3+b;
 frmMain.nz16 := -4+b;
 frmMain.nz17 := -4+b;
  frmMain.nz18 := -5+b;
 frmMain.nz19 := -5+b;
 frmMain.nz20 := -6+b;
 frmMain.nz21 := -7+b;
 frmMain.nz22 := -7+b;
  frmMain.nz23 := -8+b;
 frmMain.nz24 := -8+b;
  frmMain.nz25 := -9+b;
 frmMain.nz26 := -9+b;
 frmMain.nz27 := -10+b;
  frmMain.nz28 := -10+b;
  frmMain.nz29 := -11+b;
 frmMain.nz30 := -11+b;

// 1

 frmMain.nz31 := -2+b;
 frmMain.nz32 := -2+b;
 frmMain.nz33 := -3+b;
 frmMain.nz34 := -3+b;
 frmMain.nz35 := -4+b;
 frmMain.nz36 := -4+b;
  frmMain.nz37 := -5+b;
 frmMain.nz38 := -5+b;
 frmMain.nz39 := -6+b;
 frmMain.nz40 := -6+b;
 frmMain.nz41 := -7+b;
 frmMain.nz42 := -7+b;
 frmMain.nz43 := -8+b;
 frmMain.nz44 := -8+b;
 frmMain.nz45 := -9+b;  //////////////


 //////////////////////

 frmMain.nz46 := -9+b;
 frmMain.nz47 := -9+b;
 frmMain.nz48 := -10+b;
 frmMain.nz49 := -11+b;
 frmMain.nz50 := -11+b;
 frmMain.nz51 := -2+b;
 frmMain.nz52 :=-2+b;
 frmMain.nz53 := -3+b;
 frmMain.nz54 :=  3+b;
 frmMain.nz55 := -3+b;
 frmMain.nz56 := -4+b;
 frmMain.nz57 := -5+b;
 frmMain.nz58 := -5+b;
 frmMain.nz59 := -6+b;
 frmMain.nz60 := -6+b;
 frmMain.nz61 := -7+b;
 frmMain.nz62 := -7+b;
 frmMain.nz63 := -8+b;
 frmMain.nz64 := -8+b;
 frmMain.nz65 := -9+b;
 frmMain.nz66 := -9+b;
 frmMain.nz67 := -10+b;
 frmMain.nz68 := -10+b;
 frmMain.nz69 := -11+b;
 frmMain.nz70 := -11+b;


  ///3
 ///
 ///
 frmMain.nz71 := -2+b;
 frmMain.nz72 :=-2+b;
 frmMain.nz73 := -3+b;
 frmMain.nz74 :=  -3+b;
 frmMain.nz75 := -4+b;
 frmMain.nz76 := -4+b;
 frmMain.nz77 := -5+b;
 frmMain.nz78 := -5+b;
 frmMain.nz79 := -6+b;
 frmMain.nz80 := -6+b;
 frmMain.nz81 := -7+b;
 frmMain.nz82 := -7+b;
 frmMain.nz83 := -8+b;
 frmMain.nz84 := -8+b;
 frmMain.nz85 := -9+b;
 frmMain.nz86 := -9+b;
 frmMain.nz87 := -10+b;
 frmMain.nz88 := -10+b;
 frmMain.nz89 := -11+b;
 frmMain.nz90 := -2+b;

frmMain.nz94 :=1+b;
frmMain.nz95 :=1+b;  //цифры
frmMain.nz96 :=1+b;  //цифры
frmMain.nz97 :=1+b;  //цифры
frmMain.nz98 := 1+b;  //цифры
frmMain.nz99 := 1+b;  //цифры
frmMain.nz100 := 1+b;  //цифры
frmMain.nz101 := 1+b;  //цифры
frmMain.nz102 := 1+b;  //цифры
frmMain.nz103 := 1+b;  //цифры

frmMain.nz104 := -0+b;  //буквы
frmMain.nz105 := -2+b;  //буквы
frmMain.nz106 := -4+b;  //буквы
frmMain.nz107 := -6+b;  //буквы
frmMain.nz108 := -8+b;  //буквы
frmMain.nz109 := -10+b;  //буквы
frmMain.nz110 := -12+b;  //буквы
frmMain.nz111 := -14+b;  //буквы
frmMain.nz112 := -16+b;  //буквы
frmMain.nz113 := -18+b;  //буквы

frmMain.nz114 := -4+b;  //корабль
frmMain.nz115 := -18+b;  //цифры
frmMain.nz116 :=-18+b;  //цифры
frmMain.nz117 :=-18+b;  //цифры
frmMain.nz118 :=-18+b;  //цифры
frmMain.nz119 := -18+b;  //цифры
frmMain.nz120 := -18+b;  //цифры
frmMain.nz121 := -18+b;  //цифры
frmMain.nz122 := -18+b;  //цифры
frmMain.nz123 := -18+b;  //цифры
frmMain.nz124 := -18+b;  //цифры
frmMain.nz125 := -16+b;
frmMain.nz126 := -14+b;
frmMain.nz127 := -12+b;
frmMain.nz128 := -16+b;
frmMain.nz129 := -16+b;
frmMain.nz130 := -16+b;
frmMain.nz131 := -16+b;
frmMain.nz132 := -16+b;
frmMain.nz133 := -16+b;
frmMain.nz134 := -16+b;
frmMain.nz135 := -16+b;
frmMain.nz136 := -14+b;
frmMain.nz137 := -14+b;
frmMain.nz138 := -14+b;
frmMain.nz139 := -14+b;
frmMain.nz140 := -14+b;
frmMain.nz141 := -15+b;
frmMain.nz142 := -15+b;
frmMain.nz143 := -15+b;
frmMain.nz144 := -15+b;
frmMain.nz145 := -15+b;
frmMain.nz146 := -15+b;
frmMain.nz147 := -15+b;
frmMain.nz148 := -15+b;
frmMain.nz149 := -14+b;
frmMain.nz150 := -14+b;
frmMain.nz151 := -12+b;
frmMain.nz152 := -12+b;
frmMain.nz153 := -13+b;
frmMain.nz154 := -13+b;
frmMain.nz155 := -13+b;
frmMain.nz156 := -6+b;
frmMain.nz157 := -12+b;
frmMain.nz158 := -12+b;
frmMain.nz159 := -12+b;
frmMain.nz160 := -12+b;
frmMain.nz161 := -10+b;
frmMain.nz162 := -10+b;
frmMain.nz163 := -10+b;
frmMain.nz164 := -10+b;
frmMain.nz165 := -8+b;
frmMain.nz166 := -8+b;
frmMain.nz167 := -8+b;
frmMain.nz168 := -8+b;
frmMain.nz169 := -6+b;
frmMain.nz170 := -6+b;
frmMain.nz171 := -6+b;
frmMain.nz172 := -6+b;
frmMain.nz173 := -4+b;
frmMain.nz174 := -4+b;
frmMain.nz175 := -4+b;
frmMain.nz176 := -4+b;
frmMain.nz177 := -2+b;
frmMain.nz178 := -2+b;
frmMain.nz179 := -2+b;
frmMain.nz180 := -2+b;
 frmMain.nz181 := -3+b;
 frmMain.nz182 := -3+b;
 frmMain.nz183 := -3+b;
 frmMain.nz184 := -3+b;
 frmMain.nz185 := -5+b;
 frmMain.nz186 := -5+b;
 frmMain.nz187 := -5+b;
 frmMain.nz188 := -5+b;
 frmMain.nz189 := -7+b;
 frmMain.nz190 := -7+b;
 frmMain.nz191 := -7+b;
 frmMain.nz192 := -7+b;
 frmMain.nz193 := -9+b;
 frmMain.nz194 := -9+b;
 frmMain.nz195 := -9+b;
 frmMain.nz196 := -9+b;
 frmMain.nz197 := -11+b;
 frmMain.nz198 := -11+b;
 frmMain.nz199 := -11+b;
 frmMain.nz200 := -11+b;
 frmMain.nz201 := -13+b;
 frmMain.nz202 := -13+b;
 frmMain.nz203 := -13+b;
 frmMain.nz204 := -13+b;
 frmMain.nz205 := -4+b;  //корабль
 frmMain.nz206 := -8+b;  //Подлодка
 frmMain.nz215 := -12+b;  //Подлодка
 frmMain.nz215 := -12+b;
 frmMain.frmGL.Width:=800;
 b:=0;


end;


if (c=4) and (d=9) then
begin
c:=3; d:=9;
StringGrid1.Cells[c,d]:='d';
c:=4; d:=9;
StringGrid1.Cells[c,d]:='1';
a:=a+1;
b:=b+3;
podlodok:=podlodok+1;
label4.Caption:=inttostr(podlodok);
ochkofnabrano:=ochkofnabrano+300;
label6.Caption:=inttostr(ochkofnabrano);
frmMain.nx := 0+a;
  frmMain.nx1 := 0+a;
  frmMain.nx2 := 0+a;
 frmMain.nx3 := 0+a;
 frmMain.nx7 := -1+a;
 frmMain.nx8 := 1+a;
 frmMain.nx9 := -1+a;
  frmMain.nx10 := -2+a;
 frmMain.nx11 := -1+a;
 frmMain.nx12 := 1+a;
 frmMain.nx14 := 1+a;
 frmMain.nx15 := -1+a;
 frmMain.nx16 := -1+a;
 frmMain.nx17 := 1+a;
  frmMain.nx18 := -1+a;
 frmMain.nx19 := 1+a;
 frmMain.nx20 := -1+a;
 frmMain.nx21 := -1+a;
 frmMain.nx22 := 1+a;
  frmMain.nx23 := -1+a;
 frmMain.nx24 := 1+a;
  frmMain.nx25 := 1+a;
 frmMain.nx26 := -1+a;
 frmMain.nx27 := 1+a;
  frmMain.nx28 := -1+a;
  frmMain.nx29 := 1+a;
 frmMain.nx30 := -1+a;

// 1

 frmMain.nx31 := -2+a;
 frmMain.nx32 := 2+a;
 frmMain.nx33 := -2+a;
 frmMain.nx34 :=  2+a;
 frmMain.nx35 := -2+a;
 frmMain.nx36 := 2+a;
  frmMain.nx37 := -2+a;
 frmMain.nx38 := 2+a;
 frmMain.nx39 := -2+a;
 frmMain.nx40 := 2+a;
 frmMain.nx41 := -2+a;
 frmMain.nx42 := 2+a;
 frmMain.nx43 := -2+a;
 frmMain.nx44 := 2+a;
 frmMain.nx45 := -2+a;  //////////////


 //////////////////////

 frmMain.nx46 := -2+a;
 frmMain.nx47 := -2+a;
 frmMain.nx48 := 2+a;
 frmMain.nx49 := -2+a;
 frmMain.nx50 := 2+a;
 frmMain.nx51 := -3+a;
 frmMain.nx52 :=3+a;
 frmMain.nx53 := -3+a;
 frmMain.nx54 :=  3+a;
 frmMain.nx55 := -3+a;
 frmMain.nx56 := 3+a;
 frmMain.nx57 := -3+a;
 frmMain.nx58 := 3+a;
 frmMain.nx59 := -3+a;
 frmMain.nx60 := 3+a;
 frmMain.nx61 := -3+a;
 frmMain.nx62 := 3+a;
 frmMain.nx63 := -3+a;
 frmMain.nx64 := 3+a;
 frmMain.nx65 := -3+a;
 frmMain.nx66 := 3+a;
 frmMain.nx67 := -3+a;
 frmMain.nx68 := 3+a;
 frmMain.nx69 := -3+a;
 frmMain.nx70 := 3+a;


  ///3
 ///
 ///
 frmMain.nx71 := -4+a;
 frmMain.nx72 :=4+a;
 frmMain.nx73 := -4+a;
 frmMain.nx74 :=  4+a;
 frmMain.nx75 := -4+a;
 frmMain.nx76 := 4+a;
 frmMain.nx77 := -4+a;
 frmMain.nx78 := 4+a;
 frmMain.nx79 := -4+a;
 frmMain.nx80 := 4+a;
 frmMain.nx81 := -4+a;
 frmMain.nx82 := 4+a;
 frmMain.nx83 := -4+a;
 frmMain.nx84 := 4+a;
 frmMain.nx85 := -4+a;
 frmMain.nx86 := 4+a;
 frmMain.nx87 := -4+a;
 frmMain.nx88 := 4+a;
 frmMain.nx89 := -4+a;
 frmMain.nx90 := -2+a;

frmMain.nx94 :=0+a;
frmMain.nx95 :=-2+a;  //цифры
frmMain.nx96 :=-4+a;  //цифры
frmMain.nx97 :=-6+a;  //цифры
frmMain.nx98 := 2+a;  //цифры
frmMain.nx99 := 4+a;  //цифры
frmMain.nx100 := 6+a;  //цифры
frmMain.nx101 := 8+a;  //цифры
frmMain.nx102 := 10+a;  //цифры
frmMain.nx103 := 12+a;  //цифры

frmMain.nx104 := -8+a;  //буквы
frmMain.nx105 := -8+a;  //буквы
frmMain.nx106 := -8+a;  //буквы
frmMain.nx107 := -8+a;  //буквы
frmMain.nx108 := -8+a;  //буквы
frmMain.nx109 := -8+a;  //буквы
frmMain.nx110 := -8+a;  //буквы
frmMain.nx111 := -8+a;  //буквы
frmMain.nx112 := -8+a;  //буквы
frmMain.nx113 := -8+a;  //буквы
frmMain.nx215 := -6+a;


frmMain.nx114 := -6+a;  //корабль
frmMain.nx115 := 0+a;  //цифры
frmMain.nx116 :=-2+a;  //цифры
frmMain.nx117 :=-4+a;  //цифры
frmMain.nx118 :=-6+a;  //цифры
frmMain.nx119 := 2+a;  //цифры
frmMain.nx120 := 4+a;  //цифры
frmMain.nx121 := 6+a;  //цифры
frmMain.nx122 := 8+a;  //цифры
frmMain.nx123 := 10+a;  //цифры
frmMain.nx124 := 12+a;  //цифры
frmMain.nx125 := 0+a;
frmMain.nx126 := 0+a;
frmMain.nx127 := 0+a;
frmMain.nx128 := 2+a;
frmMain.nx129 := -2+a;
frmMain.nx130 := -4+a;
frmMain.nx131 := 4+a;
frmMain.nx132 := -6+a;
frmMain.nx133 := 6+a;
frmMain.nx134 := 8+a;
frmMain.nx135 := -8+a;
frmMain.nx136 := -2+a;
frmMain.nx137 := 2+a;
frmMain.nx138 := -4+a;
frmMain.nx139 := 4+a;
frmMain.nx140 := -2+a;
frmMain.nx141 := 2+a;
frmMain.nx142 := 0+a;
frmMain.nx143 := 2+a;
frmMain.nx144 := -2+a;
frmMain.nx145 := -4+a;
frmMain.nx146 := 4+a;
frmMain.nx147 := 6+a;
frmMain.nx148 := -6+a;
frmMain.nx149 := -6+a;
frmMain.nx150 := 6+a;
frmMain.nx151 := 2+a;
frmMain.nx152 := -2+a;
frmMain.nx153 := 2+a;
frmMain.nx154 := -2+a;
frmMain.nx155 := 0+a;
frmMain.nx156 := 0+a;
frmMain.nx157 := 4+a;
frmMain.nx158 := -4+a;
frmMain.nx159 := -6+a;
frmMain.nx160 := 6+a;
frmMain.nx161 := 4+a;
frmMain.nx162 := -4+a;
frmMain.nx163 := -6+a;
frmMain.nx164 := 6+a;
frmMain.nx165 := 4+a;
frmMain.nx166 := -4+a;
frmMain.nx167 := -6+a;
frmMain.nx168 := 6+a;
frmMain.nx169 := 4+a;
frmMain.nx170 := -4+a;
frmMain.nx171 := -6+a;
frmMain.nx172 := 6+a;
frmMain.nx173 := 4+a;
frmMain.nx174 := -4+a;
frmMain.nx175 := -6+a;
frmMain.nx176 := 6+a;
frmMain.nx177 := 4+a;
frmMain.nx178 := -4+a;
frmMain.nx179 := -6+a;
frmMain.nx180 := 6+a;
 frmMain.nx181 := 4+a;
 frmMain.nx182 := -4+a;
 frmMain.nx183 := -6+a;
 frmMain.nx184 := 6+a;
 frmMain.nx185 := 4+a;
 frmMain.nx186 := -4+a;
 frmMain.nx187 := -6+a;
 frmMain.nx188 := 6+a;
 frmMain.nx189 := -4+a;
 frmMain.nx190 := 4+a;
 frmMain.nx191 := -6+a;
 frmMain.nx192 := 6+a;
 frmMain.nx193 := -4+a;
 frmMain.nx194 := 4+a;
 frmMain.nx195 := -6+a;
 frmMain.nx196 := 6+a;
 frmMain.nx197 := -4+a;
 frmMain.nx198 := 4+a;
 frmMain.nx199 := -6+a;
 frmMain.nx200 := 6+a;
 frmMain.nx201 := -4+a;
 frmMain.nx202 := 4+a;
 frmMain.nx203 := -6+a;
 frmMain.nx204 := 6+a;
 frmMain.nx205 := 6+a;  //корабль
 frmMain.nx206 := 6+a;  //Подлодка
 frmMain.nx215 := -6+a;
 frmMain.frmGL.Width:=800;
 a:=0;
 frmMain.nz := 0+b;
  frmMain.nz1 := 0+b;
  frmMain.nz2 := 0+b;
 frmMain.nz3 := 1+b;
 frmMain.nz7 := 0+b;
 frmMain.nz8 := 2+b;
 frmMain.nz9 := 2+b;
  frmMain.nz10 := -2+b;
 frmMain.nz11 := -2+b;
 frmMain.nz12 := -2+b;
 frmMain.nz14 := -3+b;
 frmMain.nz15 := -3+b;
 frmMain.nz16 := -4+b;
 frmMain.nz17 := -4+b;
  frmMain.nz18 := -5+b;
 frmMain.nz19 := -5+b;
 frmMain.nz20 := -6+b;
 frmMain.nz21 := -7+b;
 frmMain.nz22 := -7+b;
  frmMain.nz23 := -8+b;
 frmMain.nz24 := -8+b;
  frmMain.nz25 := -9+b;
 frmMain.nz26 := -9+b;
 frmMain.nz27 := -10+b;
  frmMain.nz28 := -10+b;
  frmMain.nz29 := -11+b;
 frmMain.nz30 := -11+b;

// 1

 frmMain.nz31 := -2+b;
 frmMain.nz32 := -2+b;
 frmMain.nz33 := -3+b;
 frmMain.nz34 := -3+b;
 frmMain.nz35 := -4+b;
 frmMain.nz36 := -4+b;
  frmMain.nz37 := -5+b;
 frmMain.nz38 := -5+b;
 frmMain.nz39 := -6+b;
 frmMain.nz40 := -6+b;
 frmMain.nz41 := -7+b;
 frmMain.nz42 := -7+b;
 frmMain.nz43 := -8+b;
 frmMain.nz44 := -8+b;
 frmMain.nz45 := -9+b;  //////////////


 //////////////////////

 frmMain.nz46 := -9+b;
 frmMain.nz47 := -9+b;
 frmMain.nz48 := -10+b;
 frmMain.nz49 := -11+b;
 frmMain.nz50 := -11+b;
 frmMain.nz51 := -2+b;
 frmMain.nz52 :=-2+b;
 frmMain.nz53 := -3+b;
 frmMain.nz54 :=  3+b;
 frmMain.nz55 := -3+b;
 frmMain.nz56 := -4+b;
 frmMain.nz57 := -5+b;
 frmMain.nz58 := -5+b;
 frmMain.nz59 := -6+b;
 frmMain.nz60 := -6+b;
 frmMain.nz61 := -7+b;
 frmMain.nz62 := -7+b;
 frmMain.nz63 := -8+b;
 frmMain.nz64 := -8+b;
 frmMain.nz65 := -9+b;
 frmMain.nz66 := -9+b;
 frmMain.nz67 := -10+b;
 frmMain.nz68 := -10+b;
 frmMain.nz69 := -11+b;
 frmMain.nz70 := -11+b;


  ///3
 ///
 ///
 frmMain.nz71 := -2+b;
 frmMain.nz72 :=-2+b;
 frmMain.nz73 := -3+b;
 frmMain.nz74 :=  -3+b;
 frmMain.nz75 := -4+b;
 frmMain.nz76 := -4+b;
 frmMain.nz77 := -5+b;
 frmMain.nz78 := -5+b;
 frmMain.nz79 := -6+b;
 frmMain.nz80 := -6+b;
 frmMain.nz81 := -7+b;
 frmMain.nz82 := -7+b;
 frmMain.nz83 := -8+b;
 frmMain.nz84 := -8+b;
 frmMain.nz85 := -9+b;
 frmMain.nz86 := -9+b;
 frmMain.nz87 := -10+b;
 frmMain.nz88 := -10+b;
 frmMain.nz89 := -11+b;
 frmMain.nz90 := -2+b;

frmMain.nz94 :=1+b;
frmMain.nz95 :=1+b;  //цифры
frmMain.nz96 :=1+b;  //цифры
frmMain.nz97 :=1+b;  //цифры
frmMain.nz98 := 1+b;  //цифры
frmMain.nz99 := 1+b;  //цифры
frmMain.nz100 := 1+b;  //цифры
frmMain.nz101 := 1+b;  //цифры
frmMain.nz102 := 1+b;  //цифры
frmMain.nz103 := 1+b;  //цифры

frmMain.nz104 := -0+b;  //буквы
frmMain.nz105 := -2+b;  //буквы
frmMain.nz106 := -4+b;  //буквы
frmMain.nz107 := -6+b;  //буквы
frmMain.nz108 := -8+b;  //буквы
frmMain.nz109 := -10+b;  //буквы
frmMain.nz110 := -12+b;  //буквы
frmMain.nz111 := -14+b;  //буквы
frmMain.nz112 := -16+b;  //буквы
frmMain.nz113 := -18+b;  //буквы

frmMain.nz114 := -4+b;  //корабль
frmMain.nz115 := -18+b;  //цифры
frmMain.nz116 :=-18+b;  //цифры
frmMain.nz117 :=-18+b;  //цифры
frmMain.nz118 :=-18+b;  //цифры
frmMain.nz119 := -18+b;  //цифры
frmMain.nz120 := -18+b;  //цифры
frmMain.nz121 := -18+b;  //цифры
frmMain.nz122 := -18+b;  //цифры
frmMain.nz123 := -18+b;  //цифры
frmMain.nz124 := -18+b;  //цифры
frmMain.nz125 := -16+b;
frmMain.nz126 := -14+b;
frmMain.nz127 := -12+b;
frmMain.nz128 := -16+b;
frmMain.nz129 := -16+b;
frmMain.nz130 := -16+b;
frmMain.nz131 := -16+b;
frmMain.nz132 := -16+b;
frmMain.nz133 := -16+b;
frmMain.nz134 := -16+b;
frmMain.nz135 := -16+b;
frmMain.nz136 := -14+b;
frmMain.nz137 := -14+b;
frmMain.nz138 := -14+b;
frmMain.nz139 := -14+b;
frmMain.nz140 := -14+b;
frmMain.nz141 := -15+b;
frmMain.nz142 := -15+b;
frmMain.nz143 := -15+b;
frmMain.nz144 := -15+b;
frmMain.nz145 := -15+b;
frmMain.nz146 := -15+b;
frmMain.nz147 := -15+b;
frmMain.nz148 := -15+b;
frmMain.nz149 := -14+b;
frmMain.nz150 := -14+b;
frmMain.nz151 := -12+b;
frmMain.nz152 := -12+b;
frmMain.nz153 := -13+b;
frmMain.nz154 := -13+b;
frmMain.nz155 := -13+b;
frmMain.nz156 := -6+b;
frmMain.nz157 := -12+b;
frmMain.nz158 := -12+b;
frmMain.nz159 := -12+b;
frmMain.nz160 := -12+b;
frmMain.nz161 := -10+b;
frmMain.nz162 := -10+b;
frmMain.nz163 := -10+b;
frmMain.nz164 := -10+b;
frmMain.nz165 := -8+b;
frmMain.nz166 := -8+b;
frmMain.nz167 := -8+b;
frmMain.nz168 := -8+b;
frmMain.nz169 := -6+b;
frmMain.nz170 := -6+b;
frmMain.nz171 := -6+b;
frmMain.nz172 := -6+b;
frmMain.nz173 := -4+b;
frmMain.nz174 := -4+b;
frmMain.nz175 := -4+b;
frmMain.nz176 := -4+b;
frmMain.nz177 := -2+b;
frmMain.nz178 := -2+b;
frmMain.nz179 := -2+b;
frmMain.nz180 := -2+b;
 frmMain.nz181 := -3+b;
 frmMain.nz182 := -3+b;
 frmMain.nz183 := -3+b;
 frmMain.nz184 := -3+b;
 frmMain.nz185 := -5+b;
 frmMain.nz186 := -5+b;
 frmMain.nz187 := -5+b;
 frmMain.nz188 := -5+b;
 frmMain.nz189 := -7+b;
 frmMain.nz190 := -7+b;
 frmMain.nz191 := -7+b;
 frmMain.nz192 := -7+b;
 frmMain.nz193 := -9+b;
 frmMain.nz194 := -9+b;
 frmMain.nz195 := -9+b;
 frmMain.nz196 := -9+b;
 frmMain.nz197 := -11+b;
 frmMain.nz198 := -11+b;
 frmMain.nz199 := -11+b;
 frmMain.nz200 := -11+b;
 frmMain.nz201 := -13+b;
 frmMain.nz202 := -13+b;
 frmMain.nz203 := -13+b;
 frmMain.nz204 := -13+b;
 frmMain.nz205 := -4+b;  //корабль
 frmMain.nz206 := -8+b;  //Подлодка
 frmMain.nz215 := -12+b;  //Подлодка
 frmMain.nz215 := -12+b;
 frmMain.frmGL.Width:=800;
 b:=0;

end;




if (c=5) and (d=9) then
begin
StringGrid1.Cells[c,d]:='1';
a:=a-1;
b:=b+3;
frmMain.nx := 0+a;
  frmMain.nx1 := 0+a;
  frmMain.nx2 := 0+a;
 frmMain.nx3 := 0+a;
 frmMain.nx7 := -1+a;
 frmMain.nx8 := 1+a;
 frmMain.nx9 := -1+a;
  frmMain.nx10 := -2+a;
 frmMain.nx11 := -1+a;
 frmMain.nx12 := 1+a;
 frmMain.nx14 := 1+a;
 frmMain.nx15 := -1+a;
 frmMain.nx16 := -1+a;
 frmMain.nx17 := 1+a;
  frmMain.nx18 := -1+a;
 frmMain.nx19 := 1+a;
 frmMain.nx20 := -1+a;
 frmMain.nx21 := -1+a;
 frmMain.nx22 := 1+a;
  frmMain.nx23 := -1+a;
 frmMain.nx24 := 1+a;
  frmMain.nx25 := 1+a;
 frmMain.nx26 := -1+a;
 frmMain.nx27 := 1+a;
  frmMain.nx28 := -1+a;
  frmMain.nx29 := 1+a;
 frmMain.nx30 := -1+a;

// 1

 frmMain.nx31 := -2+a;
 frmMain.nx32 := 2+a;
 frmMain.nx33 := -2+a;
 frmMain.nx34 :=  2+a;
 frmMain.nx35 := -2+a;
 frmMain.nx36 := 2+a;
  frmMain.nx37 := -2+a;
 frmMain.nx38 := 2+a;
 frmMain.nx39 := -2+a;
 frmMain.nx40 := 2+a;
 frmMain.nx41 := -2+a;
 frmMain.nx42 := 2+a;
 frmMain.nx43 := -2+a;
 frmMain.nx44 := 2+a;
 frmMain.nx45 := -2+a;  //////////////


 //////////////////////

 frmMain.nx46 := -2+a;
 frmMain.nx47 := -2+a;
 frmMain.nx48 := 2+a;
 frmMain.nx49 := -2+a;
 frmMain.nx50 := 2+a;
 frmMain.nx51 := -3+a;
 frmMain.nx52 :=3+a;
 frmMain.nx53 := -3+a;
 frmMain.nx54 :=  3+a;
 frmMain.nx55 := -3+a;
 frmMain.nx56 := 3+a;
 frmMain.nx57 := -3+a;
 frmMain.nx58 := 3+a;
 frmMain.nx59 := -3+a;
 frmMain.nx60 := 3+a;
 frmMain.nx61 := -3+a;
 frmMain.nx62 := 3+a;
 frmMain.nx63 := -3+a;
 frmMain.nx64 := 3+a;
 frmMain.nx65 := -3+a;
 frmMain.nx66 := 3+a;
 frmMain.nx67 := -3+a;
 frmMain.nx68 := 3+a;
 frmMain.nx69 := -3+a;
 frmMain.nx70 := 3+a;


  ///3
 ///
 ///
 frmMain.nx71 := -4+a;
 frmMain.nx72 :=4+a;
 frmMain.nx73 := -4+a;
 frmMain.nx74 :=  4+a;
 frmMain.nx75 := -4+a;
 frmMain.nx76 := 4+a;
 frmMain.nx77 := -4+a;
 frmMain.nx78 := 4+a;
 frmMain.nx79 := -4+a;
 frmMain.nx80 := 4+a;
 frmMain.nx81 := -4+a;
 frmMain.nx82 := 4+a;
 frmMain.nx83 := -4+a;
 frmMain.nx84 := 4+a;
 frmMain.nx85 := -4+a;
 frmMain.nx86 := 4+a;
 frmMain.nx87 := -4+a;
 frmMain.nx88 := 4+a;
 frmMain.nx89 := -4+a;
 frmMain.nx90 := -2+a;

frmMain.nx94 :=0+a;
frmMain.nx95 :=-2+a;  //цифры
frmMain.nx96 :=-4+a;  //цифры
frmMain.nx97 :=-6+a;  //цифры
frmMain.nx98 := 2+a;  //цифры
frmMain.nx99 := 4+a;  //цифры
frmMain.nx100 := 6+a;  //цифры
frmMain.nx101 := 8+a;  //цифры
frmMain.nx102 := 10+a;  //цифры
frmMain.nx103 := 12+a;  //цифры

frmMain.nx104 := -8+a;  //буквы
frmMain.nx105 := -8+a;  //буквы
frmMain.nx106 := -8+a;  //буквы
frmMain.nx107 := -8+a;  //буквы
frmMain.nx108 := -8+a;  //буквы
frmMain.nx109 := -8+a;  //буквы
frmMain.nx110 := -8+a;  //буквы
frmMain.nx111 := -8+a;  //буквы
frmMain.nx112 := -8+a;  //буквы
frmMain.nx113 := -8+a;  //буквы

frmMain.nx114 := -6+a;  //корабль
frmMain.nx115 := 0+a;  //цифры
frmMain.nx116 :=-2+a;  //цифры
frmMain.nx117 :=-4+a;  //цифры
frmMain.nx118 :=-6+a;  //цифры
frmMain.nx119 := 2+a;  //цифры
frmMain.nx120 := 4+a;  //цифры
frmMain.nx121 := 6+a;  //цифры
frmMain.nx122 := 8+a;  //цифры
frmMain.nx123 := 10+a;  //цифры
frmMain.nx124 := 12+a;  //цифры
frmMain.nx125 := 0+a;
frmMain.nx126 := 0+a;
frmMain.nx127 := 0+a;
frmMain.nx128 := 2+a;
frmMain.nx129 := -2+a;
frmMain.nx130 := -4+a;
frmMain.nx131 := 4+a;
frmMain.nx132 := -6+a;
frmMain.nx133 := 6+a;
frmMain.nx134 := 8+a;
frmMain.nx135 := -8+a;
frmMain.nx136 := -2+a;
frmMain.nx137 := 2+a;
frmMain.nx138 := -4+a;
frmMain.nx139 := 4+a;
frmMain.nx140 := -2+a;
frmMain.nx141 := 2+a;
frmMain.nx142 := 0+a;
frmMain.nx143 := 2+a;
frmMain.nx144 := -2+a;
frmMain.nx145 := -4+a;
frmMain.nx146 := 4+a;
frmMain.nx147 := 6+a;
frmMain.nx148 := -6+a;
frmMain.nx149 := -6+a;
frmMain.nx150 := 6+a;
frmMain.nx151 := 2+a;
frmMain.nx152 := -2+a;
frmMain.nx153 := 2+a;
frmMain.nx154 := -2+a;
frmMain.nx155 := 0+a;
frmMain.nx156 := 0+a;
frmMain.nx157 := 4+a;
frmMain.nx158 := -4+a;
frmMain.nx159 := -6+a;
frmMain.nx160 := 6+a;
frmMain.nx161 := 4+a;
frmMain.nx162 := -4+a;
frmMain.nx163 := -6+a;
frmMain.nx164 := 6+a;
frmMain.nx165 := 4+a;
frmMain.nx166 := -4+a;
frmMain.nx167 := -6+a;
frmMain.nx168 := 6+a;
frmMain.nx169 := 4+a;
frmMain.nx170 := -4+a;
frmMain.nx171 := -6+a;
frmMain.nx172 := 6+a;
frmMain.nx173 := 4+a;
frmMain.nx174 := -4+a;
frmMain.nx175 := -6+a;
frmMain.nx176 := 6+a;
frmMain.nx177 := 4+a;
frmMain.nx178 := -4+a;
frmMain.nx179 := -6+a;
frmMain.nx180 := 6+a;
 frmMain.nx181 := 4+a;
 frmMain.nx182 := -4+a;
 frmMain.nx183 := -6+a;
 frmMain.nx184 := 6+a;
 frmMain.nx185 := 4+a;
 frmMain.nx186 := -4+a;
 frmMain.nx187 := -6+a;
 frmMain.nx188 := 6+a;
 frmMain.nx189 := -4+a;
 frmMain.nx190 := 4+a;
 frmMain.nx191 := -6+a;
 frmMain.nx192 := 6+a;
 frmMain.nx193 := -4+a;
 frmMain.nx194 := 4+a;
 frmMain.nx195 := -6+a;
 frmMain.nx196 := 6+a;
 frmMain.nx197 := -4+a;
 frmMain.nx198 := 4+a;
 frmMain.nx199 := -6+a;
 frmMain.nx200 := 6+a;
 frmMain.nx201 := -4+a;
 frmMain.nx202 := 4+a;
 frmMain.nx203 := -6+a;
 frmMain.nx204 := 6+a;
 frmMain.nx205 := 6+a;  //корабль
 frmMain.nx206 := 6+a;  //Подлодка
 frmMain.nx215 := -6+a;

 frmMain.frmGL.Width:=800;
 a:=0;
 frmMain.nz := 0+b;
  frmMain.nz1 := 0+b;
  frmMain.nz2 := 0+b;
 frmMain.nz3 := 1+b;
 frmMain.nz7 := 0+b;
 frmMain.nz8 := 2+b;
 frmMain.nz9 := 2+b;
  frmMain.nz10 := -2+b;
 frmMain.nz11 := -2+b;
 frmMain.nz12 := -2+b;
 frmMain.nz14 := -3+b;
 frmMain.nz15 := -3+b;
 frmMain.nz16 := -4+b;
 frmMain.nz17 := -4+b;
  frmMain.nz18 := -5+b;
 frmMain.nz19 := -5+b;
 frmMain.nz20 := -6+b;
 frmMain.nz21 := -7+b;
 frmMain.nz22 := -7+b;
  frmMain.nz23 := -8+b;
 frmMain.nz24 := -8+b;
  frmMain.nz25 := -9+b;
 frmMain.nz26 := -9+b;
 frmMain.nz27 := -10+b;
  frmMain.nz28 := -10+b;
  frmMain.nz29 := -11+b;
 frmMain.nz30 := -11+b;

// 1

 frmMain.nz31 := -2+b;
 frmMain.nz32 := -2+b;
 frmMain.nz33 := -3+b;
 frmMain.nz34 := -3+b;
 frmMain.nz35 := -4+b;
 frmMain.nz36 := -4+b;
  frmMain.nz37 := -5+b;
 frmMain.nz38 := -5+b;
 frmMain.nz39 := -6+b;
 frmMain.nz40 := -6+b;
 frmMain.nz41 := -7+b;
 frmMain.nz42 := -7+b;
 frmMain.nz43 := -8+b;
 frmMain.nz44 := -8+b;
 frmMain.nz45 := -9+b;  //////////////


 //////////////////////

 frmMain.nz46 := -9+b;
 frmMain.nz47 := -9+b;
 frmMain.nz48 := -10+b;
 frmMain.nz49 := -11+b;
 frmMain.nz50 := -11+b;
 frmMain.nz51 := -2+b;
 frmMain.nz52 :=-2+b;
 frmMain.nz53 := -3+b;
 frmMain.nz54 :=  3+b;
 frmMain.nz55 := -3+b;
 frmMain.nz56 := -4+b;
 frmMain.nz57 := -5+b;
 frmMain.nz58 := -5+b;
 frmMain.nz59 := -6+b;
 frmMain.nz60 := -6+b;
 frmMain.nz61 := -7+b;
 frmMain.nz62 := -7+b;
 frmMain.nz63 := -8+b;
 frmMain.nz64 := -8+b;
 frmMain.nz65 := -9+b;
 frmMain.nz66 := -9+b;
 frmMain.nz67 := -10+b;
 frmMain.nz68 := -10+b;
 frmMain.nz69 := -11+b;
 frmMain.nz70 := -11+b;


  ///3
 ///
 ///
 frmMain.nz71 := -2+b;
 frmMain.nz72 :=-2+b;
 frmMain.nz73 := -3+b;
 frmMain.nz74 :=  -3+b;
 frmMain.nz75 := -4+b;
 frmMain.nz76 := -4+b;
 frmMain.nz77 := -5+b;
 frmMain.nz78 := -5+b;
 frmMain.nz79 := -6+b;
 frmMain.nz80 := -6+b;
 frmMain.nz81 := -7+b;
 frmMain.nz82 := -7+b;
 frmMain.nz83 := -8+b;
 frmMain.nz84 := -8+b;
 frmMain.nz85 := -9+b;
 frmMain.nz86 := -9+b;
 frmMain.nz87 := -10+b;
 frmMain.nz88 := -10+b;
 frmMain.nz89 := -11+b;
 frmMain.nz90 := -2+b;

frmMain.nz94 :=1+b;
frmMain.nz95 :=1+b;  //цифры
frmMain.nz96 :=1+b;  //цифры
frmMain.nz97 :=1+b;  //цифры
frmMain.nz98 := 1+b;  //цифры
frmMain.nz99 := 1+b;  //цифры
frmMain.nz100 := 1+b;  //цифры
frmMain.nz101 := 1+b;  //цифры
frmMain.nz102 := 1+b;  //цифры
frmMain.nz103 := 1+b;  //цифры

frmMain.nz104 := -0+b;  //буквы
frmMain.nz105 := -2+b;  //буквы
frmMain.nz106 := -4+b;  //буквы
frmMain.nz107 := -6+b;  //буквы
frmMain.nz108 := -8+b;  //буквы
frmMain.nz109 := -10+b;  //буквы
frmMain.nz110 := -12+b;  //буквы
frmMain.nz111 := -14+b;  //буквы
frmMain.nz112 := -16+b;  //буквы
frmMain.nz113 := -18+b;  //буквы

frmMain.nz114 := -4+b;  //корабль
frmMain.nz115 := -18+b;  //цифры
frmMain.nz116 :=-18+b;  //цифры
frmMain.nz117 :=-18+b;  //цифры
frmMain.nz118 :=-18+b;  //цифры
frmMain.nz119 := -18+b;  //цифры
frmMain.nz120 := -18+b;  //цифры
frmMain.nz121 := -18+b;  //цифры
frmMain.nz122 := -18+b;  //цифры
frmMain.nz123 := -18+b;  //цифры
frmMain.nz124 := -18+b;  //цифры
frmMain.nz125 := -16+b;
frmMain.nz126 := -14+b;
frmMain.nz127 := -12+b;
frmMain.nz128 := -16+b;
frmMain.nz129 := -16+b;
frmMain.nz130 := -16+b;
frmMain.nz131 := -16+b;
frmMain.nz132 := -16+b;
frmMain.nz133 := -16+b;
frmMain.nz134 := -16+b;
frmMain.nz135 := -16+b;
frmMain.nz136 := -14+b;
frmMain.nz137 := -14+b;
frmMain.nz138 := -14+b;
frmMain.nz139 := -14+b;
frmMain.nz140 := -14+b;
frmMain.nz141 := -15+b;
frmMain.nz142 := -15+b;
frmMain.nz143 := -15+b;
frmMain.nz144 := -15+b;
frmMain.nz145 := -15+b;
frmMain.nz146 := -15+b;
frmMain.nz147 := -15+b;
frmMain.nz148 := -15+b;
frmMain.nz149 := -14+b;
frmMain.nz150 := -14+b;
frmMain.nz151 := -12+b;
frmMain.nz152 := -12+b;
frmMain.nz153 := -13+b;
frmMain.nz154 := -13+b;
frmMain.nz155 := -13+b;
frmMain.nz156 := -6+b;
frmMain.nz157 := -12+b;
frmMain.nz158 := -12+b;
frmMain.nz159 := -12+b;
frmMain.nz160 := -12+b;
frmMain.nz161 := -10+b;
frmMain.nz162 := -10+b;
frmMain.nz163 := -10+b;
frmMain.nz164 := -10+b;
frmMain.nz165 := -8+b;
frmMain.nz166 := -8+b;
frmMain.nz167 := -8+b;
frmMain.nz168 := -8+b;
frmMain.nz169 := -6+b;
frmMain.nz170 := -6+b;
frmMain.nz171 := -6+b;
frmMain.nz172 := -6+b;
frmMain.nz173 := -4+b;
frmMain.nz174 := -4+b;
frmMain.nz175 := -4+b;
frmMain.nz176 := -4+b;
frmMain.nz177 := -2+b;
frmMain.nz178 := -2+b;
frmMain.nz179 := -2+b;
frmMain.nz180 := -2+b;
 frmMain.nz181 := -3+b;
 frmMain.nz182 := -3+b;
 frmMain.nz183 := -3+b;
 frmMain.nz184 := -3+b;
 frmMain.nz185 := -5+b;
 frmMain.nz186 := -5+b;
 frmMain.nz187 := -5+b;
 frmMain.nz188 := -5+b;
 frmMain.nz189 := -7+b;
 frmMain.nz190 := -7+b;
 frmMain.nz191 := -7+b;
 frmMain.nz192 := -7+b;
 frmMain.nz193 := -9+b;
 frmMain.nz194 := -9+b;
 frmMain.nz195 := -9+b;
 frmMain.nz196 := -9+b;
 frmMain.nz197 := -11+b;
 frmMain.nz198 := -11+b;
 frmMain.nz199 := -11+b;
 frmMain.nz200 := -11+b;
 frmMain.nz201 := -13+b;
 frmMain.nz202 := -13+b;
 frmMain.nz203 := -13+b;
 frmMain.nz204 := -13+b;
 frmMain.nz205 := -4+b;  //корабль
 frmMain.nz206 := -8+b;  //Подлодка
 frmMain.nz215 := -12+b;  //Подлодка
 frmMain.frmGL.Width:=800;
 b:=0;

end;



































 if (c=1) and (d=8) then
begin

StringGrid1.Cells[c,d]:='1';
a:=a+7;
b:=b+5;
frmMain.nx := 0+a;
  frmMain.nx1 := 0+a;
  frmMain.nx2 := 0+a;
 frmMain.nx3 := 0+a;
 frmMain.nx7 := -1+a;
 frmMain.nx8 := 1+a;
 frmMain.nx9 := -1+a;
  frmMain.nx10 := -2+a;
 frmMain.nx11 := -1+a;
 frmMain.nx12 := 1+a;
 frmMain.nx14 := 1+a;
 frmMain.nx15 := -1+a;
 frmMain.nx16 := -1+a;
 frmMain.nx17 := 1+a;
  frmMain.nx18 := -1+a;
 frmMain.nx19 := 1+a;
 frmMain.nx20 := -1+a;
 frmMain.nx21 := -1+a;
 frmMain.nx22 := 1+a;
  frmMain.nx23 := -1+a;
 frmMain.nx24 := 1+a;
  frmMain.nx25 := 1+a;
 frmMain.nx26 := -1+a;
 frmMain.nx27 := 1+a;
  frmMain.nx28 := -1+a;
  frmMain.nx29 := 1+a;
 frmMain.nx30 := -1+a;

// 1

 frmMain.nx31 := -2+a;
 frmMain.nx32 := 2+a;
 frmMain.nx33 := -2+a;
 frmMain.nx34 :=  2+a;
 frmMain.nx35 := -2+a;
 frmMain.nx36 := 2+a;
  frmMain.nx37 := -2+a;
 frmMain.nx38 := 2+a;
 frmMain.nx39 := -2+a;
 frmMain.nx40 := 2+a;
 frmMain.nx41 := -2+a;
 frmMain.nx42 := 2+a;
 frmMain.nx43 := -2+a;
 frmMain.nx44 := 2+a;
 frmMain.nx45 := -2+a;  //////////////


 //////////////////////

 frmMain.nx46 := -2+a;
 frmMain.nx47 := -2+a;
 frmMain.nx48 := 2+a;
 frmMain.nx49 := -2+a;
 frmMain.nx50 := 2+a;
 frmMain.nx51 := -3+a;
 frmMain.nx52 :=3+a;
 frmMain.nx53 := -3+a;
 frmMain.nx54 :=  3+a;
 frmMain.nx55 := -3+a;
 frmMain.nx56 := 3+a;
 frmMain.nx57 := -3+a;
 frmMain.nx58 := 3+a;
 frmMain.nx59 := -3+a;
 frmMain.nx60 := 3+a;
 frmMain.nx61 := -3+a;
 frmMain.nx62 := 3+a;
 frmMain.nx63 := -3+a;
 frmMain.nx64 := 3+a;
 frmMain.nx65 := -3+a;
 frmMain.nx66 := 3+a;
 frmMain.nx67 := -3+a;
 frmMain.nx68 := 3+a;
 frmMain.nx69 := -3+a;
 frmMain.nx70 := 3+a;


  ///3
 ///
 ///
 frmMain.nx71 := -4+a;
 frmMain.nx72 :=4+a;
 frmMain.nx73 := -4+a;
 frmMain.nx74 :=  4+a;
 frmMain.nx75 := -4+a;
 frmMain.nx76 := 4+a;
 frmMain.nx77 := -4+a;
 frmMain.nx78 := 4+a;
 frmMain.nx79 := -4+a;
 frmMain.nx80 := 4+a;
 frmMain.nx81 := -4+a;
 frmMain.nx82 := 4+a;
 frmMain.nx83 := -4+a;
 frmMain.nx84 := 4+a;
 frmMain.nx85 := -4+a;
 frmMain.nx86 := 4+a;
 frmMain.nx87 := -4+a;
 frmMain.nx88 := 4+a;
 frmMain.nx89 := -4+a;
 frmMain.nx90 := -2+a;

frmMain.nx94 :=0+a;
frmMain.nx95 :=-2+a;  //цифры
frmMain.nx96 :=-4+a;  //цифры
frmMain.nx97 :=-6+a;  //цифры
frmMain.nx98 := 2+a;  //цифры
frmMain.nx99 := 4+a;  //цифры
frmMain.nx100 := 6+a;  //цифры
frmMain.nx101 := 8+a;  //цифры
frmMain.nx102 := 10+a;  //цифры
frmMain.nx103 := 12+a;  //цифры

frmMain.nx104 := -8+a;  //буквы
frmMain.nx105 := -8+a;  //буквы
frmMain.nx106 := -8+a;  //буквы
frmMain.nx107 := -8+a;  //буквы
frmMain.nx108 := -8+a;  //буквы
frmMain.nx109 := -8+a;  //буквы
frmMain.nx110 := -8+a;  //буквы
frmMain.nx111 := -8+a;  //буквы
frmMain.nx112 := -8+a;  //буквы
frmMain.nx113 := -8+a;  //буквы

frmMain.nx114 := -6+a;  //корабль
frmMain.nx115 := 0+a;  //цифры
frmMain.nx116 :=-2+a;  //цифры
frmMain.nx117 :=-4+a;  //цифры
frmMain.nx118 :=-6+a;  //цифры
frmMain.nx119 := 2+a;  //цифры
frmMain.nx120 := 4+a;  //цифры
frmMain.nx121 := 6+a;  //цифры
frmMain.nx122 := 8+a;  //цифры
frmMain.nx123 := 10+a;  //цифры
frmMain.nx124 := 12+a;  //цифры
frmMain.nx125 := 0+a;
frmMain.nx126 := 0+a;
frmMain.nx127 := 0+a;
frmMain.nx128 := 2+a;
frmMain.nx129 := -2+a;
frmMain.nx130 := -4+a;
frmMain.nx131 := 4+a;
frmMain.nx132 := -6+a;
frmMain.nx133 := 6+a;
frmMain.nx134 := 8+a;
frmMain.nx135 := -8+a;
frmMain.nx136 := -2+a;
frmMain.nx137 := 2+a;
frmMain.nx138 := -4+a;
frmMain.nx139 := 4+a;
frmMain.nx140 := -2+a;
frmMain.nx141 := 2+a;
frmMain.nx142 := 0+a;
frmMain.nx143 := 2+a;
frmMain.nx144 := -2+a;
frmMain.nx145 := -4+a;
frmMain.nx146 := 4+a;
frmMain.nx147 := 6+a;
frmMain.nx148 := -6+a;
frmMain.nx149 := -6+a;
frmMain.nx150 := 6+a;
frmMain.nx151 := 2+a;
frmMain.nx152 := -2+a;
frmMain.nx153 := 2+a;
frmMain.nx154 := -2+a;
frmMain.nx155 := 0+a;
frmMain.nx156 := 0+a;
frmMain.nx157 := 4+a;
frmMain.nx158 := -4+a;
frmMain.nx159 := -6+a;
frmMain.nx160 := 6+a;
frmMain.nx161 := 4+a;
frmMain.nx162 := -4+a;
frmMain.nx163 := -6+a;
frmMain.nx164 := 6+a;
frmMain.nx165 := 4+a;
frmMain.nx166 := -4+a;
frmMain.nx167 := -6+a;
frmMain.nx168 := 6+a;
frmMain.nx169 := 4+a;
frmMain.nx170 := -4+a;
frmMain.nx171 := -6+a;
frmMain.nx172 := 6+a;
frmMain.nx173 := 4+a;
frmMain.nx174 := -4+a;
frmMain.nx175 := -6+a;
frmMain.nx176 := 6+a;
frmMain.nx177 := 4+a;
frmMain.nx178 := -4+a;
frmMain.nx179 := -6+a;
frmMain.nx180 := 6+a;
 frmMain.nx181 := 4+a;
 frmMain.nx182 := -4+a;
 frmMain.nx183 := -6+a;
 frmMain.nx184 := 6+a;
 frmMain.nx185 := 4+a;
 frmMain.nx186 := -4+a;
 frmMain.nx187 := -6+a;
 frmMain.nx188 := 6+a;
 frmMain.nx189 := -4+a;
 frmMain.nx190 := 4+a;
 frmMain.nx191 := -6+a;
 frmMain.nx192 := 6+a;
 frmMain.nx193 := -4+a;
 frmMain.nx194 := 4+a;
 frmMain.nx195 := -6+a;
 frmMain.nx196 := 6+a;
 frmMain.nx197 := -4+a;
 frmMain.nx198 := 4+a;
 frmMain.nx199 := -6+a;
 frmMain.nx200 := 6+a;
 frmMain.nx201 := -4+a;
 frmMain.nx202 := 4+a;
 frmMain.nx203 := -6+a;
 frmMain.nx204 := 6+a;
 frmMain.nx205 := 6+a;  //корабль
 frmMain.nx206 := 6+a;  //Подлодка
 frmMain.nx215 := -6+a;

 frmMain.frmGL.Width:=800;
 a:=0;
 frmMain.nz := 0+b;
  frmMain.nz1 := 0+b;
  frmMain.nz2 := 0+b;
 frmMain.nz3 := 1+b;
 frmMain.nz7 := 0+b;
 frmMain.nz8 := 2+b;
 frmMain.nz9 := 2+b;
  frmMain.nz10 := -2+b;
 frmMain.nz11 := -2+b;
 frmMain.nz12 := -2+b;
 frmMain.nz14 := -3+b;
 frmMain.nz15 := -3+b;
 frmMain.nz16 := -4+b;
 frmMain.nz17 := -4+b;
  frmMain.nz18 := -5+b;
 frmMain.nz19 := -5+b;
 frmMain.nz20 := -6+b;
 frmMain.nz21 := -7+b;
 frmMain.nz22 := -7+b;
  frmMain.nz23 := -8+b;
 frmMain.nz24 := -8+b;
  frmMain.nz25 := -9+b;
 frmMain.nz26 := -9+b;
 frmMain.nz27 := -10+b;
  frmMain.nz28 := -10+b;
  frmMain.nz29 := -11+b;
 frmMain.nz30 := -11+b;

// 1

 frmMain.nz31 := -2+b;
 frmMain.nz32 := -2+b;
 frmMain.nz33 := -3+b;
 frmMain.nz34 := -3+b;
 frmMain.nz35 := -4+b;
 frmMain.nz36 := -4+b;
  frmMain.nz37 := -5+b;
 frmMain.nz38 := -5+b;
 frmMain.nz39 := -6+b;
 frmMain.nz40 := -6+b;
 frmMain.nz41 := -7+b;
 frmMain.nz42 := -7+b;
 frmMain.nz43 := -8+b;
 frmMain.nz44 := -8+b;
 frmMain.nz45 := -9+b;  //////////////


 //////////////////////

 frmMain.nz46 := -9+b;
 frmMain.nz47 := -9+b;
 frmMain.nz48 := -10+b;
 frmMain.nz49 := -11+b;
 frmMain.nz50 := -11+b;
 frmMain.nz51 := -2+b;
 frmMain.nz52 :=-2+b;
 frmMain.nz53 := -3+b;
 frmMain.nz54 :=  3+b;
 frmMain.nz55 := -3+b;
 frmMain.nz56 := -4+b;
 frmMain.nz57 := -5+b;
 frmMain.nz58 := -5+b;
 frmMain.nz59 := -6+b;
 frmMain.nz60 := -6+b;
 frmMain.nz61 := -7+b;
 frmMain.nz62 := -7+b;
 frmMain.nz63 := -8+b;
 frmMain.nz64 := -8+b;
 frmMain.nz65 := -9+b;
 frmMain.nz66 := -9+b;
 frmMain.nz67 := -10+b;
 frmMain.nz68 := -10+b;
 frmMain.nz69 := -11+b;
 frmMain.nz70 := -11+b;


  ///3
 ///
 ///
 frmMain.nz71 := -2+b;
 frmMain.nz72 :=-2+b;
 frmMain.nz73 := -3+b;
 frmMain.nz74 :=  -3+b;
 frmMain.nz75 := -4+b;
 frmMain.nz76 := -4+b;
 frmMain.nz77 := -5+b;
 frmMain.nz78 := -5+b;
 frmMain.nz79 := -6+b;
 frmMain.nz80 := -6+b;
 frmMain.nz81 := -7+b;
 frmMain.nz82 := -7+b;
 frmMain.nz83 := -8+b;
 frmMain.nz84 := -8+b;
 frmMain.nz85 := -9+b;
 frmMain.nz86 := -9+b;
 frmMain.nz87 := -10+b;
 frmMain.nz88 := -10+b;
 frmMain.nz89 := -11+b;
 frmMain.nz90 := -2+b;

frmMain.nz94 :=1+b;
frmMain.nz95 :=1+b;  //цифры
frmMain.nz96 :=1+b;  //цифры
frmMain.nz97 :=1+b;  //цифры
frmMain.nz98 := 1+b;  //цифры
frmMain.nz99 := 1+b;  //цифры
frmMain.nz100 := 1+b;  //цифры
frmMain.nz101 := 1+b;  //цифры
frmMain.nz102 := 1+b;  //цифры
frmMain.nz103 := 1+b;  //цифры

frmMain.nz104 := -0+b;  //буквы
frmMain.nz105 := -2+b;  //буквы
frmMain.nz106 := -4+b;  //буквы
frmMain.nz107 := -6+b;  //буквы
frmMain.nz108 := -8+b;  //буквы
frmMain.nz109 := -10+b;  //буквы
frmMain.nz110 := -12+b;  //буквы
frmMain.nz111 := -14+b;  //буквы
frmMain.nz112 := -16+b;  //буквы
frmMain.nz113 := -18+b;  //буквы

frmMain.nz114 := -4+b;  //корабль
frmMain.nz115 := -18+b;  //цифры
frmMain.nz116 :=-18+b;  //цифры
frmMain.nz117 :=-18+b;  //цифры
frmMain.nz118 :=-18+b;  //цифры
frmMain.nz119 := -18+b;  //цифры
frmMain.nz120 := -18+b;  //цифры
frmMain.nz121 := -18+b;  //цифры
frmMain.nz122 := -18+b;  //цифры
frmMain.nz123 := -18+b;  //цифры
frmMain.nz124 := -18+b;  //цифры
frmMain.nz125 := -16+b;
frmMain.nz126 := -14+b;
frmMain.nz127 := -12+b;
frmMain.nz128 := -16+b;
frmMain.nz129 := -16+b;
frmMain.nz130 := -16+b;
frmMain.nz131 := -16+b;
frmMain.nz132 := -16+b;
frmMain.nz133 := -16+b;
frmMain.nz134 := -16+b;
frmMain.nz135 := -16+b;
frmMain.nz136 := -14+b;
frmMain.nz137 := -14+b;
frmMain.nz138 := -14+b;
frmMain.nz139 := -14+b;
frmMain.nz140 := -14+b;
frmMain.nz141 := -15+b;
frmMain.nz142 := -15+b;
frmMain.nz143 := -15+b;
frmMain.nz144 := -15+b;
frmMain.nz145 := -15+b;
frmMain.nz146 := -15+b;
frmMain.nz147 := -15+b;
frmMain.nz148 := -15+b;
frmMain.nz149 := -14+b;
frmMain.nz150 := -14+b;
frmMain.nz151 := -12+b;
frmMain.nz152 := -12+b;
frmMain.nz153 := -13+b;
frmMain.nz154 := -13+b;
frmMain.nz155 := -13+b;
frmMain.nz156 := -6+b;
frmMain.nz157 := -12+b;
frmMain.nz158 := -12+b;
frmMain.nz159 := -12+b;
frmMain.nz160 := -12+b;
frmMain.nz161 := -10+b;
frmMain.nz162 := -10+b;
frmMain.nz163 := -10+b;
frmMain.nz164 := -10+b;
frmMain.nz165 := -8+b;
frmMain.nz166 := -8+b;
frmMain.nz167 := -8+b;
frmMain.nz168 := -8+b;
frmMain.nz169 := -6+b;
frmMain.nz170 := -6+b;
frmMain.nz171 := -6+b;
frmMain.nz172 := -6+b;
frmMain.nz173 := -4+b;
frmMain.nz174 := -4+b;
frmMain.nz175 := -4+b;
frmMain.nz176 := -4+b;
frmMain.nz177 := -2+b;
frmMain.nz178 := -2+b;
frmMain.nz179 := -2+b;
frmMain.nz180 := -2+b;
 frmMain.nz181 := -3+b;
 frmMain.nz182 := -3+b;
 frmMain.nz183 := -3+b;
 frmMain.nz184 := -3+b;
 frmMain.nz185 := -5+b;
 frmMain.nz186 := -5+b;
 frmMain.nz187 := -5+b;
 frmMain.nz188 := -5+b;
 frmMain.nz189 := -7+b;
 frmMain.nz190 := -7+b;
 frmMain.nz191 := -7+b;
 frmMain.nz192 := -7+b;
 frmMain.nz193 := -9+b;
 frmMain.nz194 := -9+b;
 frmMain.nz195 := -9+b;
 frmMain.nz196 := -9+b;
 frmMain.nz197 := -11+b;
 frmMain.nz198 := -11+b;
 frmMain.nz199 := -11+b;
 frmMain.nz200 := -11+b;
 frmMain.nz201 := -13+b;
 frmMain.nz202 := -13+b;
 frmMain.nz203 := -13+b;
 frmMain.nz204 := -13+b;
 frmMain.nz205 := -4+b;  //корабль
 frmMain.nz206 := -8+b;  //Подлодка
 frmMain.nz215 := -12+b;  //Подлодка
 frmMain.frmGL.Width:=800;
 b:=0;


end;







































if (c=1) and (d=6) then
begin
StringGrid1.Cells[c,d]:='1';
a:=a+7;
b:=b+9;
frmMain.nx := 0+a;
  frmMain.nx1 := 0+a;
  frmMain.nx2 := 0+a;
 frmMain.nx3 := 0+a;
 frmMain.nx7 := -1+a;
 frmMain.nx8 := 1+a;
 frmMain.nx9 := -1+a;
  frmMain.nx10 := -2+a;
 frmMain.nx11 := -1+a;
 frmMain.nx12 := 1+a;
 frmMain.nx14 := 1+a;
 frmMain.nx15 := -1+a;
 frmMain.nx16 := -1+a;
 frmMain.nx17 := 1+a;
  frmMain.nx18 := -1+a;
 frmMain.nx19 := 1+a;
 frmMain.nx20 := -1+a;
 frmMain.nx21 := -1+a;
 frmMain.nx22 := 1+a;
  frmMain.nx23 := -1+a;
 frmMain.nx24 := 1+a;
  frmMain.nx25 := 1+a;
 frmMain.nx26 := -1+a;
 frmMain.nx27 := 1+a;
  frmMain.nx28 := -1+a;
  frmMain.nx29 := 1+a;
 frmMain.nx30 := -1+a;

// 1

 frmMain.nx31 := -2+a;
 frmMain.nx32 := 2+a;
 frmMain.nx33 := -2+a;
 frmMain.nx34 :=  2+a;
 frmMain.nx35 := -2+a;
 frmMain.nx36 := 2+a;
  frmMain.nx37 := -2+a;
 frmMain.nx38 := 2+a;
 frmMain.nx39 := -2+a;
 frmMain.nx40 := 2+a;
 frmMain.nx41 := -2+a;
 frmMain.nx42 := 2+a;
 frmMain.nx43 := -2+a;
 frmMain.nx44 := 2+a;
 frmMain.nx45 := -2+a;  //////////////


 //////////////////////

 frmMain.nx46 := -2+a;
 frmMain.nx47 := -2+a;
 frmMain.nx48 := 2+a;
 frmMain.nx49 := -2+a;
 frmMain.nx50 := 2+a;
 frmMain.nx51 := -3+a;
 frmMain.nx52 :=3+a;
 frmMain.nx53 := -3+a;
 frmMain.nx54 :=  3+a;
 frmMain.nx55 := -3+a;
 frmMain.nx56 := 3+a;
 frmMain.nx57 := -3+a;
 frmMain.nx58 := 3+a;
 frmMain.nx59 := -3+a;
 frmMain.nx60 := 3+a;
 frmMain.nx61 := -3+a;
 frmMain.nx62 := 3+a;
 frmMain.nx63 := -3+a;
 frmMain.nx64 := 3+a;
 frmMain.nx65 := -3+a;
 frmMain.nx66 := 3+a;
 frmMain.nx67 := -3+a;
 frmMain.nx68 := 3+a;
 frmMain.nx69 := -3+a;
 frmMain.nx70 := 3+a;


  ///3
 ///
 ///
 frmMain.nx71 := -4+a;
 frmMain.nx72 :=4+a;
 frmMain.nx73 := -4+a;
 frmMain.nx74 :=  4+a;
 frmMain.nx75 := -4+a;
 frmMain.nx76 := 4+a;
 frmMain.nx77 := -4+a;
 frmMain.nx78 := 4+a;
 frmMain.nx79 := -4+a;
 frmMain.nx80 := 4+a;
 frmMain.nx81 := -4+a;
 frmMain.nx82 := 4+a;
 frmMain.nx83 := -4+a;
 frmMain.nx84 := 4+a;
 frmMain.nx85 := -4+a;
 frmMain.nx86 := 4+a;
 frmMain.nx87 := -4+a;
 frmMain.nx88 := 4+a;
 frmMain.nx89 := -4+a;
 frmMain.nx90 := -2+a;

frmMain.nx94 :=0+a;
frmMain.nx95 :=-2+a;  //цифры
frmMain.nx96 :=-4+a;  //цифры
frmMain.nx97 :=-6+a;  //цифры
frmMain.nx98 := 2+a;  //цифры
frmMain.nx99 := 4+a;  //цифры
frmMain.nx100 := 6+a;  //цифры
frmMain.nx101 := 8+a;  //цифры
frmMain.nx102 := 10+a;  //цифры
frmMain.nx103 := 12+a;  //цифры

frmMain.nx104 := -8+a;  //буквы
frmMain.nx105 := -8+a;  //буквы
frmMain.nx106 := -8+a;  //буквы
frmMain.nx107 := -8+a;  //буквы
frmMain.nx108 := -8+a;  //буквы
frmMain.nx109 := -8+a;  //буквы
frmMain.nx110 := -8+a;  //буквы
frmMain.nx111 := -8+a;  //буквы
frmMain.nx112 := -8+a;  //буквы
frmMain.nx113 := -8+a;  //буквы

frmMain.nx114 := -6+a;  //корабль
frmMain.nx115 := 0+a;  //цифры
frmMain.nx116 :=-2+a;  //цифры
frmMain.nx117 :=-4+a;  //цифры
frmMain.nx118 :=-6+a;  //цифры
frmMain.nx119 := 2+a;  //цифры
frmMain.nx120 := 4+a;  //цифры
frmMain.nx121 := 6+a;  //цифры
frmMain.nx122 := 8+a;  //цифры
frmMain.nx123 := 10+a;  //цифры
frmMain.nx124 := 12+a;  //цифры
frmMain.nx125 := 0+a;
frmMain.nx126 := 0+a;
frmMain.nx127 := 0+a;
frmMain.nx128 := 2+a;
frmMain.nx129 := -2+a;
frmMain.nx130 := -4+a;
frmMain.nx131 := 4+a;
frmMain.nx132 := -6+a;
frmMain.nx133 := 6+a;
frmMain.nx134 := 8+a;
frmMain.nx135 := -8+a;
frmMain.nx136 := -2+a;
frmMain.nx137 := 2+a;
frmMain.nx138 := -4+a;
frmMain.nx139 := 4+a;
frmMain.nx140 := -2+a;
frmMain.nx141 := 2+a;
frmMain.nx142 := 0+a;
frmMain.nx143 := 2+a;
frmMain.nx144 := -2+a;
frmMain.nx145 := -4+a;
frmMain.nx146 := 4+a;
frmMain.nx147 := 6+a;
frmMain.nx148 := -6+a;
frmMain.nx149 := -6+a;
frmMain.nx150 := 6+a;
frmMain.nx151 := 2+a;
frmMain.nx152 := -2+a;
frmMain.nx153 := 2+a;
frmMain.nx154 := -2+a;
frmMain.nx155 := 0+a;
frmMain.nx156 := 0+a;
frmMain.nx157 := 4+a;
frmMain.nx158 := -4+a;
frmMain.nx159 := -6+a;
frmMain.nx160 := 6+a;
frmMain.nx161 := 4+a;
frmMain.nx162 := -4+a;
frmMain.nx163 := -6+a;
frmMain.nx164 := 6+a;
frmMain.nx165 := 4+a;
frmMain.nx166 := -4+a;
frmMain.nx167 := -6+a;
frmMain.nx168 := 6+a;
frmMain.nx169 := 4+a;
frmMain.nx170 := -4+a;
frmMain.nx171 := -6+a;
frmMain.nx172 := 6+a;
frmMain.nx173 := 4+a;
frmMain.nx174 := -4+a;
frmMain.nx175 := -6+a;
frmMain.nx176 := 6+a;
frmMain.nx177 := 4+a;
frmMain.nx178 := -4+a;
frmMain.nx179 := -6+a;
frmMain.nx180 := 6+a;
 frmMain.nx181 := 4+a;
 frmMain.nx182 := -4+a;
 frmMain.nx183 := -6+a;
 frmMain.nx184 := 6+a;
 frmMain.nx185 := 4+a;
 frmMain.nx186 := -4+a;
 frmMain.nx187 := -6+a;
 frmMain.nx188 := 6+a;
 frmMain.nx189 := -4+a;
 frmMain.nx190 := 4+a;
 frmMain.nx191 := -6+a;
 frmMain.nx192 := 6+a;
 frmMain.nx193 := -4+a;
 frmMain.nx194 := 4+a;
 frmMain.nx195 := -6+a;
 frmMain.nx196 := 6+a;
 frmMain.nx197 := -4+a;
 frmMain.nx198 := 4+a;
 frmMain.nx199 := -6+a;
 frmMain.nx200 := 6+a;
 frmMain.nx201 := -4+a;
 frmMain.nx202 := 4+a;
 frmMain.nx203 := -6+a;
 frmMain.nx204 := 6+a;
 frmMain.nx205 := 6+a;  //корабль
 frmMain.nx206 := 6+a;  //Подлодка
 frmMain.nx215 := -6+a;

 frmMain.frmGL.Width:=800;
 a:=0;
 frmMain.nz := 0+b;
  frmMain.nz1 := 0+b;
  frmMain.nz2 := 0+b;
 frmMain.nz3 := 1+b;
 frmMain.nz7 := 0+b;
 frmMain.nz8 := 2+b;
 frmMain.nz9 := 2+b;
  frmMain.nz10 := -2+b;
 frmMain.nz11 := -2+b;
 frmMain.nz12 := -2+b;
 frmMain.nz14 := -3+b;
 frmMain.nz15 := -3+b;
 frmMain.nz16 := -4+b;
 frmMain.nz17 := -4+b;
  frmMain.nz18 := -5+b;
 frmMain.nz19 := -5+b;
 frmMain.nz20 := -6+b;
 frmMain.nz21 := -7+b;
 frmMain.nz22 := -7+b;
  frmMain.nz23 := -8+b;
 frmMain.nz24 := -8+b;
  frmMain.nz25 := -9+b;
 frmMain.nz26 := -9+b;
 frmMain.nz27 := -10+b;
  frmMain.nz28 := -10+b;
  frmMain.nz29 := -11+b;
 frmMain.nz30 := -11+b;

// 1

 frmMain.nz31 := -2+b;
 frmMain.nz32 := -2+b;
 frmMain.nz33 := -3+b;
 frmMain.nz34 := -3+b;
 frmMain.nz35 := -4+b;
 frmMain.nz36 := -4+b;
  frmMain.nz37 := -5+b;
 frmMain.nz38 := -5+b;
 frmMain.nz39 := -6+b;
 frmMain.nz40 := -6+b;
 frmMain.nz41 := -7+b;
 frmMain.nz42 := -7+b;
 frmMain.nz43 := -8+b;
 frmMain.nz44 := -8+b;
 frmMain.nz45 := -9+b;  //////////////


 //////////////////////

 frmMain.nz46 := -9+b;
 frmMain.nz47 := -9+b;
 frmMain.nz48 := -10+b;
 frmMain.nz49 := -11+b;
 frmMain.nz50 := -11+b;
 frmMain.nz51 := -2+b;
 frmMain.nz52 :=-2+b;
 frmMain.nz53 := -3+b;
 frmMain.nz54 :=  3+b;
 frmMain.nz55 := -3+b;
 frmMain.nz56 := -4+b;
 frmMain.nz57 := -5+b;
 frmMain.nz58 := -5+b;
 frmMain.nz59 := -6+b;
 frmMain.nz60 := -6+b;
 frmMain.nz61 := -7+b;
 frmMain.nz62 := -7+b;
 frmMain.nz63 := -8+b;
 frmMain.nz64 := -8+b;
 frmMain.nz65 := -9+b;
 frmMain.nz66 := -9+b;
 frmMain.nz67 := -10+b;
 frmMain.nz68 := -10+b;
 frmMain.nz69 := -11+b;
 frmMain.nz70 := -11+b;


  ///3
 ///
 ///
 frmMain.nz71 := -2+b;
 frmMain.nz72 :=-2+b;
 frmMain.nz73 := -3+b;
 frmMain.nz74 :=  -3+b;
 frmMain.nz75 := -4+b;
 frmMain.nz76 := -4+b;
 frmMain.nz77 := -5+b;
 frmMain.nz78 := -5+b;
 frmMain.nz79 := -6+b;
 frmMain.nz80 := -6+b;
 frmMain.nz81 := -7+b;
 frmMain.nz82 := -7+b;
 frmMain.nz83 := -8+b;
 frmMain.nz84 := -8+b;
 frmMain.nz85 := -9+b;
 frmMain.nz86 := -9+b;
 frmMain.nz87 := -10+b;
 frmMain.nz88 := -10+b;
 frmMain.nz89 := -11+b;
 frmMain.nz90 := -2+b;

frmMain.nz94 :=1+b;
frmMain.nz95 :=1+b;  //цифры
frmMain.nz96 :=1+b;  //цифры
frmMain.nz97 :=1+b;  //цифры
frmMain.nz98 := 1+b;  //цифры
frmMain.nz99 := 1+b;  //цифры
frmMain.nz100 := 1+b;  //цифры
frmMain.nz101 := 1+b;  //цифры
frmMain.nz102 := 1+b;  //цифры
frmMain.nz103 := 1+b;  //цифры

frmMain.nz104 := -0+b;  //буквы
frmMain.nz105 := -2+b;  //буквы
frmMain.nz106 := -4+b;  //буквы
frmMain.nz107 := -6+b;  //буквы
frmMain.nz108 := -8+b;  //буквы
frmMain.nz109 := -10+b;  //буквы
frmMain.nz110 := -12+b;  //буквы
frmMain.nz111 := -14+b;  //буквы
frmMain.nz112 := -16+b;  //буквы
frmMain.nz113 := -18+b;  //буквы

frmMain.nz114 := -4+b;  //корабль
frmMain.nz115 := -18+b;  //цифры
frmMain.nz116 :=-18+b;  //цифры
frmMain.nz117 :=-18+b;  //цифры
frmMain.nz118 :=-18+b;  //цифры
frmMain.nz119 := -18+b;  //цифры
frmMain.nz120 := -18+b;  //цифры
frmMain.nz121 := -18+b;  //цифры
frmMain.nz122 := -18+b;  //цифры
frmMain.nz123 := -18+b;  //цифры
frmMain.nz124 := -18+b;  //цифры
frmMain.nz125 := -16+b;
frmMain.nz126 := -14+b;
frmMain.nz127 := -12+b;
frmMain.nz128 := -16+b;
frmMain.nz129 := -16+b;
frmMain.nz130 := -16+b;
frmMain.nz131 := -16+b;
frmMain.nz132 := -16+b;
frmMain.nz133 := -16+b;
frmMain.nz134 := -16+b;
frmMain.nz135 := -16+b;
frmMain.nz136 := -14+b;
frmMain.nz137 := -14+b;
frmMain.nz138 := -14+b;
frmMain.nz139 := -14+b;
frmMain.nz140 := -14+b;
frmMain.nz141 := -15+b;
frmMain.nz142 := -15+b;
frmMain.nz143 := -15+b;
frmMain.nz144 := -15+b;
frmMain.nz145 := -15+b;
frmMain.nz146 := -15+b;
frmMain.nz147 := -15+b;
frmMain.nz148 := -15+b;
frmMain.nz149 := -14+b;
frmMain.nz150 := -14+b;
frmMain.nz151 := -12+b;
frmMain.nz152 := -12+b;
frmMain.nz153 := -13+b;
frmMain.nz154 := -13+b;
frmMain.nz155 := -13+b;
frmMain.nz156 := -6+b;
frmMain.nz157 := -12+b;
frmMain.nz158 := -12+b;
frmMain.nz159 := -12+b;
frmMain.nz160 := -12+b;
frmMain.nz161 := -10+b;
frmMain.nz162 := -10+b;
frmMain.nz163 := -10+b;
frmMain.nz164 := -10+b;
frmMain.nz165 := -8+b;
frmMain.nz166 := -8+b;
frmMain.nz167 := -8+b;
frmMain.nz168 := -8+b;
frmMain.nz169 := -6+b;
frmMain.nz170 := -6+b;
frmMain.nz171 := -6+b;
frmMain.nz172 := -6+b;
frmMain.nz173 := -4+b;
frmMain.nz174 := -4+b;
frmMain.nz175 := -4+b;
frmMain.nz176 := -4+b;
frmMain.nz177 := -2+b;
frmMain.nz178 := -2+b;
frmMain.nz179 := -2+b;
frmMain.nz180 := -2+b;
 frmMain.nz181 := -3+b;
 frmMain.nz182 := -3+b;
 frmMain.nz183 := -3+b;
 frmMain.nz184 := -3+b;
 frmMain.nz185 := -5+b;
 frmMain.nz186 := -5+b;
 frmMain.nz187 := -5+b;
 frmMain.nz188 := -5+b;
 frmMain.nz189 := -7+b;
 frmMain.nz190 := -7+b;
 frmMain.nz191 := -7+b;
 frmMain.nz192 := -7+b;
 frmMain.nz193 := -9+b;
 frmMain.nz194 := -9+b;
 frmMain.nz195 := -9+b;
 frmMain.nz196 := -9+b;
 frmMain.nz197 := -11+b;
 frmMain.nz198 := -11+b;
 frmMain.nz199 := -11+b;
 frmMain.nz200 := -11+b;
 frmMain.nz201 := -13+b;
 frmMain.nz202 := -13+b;
 frmMain.nz203 := -13+b;
 frmMain.nz204 := -13+b;
 frmMain.nz205 := -4+b;  //корабль
 frmMain.nz206 := -8+b;  //Подлодка
 frmMain.nz215 := -12+b;  //Подлодка
 frmMain.frmGL.Width:=800;
 b:=0;


end;

























 if (c=1) and (d=5) then
begin
StringGrid1.Cells[c,d]:='1';
a:=a+7;
b:=b+11;
frmMain.nx := 0+a;
  frmMain.nx1 := 0+a;
  frmMain.nx2 := 0+a;
 frmMain.nx3 := 0+a;
 frmMain.nx7 := -1+a;
 frmMain.nx8 := 1+a;
 frmMain.nx9 := -1+a;
  frmMain.nx10 := -2+a;
 frmMain.nx11 := -1+a;
 frmMain.nx12 := 1+a;
 frmMain.nx14 := 1+a;
 frmMain.nx15 := -1+a;
 frmMain.nx16 := -1+a;
 frmMain.nx17 := 1+a;
  frmMain.nx18 := -1+a;
 frmMain.nx19 := 1+a;
 frmMain.nx20 := -1+a;
 frmMain.nx21 := -1+a;
 frmMain.nx22 := 1+a;
  frmMain.nx23 := -1+a;
 frmMain.nx24 := 1+a;
  frmMain.nx25 := 1+a;
 frmMain.nx26 := -1+a;
 frmMain.nx27 := 1+a;
  frmMain.nx28 := -1+a;
  frmMain.nx29 := 1+a;
 frmMain.nx30 := -1+a;

// 1

 frmMain.nx31 := -2+a;
 frmMain.nx32 := 2+a;
 frmMain.nx33 := -2+a;
 frmMain.nx34 :=  2+a;
 frmMain.nx35 := -2+a;
 frmMain.nx36 := 2+a;
  frmMain.nx37 := -2+a;
 frmMain.nx38 := 2+a;
 frmMain.nx39 := -2+a;
 frmMain.nx40 := 2+a;
 frmMain.nx41 := -2+a;
 frmMain.nx42 := 2+a;
 frmMain.nx43 := -2+a;
 frmMain.nx44 := 2+a;
 frmMain.nx45 := -2+a;  //////////////


 //////////////////////

 frmMain.nx46 := -2+a;
 frmMain.nx47 := -2+a;
 frmMain.nx48 := 2+a;
 frmMain.nx49 := -2+a;
 frmMain.nx50 := 2+a;
 frmMain.nx51 := -3+a;
 frmMain.nx52 :=3+a;
 frmMain.nx53 := -3+a;
 frmMain.nx54 :=  3+a;
 frmMain.nx55 := -3+a;
 frmMain.nx56 := 3+a;
 frmMain.nx57 := -3+a;
 frmMain.nx58 := 3+a;
 frmMain.nx59 := -3+a;
 frmMain.nx60 := 3+a;
 frmMain.nx61 := -3+a;
 frmMain.nx62 := 3+a;
 frmMain.nx63 := -3+a;
 frmMain.nx64 := 3+a;
 frmMain.nx65 := -3+a;
 frmMain.nx66 := 3+a;
 frmMain.nx67 := -3+a;
 frmMain.nx68 := 3+a;
 frmMain.nx69 := -3+a;
 frmMain.nx70 := 3+a;


  ///3
 ///
 ///
 frmMain.nx71 := -4+a;
 frmMain.nx72 :=4+a;
 frmMain.nx73 := -4+a;
 frmMain.nx74 :=  4+a;
 frmMain.nx75 := -4+a;
 frmMain.nx76 := 4+a;
 frmMain.nx77 := -4+a;
 frmMain.nx78 := 4+a;
 frmMain.nx79 := -4+a;
 frmMain.nx80 := 4+a;
 frmMain.nx81 := -4+a;
 frmMain.nx82 := 4+a;
 frmMain.nx83 := -4+a;
 frmMain.nx84 := 4+a;
 frmMain.nx85 := -4+a;
 frmMain.nx86 := 4+a;
 frmMain.nx87 := -4+a;
 frmMain.nx88 := 4+a;
 frmMain.nx89 := -4+a;
 frmMain.nx90 := -2+a;

frmMain.nx94 :=0+a;
frmMain.nx95 :=-2+a;  //цифры
frmMain.nx96 :=-4+a;  //цифры
frmMain.nx97 :=-6+a;  //цифры
frmMain.nx98 := 2+a;  //цифры
frmMain.nx99 := 4+a;  //цифры
frmMain.nx100 := 6+a;  //цифры
frmMain.nx101 := 8+a;  //цифры
frmMain.nx102 := 10+a;  //цифры
frmMain.nx103 := 12+a;  //цифры

frmMain.nx104 := -8+a;  //буквы
frmMain.nx105 := -8+a;  //буквы
frmMain.nx106 := -8+a;  //буквы
frmMain.nx107 := -8+a;  //буквы
frmMain.nx108 := -8+a;  //буквы
frmMain.nx109 := -8+a;  //буквы
frmMain.nx110 := -8+a;  //буквы
frmMain.nx111 := -8+a;  //буквы
frmMain.nx112 := -8+a;  //буквы
frmMain.nx113 := -8+a;  //буквы

frmMain.nx114 := -6+a;  //корабль
frmMain.nx115 := 0+a;  //цифры
frmMain.nx116 :=-2+a;  //цифры
frmMain.nx117 :=-4+a;  //цифры
frmMain.nx118 :=-6+a;  //цифры
frmMain.nx119 := 2+a;  //цифры
frmMain.nx120 := 4+a;  //цифры
frmMain.nx121 := 6+a;  //цифры
frmMain.nx122 := 8+a;  //цифры
frmMain.nx123 := 10+a;  //цифры
frmMain.nx124 := 12+a;  //цифры
frmMain.nx125 := 0+a;
frmMain.nx126 := 0+a;
frmMain.nx127 := 0+a;
frmMain.nx128 := 2+a;
frmMain.nx129 := -2+a;
frmMain.nx130 := -4+a;
frmMain.nx131 := 4+a;
frmMain.nx132 := -6+a;
frmMain.nx133 := 6+a;
frmMain.nx134 := 8+a;
frmMain.nx135 := -8+a;
frmMain.nx136 := -2+a;
frmMain.nx137 := 2+a;
frmMain.nx138 := -4+a;
frmMain.nx139 := 4+a;
frmMain.nx140 := -2+a;
frmMain.nx141 := 2+a;
frmMain.nx142 := 0+a;
frmMain.nx143 := 2+a;
frmMain.nx144 := -2+a;
frmMain.nx145 := -4+a;
frmMain.nx146 := 4+a;
frmMain.nx147 := 6+a;
frmMain.nx148 := -6+a;
frmMain.nx149 := -6+a;
frmMain.nx150 := 6+a;
frmMain.nx151 := 2+a;
frmMain.nx152 := -2+a;
frmMain.nx153 := 2+a;
frmMain.nx154 := -2+a;
frmMain.nx155 := 0+a;
frmMain.nx156 := 0+a;
frmMain.nx157 := 4+a;
frmMain.nx158 := -4+a;
frmMain.nx159 := -6+a;
frmMain.nx160 := 6+a;
frmMain.nx161 := 4+a;
frmMain.nx162 := -4+a;
frmMain.nx163 := -6+a;
frmMain.nx164 := 6+a;
frmMain.nx165 := 4+a;
frmMain.nx166 := -4+a;
frmMain.nx167 := -6+a;
frmMain.nx168 := 6+a;
frmMain.nx169 := 4+a;
frmMain.nx170 := -4+a;
frmMain.nx171 := -6+a;
frmMain.nx172 := 6+a;
frmMain.nx173 := 4+a;
frmMain.nx174 := -4+a;
frmMain.nx175 := -6+a;
frmMain.nx176 := 6+a;
frmMain.nx177 := 4+a;
frmMain.nx178 := -4+a;
frmMain.nx179 := -6+a;
frmMain.nx180 := 6+a;
 frmMain.nx181 := 4+a;
 frmMain.nx182 := -4+a;
 frmMain.nx183 := -6+a;
 frmMain.nx184 := 6+a;
 frmMain.nx185 := 4+a;
 frmMain.nx186 := -4+a;
 frmMain.nx187 := -6+a;
 frmMain.nx188 := 6+a;
 frmMain.nx189 := -4+a;
 frmMain.nx190 := 4+a;
 frmMain.nx191 := -6+a;
 frmMain.nx192 := 6+a;
 frmMain.nx193 := -4+a;
 frmMain.nx194 := 4+a;
 frmMain.nx195 := -6+a;
 frmMain.nx196 := 6+a;
 frmMain.nx197 := -4+a;
 frmMain.nx198 := 4+a;
 frmMain.nx199 := -6+a;
 frmMain.nx200 := 6+a;
 frmMain.nx201 := -4+a;
 frmMain.nx202 := 4+a;
 frmMain.nx203 := -6+a;
 frmMain.nx204 := 6+a;
 frmMain.nx205 := 6+a;  //корабль
 frmMain.nx206 := 6+a;  //Подлодка
 frmMain.nx215 := -6+a;
 frmMain.frmGL.Width:=800;
 a:=0;
 frmMain.nz := 0+b;
  frmMain.nz1 := 0+b;
  frmMain.nz2 := 0+b;
 frmMain.nz3 := 1+b;
 frmMain.nz7 := 0+b;
 frmMain.nz8 := 2+b;
 frmMain.nz9 := 2+b;
  frmMain.nz10 := -2+b;
 frmMain.nz11 := -2+b;
 frmMain.nz12 := -2+b;
 frmMain.nz14 := -3+b;
 frmMain.nz15 := -3+b;
 frmMain.nz16 := -4+b;
 frmMain.nz17 := -4+b;
  frmMain.nz18 := -5+b;
 frmMain.nz19 := -5+b;
 frmMain.nz20 := -6+b;
 frmMain.nz21 := -7+b;
 frmMain.nz22 := -7+b;
  frmMain.nz23 := -8+b;
 frmMain.nz24 := -8+b;
  frmMain.nz25 := -9+b;
 frmMain.nz26 := -9+b;
 frmMain.nz27 := -10+b;
  frmMain.nz28 := -10+b;
  frmMain.nz29 := -11+b;
 frmMain.nz30 := -11+b;

// 1

 frmMain.nz31 := -2+b;
 frmMain.nz32 := -2+b;
 frmMain.nz33 := -3+b;
 frmMain.nz34 := -3+b;
 frmMain.nz35 := -4+b;
 frmMain.nz36 := -4+b;
  frmMain.nz37 := -5+b;
 frmMain.nz38 := -5+b;
 frmMain.nz39 := -6+b;
 frmMain.nz40 := -6+b;
 frmMain.nz41 := -7+b;
 frmMain.nz42 := -7+b;
 frmMain.nz43 := -8+b;
 frmMain.nz44 := -8+b;
 frmMain.nz45 := -9+b;  //////////////


 //////////////////////

 frmMain.nz46 := -9+b;
 frmMain.nz47 := -9+b;
 frmMain.nz48 := -10+b;
 frmMain.nz49 := -11+b;
 frmMain.nz50 := -11+b;
 frmMain.nz51 := -2+b;
 frmMain.nz52 :=-2+b;
 frmMain.nz53 := -3+b;
 frmMain.nz54 :=  3+b;
 frmMain.nz55 := -3+b;
 frmMain.nz56 := -4+b;
 frmMain.nz57 := -5+b;
 frmMain.nz58 := -5+b;
 frmMain.nz59 := -6+b;
 frmMain.nz60 := -6+b;
 frmMain.nz61 := -7+b;
 frmMain.nz62 := -7+b;
 frmMain.nz63 := -8+b;
 frmMain.nz64 := -8+b;
 frmMain.nz65 := -9+b;
 frmMain.nz66 := -9+b;
 frmMain.nz67 := -10+b;
 frmMain.nz68 := -10+b;
 frmMain.nz69 := -11+b;
 frmMain.nz70 := -11+b;


  ///3
 ///
 ///
 frmMain.nz71 := -2+b;
 frmMain.nz72 :=-2+b;
 frmMain.nz73 := -3+b;
 frmMain.nz74 :=  -3+b;
 frmMain.nz75 := -4+b;
 frmMain.nz76 := -4+b;
 frmMain.nz77 := -5+b;
 frmMain.nz78 := -5+b;
 frmMain.nz79 := -6+b;
 frmMain.nz80 := -6+b;
 frmMain.nz81 := -7+b;
 frmMain.nz82 := -7+b;
 frmMain.nz83 := -8+b;
 frmMain.nz84 := -8+b;
 frmMain.nz85 := -9+b;
 frmMain.nz86 := -9+b;
 frmMain.nz87 := -10+b;
 frmMain.nz88 := -10+b;
 frmMain.nz89 := -11+b;
 frmMain.nz90 := -2+b;

frmMain.nz94 :=1+b;
frmMain.nz95 :=1+b;  //цифры
frmMain.nz96 :=1+b;  //цифры
frmMain.nz97 :=1+b;  //цифры
frmMain.nz98 := 1+b;  //цифры
frmMain.nz99 := 1+b;  //цифры
frmMain.nz100 := 1+b;  //цифры
frmMain.nz101 := 1+b;  //цифры
frmMain.nz102 := 1+b;  //цифры
frmMain.nz103 := 1+b;  //цифры

frmMain.nz104 := -0+b;  //буквы
frmMain.nz105 := -2+b;  //буквы
frmMain.nz106 := -4+b;  //буквы
frmMain.nz107 := -6+b;  //буквы
frmMain.nz108 := -8+b;  //буквы
frmMain.nz109 := -10+b;  //буквы
frmMain.nz110 := -12+b;  //буквы
frmMain.nz111 := -14+b;  //буквы
frmMain.nz112 := -16+b;  //буквы
frmMain.nz113 := -18+b;  //буквы

frmMain.nz114 := -4+b;  //корабль
frmMain.nz115 := -18+b;  //цифры
frmMain.nz116 :=-18+b;  //цифры
frmMain.nz117 :=-18+b;  //цифры
frmMain.nz118 :=-18+b;  //цифры
frmMain.nz119 := -18+b;  //цифры
frmMain.nz120 := -18+b;  //цифры
frmMain.nz121 := -18+b;  //цифры
frmMain.nz122 := -18+b;  //цифры
frmMain.nz123 := -18+b;  //цифры
frmMain.nz124 := -18+b;  //цифры
frmMain.nz125 := -16+b;
frmMain.nz126 := -14+b;
frmMain.nz127 := -12+b;
frmMain.nz128 := -16+b;
frmMain.nz129 := -16+b;
frmMain.nz130 := -16+b;
frmMain.nz131 := -16+b;
frmMain.nz132 := -16+b;
frmMain.nz133 := -16+b;
frmMain.nz134 := -16+b;
frmMain.nz135 := -16+b;
frmMain.nz136 := -14+b;
frmMain.nz137 := -14+b;
frmMain.nz138 := -14+b;
frmMain.nz139 := -14+b;
frmMain.nz140 := -14+b;
frmMain.nz141 := -15+b;
frmMain.nz142 := -15+b;
frmMain.nz143 := -15+b;
frmMain.nz144 := -15+b;
frmMain.nz145 := -15+b;
frmMain.nz146 := -15+b;
frmMain.nz147 := -15+b;
frmMain.nz148 := -15+b;
frmMain.nz149 := -14+b;
frmMain.nz150 := -14+b;
frmMain.nz151 := -12+b;
frmMain.nz152 := -12+b;
frmMain.nz153 := -13+b;
frmMain.nz154 := -13+b;
frmMain.nz155 := -13+b;
frmMain.nz156 := -6+b;
frmMain.nz157 := -12+b;
frmMain.nz158 := -12+b;
frmMain.nz159 := -12+b;
frmMain.nz160 := -12+b;
frmMain.nz161 := -10+b;
frmMain.nz162 := -10+b;
frmMain.nz163 := -10+b;
frmMain.nz164 := -10+b;
frmMain.nz165 := -8+b;
frmMain.nz166 := -8+b;
frmMain.nz167 := -8+b;
frmMain.nz168 := -8+b;
frmMain.nz169 := -6+b;
frmMain.nz170 := -6+b;
frmMain.nz171 := -6+b;
frmMain.nz172 := -6+b;
frmMain.nz173 := -4+b;
frmMain.nz174 := -4+b;
frmMain.nz175 := -4+b;
frmMain.nz176 := -4+b;
frmMain.nz177 := -2+b;
frmMain.nz178 := -2+b;
frmMain.nz179 := -2+b;
frmMain.nz180 := -2+b;
 frmMain.nz181 := -3+b;
 frmMain.nz182 := -3+b;
 frmMain.nz183 := -3+b;
 frmMain.nz184 := -3+b;
 frmMain.nz185 := -5+b;
 frmMain.nz186 := -5+b;
 frmMain.nz187 := -5+b;
 frmMain.nz188 := -5+b;
 frmMain.nz189 := -7+b;
 frmMain.nz190 := -7+b;
 frmMain.nz191 := -7+b;
 frmMain.nz192 := -7+b;
 frmMain.nz193 := -9+b;
 frmMain.nz194 := -9+b;
 frmMain.nz195 := -9+b;
 frmMain.nz196 := -9+b;
 frmMain.nz197 := -11+b;
 frmMain.nz198 := -11+b;
 frmMain.nz199 := -11+b;
 frmMain.nz200 := -11+b;
 frmMain.nz201 := -13+b;
 frmMain.nz202 := -13+b;
 frmMain.nz203 := -13+b;
 frmMain.nz204 := -13+b;
 frmMain.nz205 := -4+b;  //корабль
 frmMain.nz206 := -8+b;  //Подлодка
 frmMain.nz215 := -12+b;  //Подлодка
 frmMain.frmGL.Width:=800;
 b:=0;


end;






















































 if (c=1) and (d=7) then
begin
StringGrid1.Cells[c,d]:='1';
a:=a+7;
b:=b+7;
frmMain.nx := 0+a;
  frmMain.nx1 := 0+a;
  frmMain.nx2 := 0+a;
 frmMain.nx3 := 0+a;
 frmMain.nx7 := -1+a;
 frmMain.nx8 := 1+a;
 frmMain.nx9 := -1+a;
  frmMain.nx10 := -2+a;
 frmMain.nx11 := -1+a;
 frmMain.nx12 := 1+a;
 frmMain.nx14 := 1+a;
 frmMain.nx15 := -1+a;
 frmMain.nx16 := -1+a;
 frmMain.nx17 := 1+a;
  frmMain.nx18 := -1+a;
 frmMain.nx19 := 1+a;
 frmMain.nx20 := -1+a;
 frmMain.nx21 := -1+a;
 frmMain.nx22 := 1+a;
  frmMain.nx23 := -1+a;
 frmMain.nx24 := 1+a;
  frmMain.nx25 := 1+a;
 frmMain.nx26 := -1+a;
 frmMain.nx27 := 1+a;
  frmMain.nx28 := -1+a;
  frmMain.nx29 := 1+a;
 frmMain.nx30 := -1+a;

// 1

 frmMain.nx31 := -2+a;
 frmMain.nx32 := 2+a;
 frmMain.nx33 := -2+a;
 frmMain.nx34 :=  2+a;
 frmMain.nx35 := -2+a;
 frmMain.nx36 := 2+a;
  frmMain.nx37 := -2+a;
 frmMain.nx38 := 2+a;
 frmMain.nx39 := -2+a;
 frmMain.nx40 := 2+a;
 frmMain.nx41 := -2+a;
 frmMain.nx42 := 2+a;
 frmMain.nx43 := -2+a;
 frmMain.nx44 := 2+a;
 frmMain.nx45 := -2+a;  //////////////


 //////////////////////

 frmMain.nx46 := -2+a;
 frmMain.nx47 := -2+a;
 frmMain.nx48 := 2+a;
 frmMain.nx49 := -2+a;
 frmMain.nx50 := 2+a;
 frmMain.nx51 := -3+a;
 frmMain.nx52 :=3+a;
 frmMain.nx53 := -3+a;
 frmMain.nx54 :=  3+a;
 frmMain.nx55 := -3+a;
 frmMain.nx56 := 3+a;
 frmMain.nx57 := -3+a;
 frmMain.nx58 := 3+a;
 frmMain.nx59 := -3+a;
 frmMain.nx60 := 3+a;
 frmMain.nx61 := -3+a;
 frmMain.nx62 := 3+a;
 frmMain.nx63 := -3+a;
 frmMain.nx64 := 3+a;
 frmMain.nx65 := -3+a;
 frmMain.nx66 := 3+a;
 frmMain.nx67 := -3+a;
 frmMain.nx68 := 3+a;
 frmMain.nx69 := -3+a;
 frmMain.nx70 := 3+a;


  ///3
 ///
 ///
 frmMain.nx71 := -4+a;
 frmMain.nx72 :=4+a;
 frmMain.nx73 := -4+a;
 frmMain.nx74 :=  4+a;
 frmMain.nx75 := -4+a;
 frmMain.nx76 := 4+a;
 frmMain.nx77 := -4+a;
 frmMain.nx78 := 4+a;
 frmMain.nx79 := -4+a;
 frmMain.nx80 := 4+a;
 frmMain.nx81 := -4+a;
 frmMain.nx82 := 4+a;
 frmMain.nx83 := -4+a;
 frmMain.nx84 := 4+a;
 frmMain.nx85 := -4+a;
 frmMain.nx86 := 4+a;
 frmMain.nx87 := -4+a;
 frmMain.nx88 := 4+a;
 frmMain.nx89 := -4+a;
 frmMain.nx90 := -2+a;

frmMain.nx94 :=0+a;
frmMain.nx95 :=-2+a;  //цифры
frmMain.nx96 :=-4+a;  //цифры
frmMain.nx97 :=-6+a;  //цифры
frmMain.nx98 := 2+a;  //цифры
frmMain.nx99 := 4+a;  //цифры
frmMain.nx100 := 6+a;  //цифры
frmMain.nx101 := 8+a;  //цифры
frmMain.nx102 := 10+a;  //цифры
frmMain.nx103 := 12+a;  //цифры

frmMain.nx104 := -8+a;  //буквы
frmMain.nx105 := -8+a;  //буквы
frmMain.nx106 := -8+a;  //буквы
frmMain.nx107 := -8+a;  //буквы
frmMain.nx108 := -8+a;  //буквы
frmMain.nx109 := -8+a;  //буквы
frmMain.nx110 := -8+a;  //буквы
frmMain.nx111 := -8+a;  //буквы
frmMain.nx112 := -8+a;  //буквы
frmMain.nx113 := -8+a;  //буквы

frmMain.nx114 := -6+a;  //корабль
frmMain.nx115 := 0+a;  //цифры
frmMain.nx116 :=-2+a;  //цифры
frmMain.nx117 :=-4+a;  //цифры
frmMain.nx118 :=-6+a;  //цифры
frmMain.nx119 := 2+a;  //цифры
frmMain.nx120 := 4+a;  //цифры
frmMain.nx121 := 6+a;  //цифры
frmMain.nx122 := 8+a;  //цифры
frmMain.nx123 := 10+a;  //цифры
frmMain.nx124 := 12+a;  //цифры
frmMain.nx125 := 0+a;
frmMain.nx126 := 0+a;
frmMain.nx127 := 0+a;
frmMain.nx128 := 2+a;
frmMain.nx129 := -2+a;
frmMain.nx130 := -4+a;
frmMain.nx131 := 4+a;
frmMain.nx132 := -6+a;
frmMain.nx133 := 6+a;
frmMain.nx134 := 8+a;
frmMain.nx135 := -8+a;
frmMain.nx136 := -2+a;
frmMain.nx137 := 2+a;
frmMain.nx138 := -4+a;
frmMain.nx139 := 4+a;
frmMain.nx140 := -2+a;
frmMain.nx141 := 2+a;
frmMain.nx142 := 0+a;
frmMain.nx143 := 2+a;
frmMain.nx144 := -2+a;
frmMain.nx145 := -4+a;
frmMain.nx146 := 4+a;
frmMain.nx147 := 6+a;
frmMain.nx148 := -6+a;
frmMain.nx149 := -6+a;
frmMain.nx150 := 6+a;
frmMain.nx151 := 2+a;
frmMain.nx152 := -2+a;
frmMain.nx153 := 2+a;
frmMain.nx154 := -2+a;
frmMain.nx155 := 0+a;
frmMain.nx156 := 0+a;
frmMain.nx157 := 4+a;
frmMain.nx158 := -4+a;
frmMain.nx159 := -6+a;
frmMain.nx160 := 6+a;
frmMain.nx161 := 4+a;
frmMain.nx162 := -4+a;
frmMain.nx163 := -6+a;
frmMain.nx164 := 6+a;
frmMain.nx165 := 4+a;
frmMain.nx166 := -4+a;
frmMain.nx167 := -6+a;
frmMain.nx168 := 6+a;
frmMain.nx169 := 4+a;
frmMain.nx170 := -4+a;
frmMain.nx171 := -6+a;
frmMain.nx172 := 6+a;
frmMain.nx173 := 4+a;
frmMain.nx174 := -4+a;
frmMain.nx175 := -6+a;
frmMain.nx176 := 6+a;
frmMain.nx177 := 4+a;
frmMain.nx178 := -4+a;
frmMain.nx179 := -6+a;
frmMain.nx180 := 6+a;
 frmMain.nx181 := 4+a;
 frmMain.nx182 := -4+a;
 frmMain.nx183 := -6+a;
 frmMain.nx184 := 6+a;
 frmMain.nx185 := 4+a;
 frmMain.nx186 := -4+a;
 frmMain.nx187 := -6+a;
 frmMain.nx188 := 6+a;
 frmMain.nx189 := -4+a;
 frmMain.nx190 := 4+a;
 frmMain.nx191 := -6+a;
 frmMain.nx192 := 6+a;
 frmMain.nx193 := -4+a;
 frmMain.nx194 := 4+a;
 frmMain.nx195 := -6+a;
 frmMain.nx196 := 6+a;
 frmMain.nx197 := -4+a;
 frmMain.nx198 := 4+a;
 frmMain.nx199 := -6+a;
 frmMain.nx200 := 6+a;
 frmMain.nx201 := -4+a;
 frmMain.nx202 := 4+a;
 frmMain.nx203 := -6+a;
 frmMain.nx204 := 6+a;
 frmMain.nx205 := 6+a;  //корабль
 frmMain.nx206 := 6+a;  //Подлодка
 frmMain.nx215 := -6+a;

 frmMain.frmGL.Width:=800;
 a:=0;
 frmMain.nz := 0+b;
  frmMain.nz1 := 0+b;
  frmMain.nz2 := 0+b;
 frmMain.nz3 := 1+b;
 frmMain.nz7 := 0+b;
 frmMain.nz8 := 2+b;
 frmMain.nz9 := 2+b;
  frmMain.nz10 := -2+b;
 frmMain.nz11 := -2+b;
 frmMain.nz12 := -2+b;
 frmMain.nz14 := -3+b;
 frmMain.nz15 := -3+b;
 frmMain.nz16 := -4+b;
 frmMain.nz17 := -4+b;
  frmMain.nz18 := -5+b;
 frmMain.nz19 := -5+b;
 frmMain.nz20 := -6+b;
 frmMain.nz21 := -7+b;
 frmMain.nz22 := -7+b;
  frmMain.nz23 := -8+b;
 frmMain.nz24 := -8+b;
  frmMain.nz25 := -9+b;
 frmMain.nz26 := -9+b;
 frmMain.nz27 := -10+b;
  frmMain.nz28 := -10+b;
  frmMain.nz29 := -11+b;
 frmMain.nz30 := -11+b;

// 1

 frmMain.nz31 := -2+b;
 frmMain.nz32 := -2+b;
 frmMain.nz33 := -3+b;
 frmMain.nz34 := -3+b;
 frmMain.nz35 := -4+b;
 frmMain.nz36 := -4+b;
  frmMain.nz37 := -5+b;
 frmMain.nz38 := -5+b;
 frmMain.nz39 := -6+b;
 frmMain.nz40 := -6+b;
 frmMain.nz41 := -7+b;
 frmMain.nz42 := -7+b;
 frmMain.nz43 := -8+b;
 frmMain.nz44 := -8+b;
 frmMain.nz45 := -9+b;  //////////////


 //////////////////////

 frmMain.nz46 := -9+b;
 frmMain.nz47 := -9+b;
 frmMain.nz48 := -10+b;
 frmMain.nz49 := -11+b;
 frmMain.nz50 := -11+b;
 frmMain.nz51 := -2+b;
 frmMain.nz52 :=-2+b;
 frmMain.nz53 := -3+b;
 frmMain.nz54 :=  3+b;
 frmMain.nz55 := -3+b;
 frmMain.nz56 := -4+b;
 frmMain.nz57 := -5+b;
 frmMain.nz58 := -5+b;
 frmMain.nz59 := -6+b;
 frmMain.nz60 := -6+b;
 frmMain.nz61 := -7+b;
 frmMain.nz62 := -7+b;
 frmMain.nz63 := -8+b;
 frmMain.nz64 := -8+b;
 frmMain.nz65 := -9+b;
 frmMain.nz66 := -9+b;
 frmMain.nz67 := -10+b;
 frmMain.nz68 := -10+b;
 frmMain.nz69 := -11+b;
 frmMain.nz70 := -11+b;


  ///3
 ///
 ///
 frmMain.nz71 := -2+b;
 frmMain.nz72 :=-2+b;
 frmMain.nz73 := -3+b;
 frmMain.nz74 :=  -3+b;
 frmMain.nz75 := -4+b;
 frmMain.nz76 := -4+b;
 frmMain.nz77 := -5+b;
 frmMain.nz78 := -5+b;
 frmMain.nz79 := -6+b;
 frmMain.nz80 := -6+b;
 frmMain.nz81 := -7+b;
 frmMain.nz82 := -7+b;
 frmMain.nz83 := -8+b;
 frmMain.nz84 := -8+b;
 frmMain.nz85 := -9+b;
 frmMain.nz86 := -9+b;
 frmMain.nz87 := -10+b;
 frmMain.nz88 := -10+b;
 frmMain.nz89 := -11+b;
 frmMain.nz90 := -2+b;

frmMain.nz94 :=1+b;
frmMain.nz95 :=1+b;  //цифры
frmMain.nz96 :=1+b;  //цифры
frmMain.nz97 :=1+b;  //цифры
frmMain.nz98 := 1+b;  //цифры
frmMain.nz99 := 1+b;  //цифры
frmMain.nz100 := 1+b;  //цифры
frmMain.nz101 := 1+b;  //цифры
frmMain.nz102 := 1+b;  //цифры
frmMain.nz103 := 1+b;  //цифры

frmMain.nz104 := -0+b;  //буквы
frmMain.nz105 := -2+b;  //буквы
frmMain.nz106 := -4+b;  //буквы
frmMain.nz107 := -6+b;  //буквы
frmMain.nz108 := -8+b;  //буквы
frmMain.nz109 := -10+b;  //буквы
frmMain.nz110 := -12+b;  //буквы
frmMain.nz111 := -14+b;  //буквы
frmMain.nz112 := -16+b;  //буквы
frmMain.nz113 := -18+b;  //буквы

frmMain.nz114 := -4+b;  //корабль
frmMain.nz115 := -18+b;  //цифры
frmMain.nz116 :=-18+b;  //цифры
frmMain.nz117 :=-18+b;  //цифры
frmMain.nz118 :=-18+b;  //цифры
frmMain.nz119 := -18+b;  //цифры
frmMain.nz120 := -18+b;  //цифры
frmMain.nz121 := -18+b;  //цифры
frmMain.nz122 := -18+b;  //цифры
frmMain.nz123 := -18+b;  //цифры
frmMain.nz124 := -18+b;  //цифры
frmMain.nz125 := -16+b;
frmMain.nz126 := -14+b;
frmMain.nz127 := -12+b;
frmMain.nz128 := -16+b;
frmMain.nz129 := -16+b;
frmMain.nz130 := -16+b;
frmMain.nz131 := -16+b;
frmMain.nz132 := -16+b;
frmMain.nz133 := -16+b;
frmMain.nz134 := -16+b;
frmMain.nz135 := -16+b;
frmMain.nz136 := -14+b;
frmMain.nz137 := -14+b;
frmMain.nz138 := -14+b;
frmMain.nz139 := -14+b;
frmMain.nz140 := -14+b;
frmMain.nz141 := -15+b;
frmMain.nz142 := -15+b;
frmMain.nz143 := -15+b;
frmMain.nz144 := -15+b;
frmMain.nz145 := -15+b;
frmMain.nz146 := -15+b;
frmMain.nz147 := -15+b;
frmMain.nz148 := -15+b;
frmMain.nz149 := -14+b;
frmMain.nz150 := -14+b;
frmMain.nz151 := -12+b;
frmMain.nz152 := -12+b;
frmMain.nz153 := -13+b;
frmMain.nz154 := -13+b;
frmMain.nz155 := -13+b;
frmMain.nz156 := -6+b;
frmMain.nz157 := -12+b;
frmMain.nz158 := -12+b;
frmMain.nz159 := -12+b;
frmMain.nz160 := -12+b;
frmMain.nz161 := -10+b;
frmMain.nz162 := -10+b;
frmMain.nz163 := -10+b;
frmMain.nz164 := -10+b;
frmMain.nz165 := -8+b;
frmMain.nz166 := -8+b;
frmMain.nz167 := -8+b;
frmMain.nz168 := -8+b;
frmMain.nz169 := -6+b;
frmMain.nz170 := -6+b;
frmMain.nz171 := -6+b;
frmMain.nz172 := -6+b;
frmMain.nz173 := -4+b;
frmMain.nz174 := -4+b;
frmMain.nz175 := -4+b;
frmMain.nz176 := -4+b;
frmMain.nz177 := -2+b;
frmMain.nz178 := -2+b;
frmMain.nz179 := -2+b;
frmMain.nz180 := -2+b;
 frmMain.nz181 := -3+b;
 frmMain.nz182 := -3+b;
 frmMain.nz183 := -3+b;
 frmMain.nz184 := -3+b;
 frmMain.nz185 := -5+b;
 frmMain.nz186 := -5+b;
 frmMain.nz187 := -5+b;
 frmMain.nz188 := -5+b;
 frmMain.nz189 := -7+b;
 frmMain.nz190 := -7+b;
 frmMain.nz191 := -7+b;
 frmMain.nz192 := -7+b;
 frmMain.nz193 := -9+b;
 frmMain.nz194 := -9+b;
 frmMain.nz195 := -9+b;
 frmMain.nz196 := -9+b;
 frmMain.nz197 := -11+b;
 frmMain.nz198 := -11+b;
 frmMain.nz199 := -11+b;
 frmMain.nz200 := -11+b;
 frmMain.nz201 := -13+b;
 frmMain.nz202 := -13+b;
 frmMain.nz203 := -13+b;
 frmMain.nz204 := -13+b;
 frmMain.nz205 := -4+b;  //корабль
 frmMain.nz206 := -8+b;  //Подлодка
 frmMain.nz215 := -12+b;  //Подлодка
 frmMain.frmGL.Width:=800;
 b:=0;


end;











































 if (c=1) and (d=4) then
begin
StringGrid1.Cells[c,d]:='1';
a:=a+7;
b:=b+13;
frmMain.nx := 0+a;
  frmMain.nx1 := 0+a;
  frmMain.nx2 := 0+a;
 frmMain.nx3 := 0+a;
 frmMain.nx7 := -1+a;
 frmMain.nx8 := 1+a;
 frmMain.nx9 := -1+a;
  frmMain.nx10 := -2+a;
 frmMain.nx11 := -1+a;
 frmMain.nx12 := 1+a;
 frmMain.nx14 := 1+a;
 frmMain.nx15 := -1+a;
 frmMain.nx16 := -1+a;
 frmMain.nx17 := 1+a;
  frmMain.nx18 := -1+a;
 frmMain.nx19 := 1+a;
 frmMain.nx20 := -1+a;
 frmMain.nx21 := -1+a;
 frmMain.nx22 := 1+a;
  frmMain.nx23 := -1+a;
 frmMain.nx24 := 1+a;
  frmMain.nx25 := 1+a;
 frmMain.nx26 := -1+a;
 frmMain.nx27 := 1+a;
  frmMain.nx28 := -1+a;
  frmMain.nx29 := 1+a;
 frmMain.nx30 := -1+a;

// 1

 frmMain.nx31 := -2+a;
 frmMain.nx32 := 2+a;
 frmMain.nx33 := -2+a;
 frmMain.nx34 :=  2+a;
 frmMain.nx35 := -2+a;
 frmMain.nx36 := 2+a;
  frmMain.nx37 := -2+a;
 frmMain.nx38 := 2+a;
 frmMain.nx39 := -2+a;
 frmMain.nx40 := 2+a;
 frmMain.nx41 := -2+a;
 frmMain.nx42 := 2+a;
 frmMain.nx43 := -2+a;
 frmMain.nx44 := 2+a;
 frmMain.nx45 := -2+a;  //////////////


 //////////////////////

 frmMain.nx46 := -2+a;
 frmMain.nx47 := -2+a;
 frmMain.nx48 := 2+a;
 frmMain.nx49 := -2+a;
 frmMain.nx50 := 2+a;
 frmMain.nx51 := -3+a;
 frmMain.nx52 :=3+a;
 frmMain.nx53 := -3+a;
 frmMain.nx54 :=  3+a;
 frmMain.nx55 := -3+a;
 frmMain.nx56 := 3+a;
 frmMain.nx57 := -3+a;
 frmMain.nx58 := 3+a;
 frmMain.nx59 := -3+a;
 frmMain.nx60 := 3+a;
 frmMain.nx61 := -3+a;
 frmMain.nx62 := 3+a;
 frmMain.nx63 := -3+a;
 frmMain.nx64 := 3+a;
 frmMain.nx65 := -3+a;
 frmMain.nx66 := 3+a;
 frmMain.nx67 := -3+a;
 frmMain.nx68 := 3+a;
 frmMain.nx69 := -3+a;
 frmMain.nx70 := 3+a;


  ///3
 ///
 ///
 frmMain.nx71 := -4+a;
 frmMain.nx72 :=4+a;
 frmMain.nx73 := -4+a;
 frmMain.nx74 :=  4+a;
 frmMain.nx75 := -4+a;
 frmMain.nx76 := 4+a;
 frmMain.nx77 := -4+a;
 frmMain.nx78 := 4+a;
 frmMain.nx79 := -4+a;
 frmMain.nx80 := 4+a;
 frmMain.nx81 := -4+a;
 frmMain.nx82 := 4+a;
 frmMain.nx83 := -4+a;
 frmMain.nx84 := 4+a;
 frmMain.nx85 := -4+a;
 frmMain.nx86 := 4+a;
 frmMain.nx87 := -4+a;
 frmMain.nx88 := 4+a;
 frmMain.nx89 := -4+a;
 frmMain.nx90 := -2+a;

frmMain.nx94 :=0+a;
frmMain.nx95 :=-2+a;  //цифры
frmMain.nx96 :=-4+a;  //цифры
frmMain.nx97 :=-6+a;  //цифры
frmMain.nx98 := 2+a;  //цифры
frmMain.nx99 := 4+a;  //цифры
frmMain.nx100 := 6+a;  //цифры
frmMain.nx101 := 8+a;  //цифры
frmMain.nx102 := 10+a;  //цифры
frmMain.nx103 := 12+a;  //цифры

frmMain.nx104 := -8+a;  //буквы
frmMain.nx105 := -8+a;  //буквы
frmMain.nx106 := -8+a;  //буквы
frmMain.nx107 := -8+a;  //буквы
frmMain.nx108 := -8+a;  //буквы
frmMain.nx109 := -8+a;  //буквы
frmMain.nx110 := -8+a;  //буквы
frmMain.nx111 := -8+a;  //буквы
frmMain.nx112 := -8+a;  //буквы
frmMain.nx113 := -8+a;  //буквы

frmMain.nx114 := -6+a;  //корабль
frmMain.nx115 := 0+a;  //цифры
frmMain.nx116 :=-2+a;  //цифры
frmMain.nx117 :=-4+a;  //цифры
frmMain.nx118 :=-6+a;  //цифры
frmMain.nx119 := 2+a;  //цифры
frmMain.nx120 := 4+a;  //цифры
frmMain.nx121 := 6+a;  //цифры
frmMain.nx122 := 8+a;  //цифры
frmMain.nx123 := 10+a;  //цифры
frmMain.nx124 := 12+a;  //цифры
frmMain.nx125 := 0+a;
frmMain.nx126 := 0+a;
frmMain.nx127 := 0+a;
frmMain.nx128 := 2+a;
frmMain.nx129 := -2+a;
frmMain.nx130 := -4+a;
frmMain.nx131 := 4+a;
frmMain.nx132 := -6+a;
frmMain.nx133 := 6+a;
frmMain.nx134 := 8+a;
frmMain.nx135 := -8+a;
frmMain.nx136 := -2+a;
frmMain.nx137 := 2+a;
frmMain.nx138 := -4+a;
frmMain.nx139 := 4+a;
frmMain.nx140 := -2+a;
frmMain.nx141 := 2+a;
frmMain.nx142 := 0+a;
frmMain.nx143 := 2+a;
frmMain.nx144 := -2+a;
frmMain.nx145 := -4+a;
frmMain.nx146 := 4+a;
frmMain.nx147 := 6+a;
frmMain.nx148 := -6+a;
frmMain.nx149 := -6+a;
frmMain.nx150 := 6+a;
frmMain.nx151 := 2+a;
frmMain.nx152 := -2+a;
frmMain.nx153 := 2+a;
frmMain.nx154 := -2+a;
frmMain.nx155 := 0+a;
frmMain.nx156 := 0+a;
frmMain.nx157 := 4+a;
frmMain.nx158 := -4+a;
frmMain.nx159 := -6+a;
frmMain.nx160 := 6+a;
frmMain.nx161 := 4+a;
frmMain.nx162 := -4+a;
frmMain.nx163 := -6+a;
frmMain.nx164 := 6+a;
frmMain.nx165 := 4+a;
frmMain.nx166 := -4+a;
frmMain.nx167 := -6+a;
frmMain.nx168 := 6+a;
frmMain.nx169 := 4+a;
frmMain.nx170 := -4+a;
frmMain.nx171 := -6+a;
frmMain.nx172 := 6+a;
frmMain.nx173 := 4+a;
frmMain.nx174 := -4+a;
frmMain.nx175 := -6+a;
frmMain.nx176 := 6+a;
frmMain.nx177 := 4+a;
frmMain.nx178 := -4+a;
frmMain.nx179 := -6+a;
frmMain.nx180 := 6+a;
 frmMain.nx181 := 4+a;
 frmMain.nx182 := -4+a;
 frmMain.nx183 := -6+a;
 frmMain.nx184 := 6+a;
 frmMain.nx185 := 4+a;
 frmMain.nx186 := -4+a;
 frmMain.nx187 := -6+a;
 frmMain.nx188 := 6+a;
 frmMain.nx189 := -4+a;
 frmMain.nx190 := 4+a;
 frmMain.nx191 := -6+a;
 frmMain.nx192 := 6+a;
 frmMain.nx193 := -4+a;
 frmMain.nx194 := 4+a;
 frmMain.nx195 := -6+a;
 frmMain.nx196 := 6+a;
 frmMain.nx197 := -4+a;
 frmMain.nx198 := 4+a;
 frmMain.nx199 := -6+a;
 frmMain.nx200 := 6+a;
 frmMain.nx201 := -4+a;
 frmMain.nx202 := 4+a;
 frmMain.nx203 := -6+a;
 frmMain.nx204 := 6+a;
 frmMain.nx205 := 6+a;  //корабль
 frmMain.nx206 := 6+a;  //Подлодка
 frmMain.nx215 := -6+a;
 frmMain.frmGL.Width:=800;
 a:=0;
 frmMain.nz := 0+b;
  frmMain.nz1 := 0+b;
  frmMain.nz2 := 0+b;
 frmMain.nz3 := 1+b;
 frmMain.nz7 := 0+b;
 frmMain.nz8 := 2+b;
 frmMain.nz9 := 2+b;
  frmMain.nz10 := -2+b;
 frmMain.nz11 := -2+b;
 frmMain.nz12 := -2+b;
 frmMain.nz14 := -3+b;
 frmMain.nz15 := -3+b;
 frmMain.nz16 := -4+b;
 frmMain.nz17 := -4+b;
  frmMain.nz18 := -5+b;
 frmMain.nz19 := -5+b;
 frmMain.nz20 := -6+b;
 frmMain.nz21 := -7+b;
 frmMain.nz22 := -7+b;
  frmMain.nz23 := -8+b;
 frmMain.nz24 := -8+b;
  frmMain.nz25 := -9+b;
 frmMain.nz26 := -9+b;
 frmMain.nz27 := -10+b;
  frmMain.nz28 := -10+b;
  frmMain.nz29 := -11+b;
 frmMain.nz30 := -11+b;

// 1

 frmMain.nz31 := -2+b;
 frmMain.nz32 := -2+b;
 frmMain.nz33 := -3+b;
 frmMain.nz34 := -3+b;
 frmMain.nz35 := -4+b;
 frmMain.nz36 := -4+b;
  frmMain.nz37 := -5+b;
 frmMain.nz38 := -5+b;
 frmMain.nz39 := -6+b;
 frmMain.nz40 := -6+b;
 frmMain.nz41 := -7+b;
 frmMain.nz42 := -7+b;
 frmMain.nz43 := -8+b;
 frmMain.nz44 := -8+b;
 frmMain.nz45 := -9+b;  //////////////


 //////////////////////

 frmMain.nz46 := -9+b;
 frmMain.nz47 := -9+b;
 frmMain.nz48 := -10+b;
 frmMain.nz49 := -11+b;
 frmMain.nz50 := -11+b;
 frmMain.nz51 := -2+b;
 frmMain.nz52 :=-2+b;
 frmMain.nz53 := -3+b;
 frmMain.nz54 :=  3+b;
 frmMain.nz55 := -3+b;
 frmMain.nz56 := -4+b;
 frmMain.nz57 := -5+b;
 frmMain.nz58 := -5+b;
 frmMain.nz59 := -6+b;
 frmMain.nz60 := -6+b;
 frmMain.nz61 := -7+b;
 frmMain.nz62 := -7+b;
 frmMain.nz63 := -8+b;
 frmMain.nz64 := -8+b;
 frmMain.nz65 := -9+b;
 frmMain.nz66 := -9+b;
 frmMain.nz67 := -10+b;
 frmMain.nz68 := -10+b;
 frmMain.nz69 := -11+b;
 frmMain.nz70 := -11+b;


  ///3
 ///
 ///
 frmMain.nz71 := -2+b;
 frmMain.nz72 :=-2+b;
 frmMain.nz73 := -3+b;
 frmMain.nz74 :=  -3+b;
 frmMain.nz75 := -4+b;
 frmMain.nz76 := -4+b;
 frmMain.nz77 := -5+b;
 frmMain.nz78 := -5+b;
 frmMain.nz79 := -6+b;
 frmMain.nz80 := -6+b;
 frmMain.nz81 := -7+b;
 frmMain.nz82 := -7+b;
 frmMain.nz83 := -8+b;
 frmMain.nz84 := -8+b;
 frmMain.nz85 := -9+b;
 frmMain.nz86 := -9+b;
 frmMain.nz87 := -10+b;
 frmMain.nz88 := -10+b;
 frmMain.nz89 := -11+b;
 frmMain.nz90 := -2+b;

frmMain.nz94 :=1+b;
frmMain.nz95 :=1+b;  //цифры
frmMain.nz96 :=1+b;  //цифры
frmMain.nz97 :=1+b;  //цифры
frmMain.nz98 := 1+b;  //цифры
frmMain.nz99 := 1+b;  //цифры
frmMain.nz100 := 1+b;  //цифры
frmMain.nz101 := 1+b;  //цифры
frmMain.nz102 := 1+b;  //цифры
frmMain.nz103 := 1+b;  //цифры

frmMain.nz104 := -0+b;  //буквы
frmMain.nz105 := -2+b;  //буквы
frmMain.nz106 := -4+b;  //буквы
frmMain.nz107 := -6+b;  //буквы
frmMain.nz108 := -8+b;  //буквы
frmMain.nz109 := -10+b;  //буквы
frmMain.nz110 := -12+b;  //буквы
frmMain.nz111 := -14+b;  //буквы
frmMain.nz112 := -16+b;  //буквы
frmMain.nz113 := -18+b;  //буквы

frmMain.nz114 := -4+b;  //корабль
frmMain.nz115 := -18+b;  //цифры
frmMain.nz116 :=-18+b;  //цифры
frmMain.nz117 :=-18+b;  //цифры
frmMain.nz118 :=-18+b;  //цифры
frmMain.nz119 := -18+b;  //цифры
frmMain.nz120 := -18+b;  //цифры
frmMain.nz121 := -18+b;  //цифры
frmMain.nz122 := -18+b;  //цифры
frmMain.nz123 := -18+b;  //цифры
frmMain.nz124 := -18+b;  //цифры
frmMain.nz125 := -16+b;
frmMain.nz126 := -14+b;
frmMain.nz127 := -12+b;
frmMain.nz128 := -16+b;
frmMain.nz129 := -16+b;
frmMain.nz130 := -16+b;
frmMain.nz131 := -16+b;
frmMain.nz132 := -16+b;
frmMain.nz133 := -16+b;
frmMain.nz134 := -16+b;
frmMain.nz135 := -16+b;
frmMain.nz136 := -14+b;
frmMain.nz137 := -14+b;
frmMain.nz138 := -14+b;
frmMain.nz139 := -14+b;
frmMain.nz140 := -14+b;
frmMain.nz141 := -15+b;
frmMain.nz142 := -15+b;
frmMain.nz143 := -15+b;
frmMain.nz144 := -15+b;
frmMain.nz145 := -15+b;
frmMain.nz146 := -15+b;
frmMain.nz147 := -15+b;
frmMain.nz148 := -15+b;
frmMain.nz149 := -14+b;
frmMain.nz150 := -14+b;
frmMain.nz151 := -12+b;
frmMain.nz152 := -12+b;
frmMain.nz153 := -13+b;
frmMain.nz154 := -13+b;
frmMain.nz155 := -13+b;
frmMain.nz156 := -6+b;
frmMain.nz157 := -12+b;
frmMain.nz158 := -12+b;
frmMain.nz159 := -12+b;
frmMain.nz160 := -12+b;
frmMain.nz161 := -10+b;
frmMain.nz162 := -10+b;
frmMain.nz163 := -10+b;
frmMain.nz164 := -10+b;
frmMain.nz165 := -8+b;
frmMain.nz166 := -8+b;
frmMain.nz167 := -8+b;
frmMain.nz168 := -8+b;
frmMain.nz169 := -6+b;
frmMain.nz170 := -6+b;
frmMain.nz171 := -6+b;
frmMain.nz172 := -6+b;
frmMain.nz173 := -4+b;
frmMain.nz174 := -4+b;
frmMain.nz175 := -4+b;
frmMain.nz176 := -4+b;
frmMain.nz177 := -2+b;
frmMain.nz178 := -2+b;
frmMain.nz179 := -2+b;
frmMain.nz180 := -2+b;
 frmMain.nz181 := -3+b;
 frmMain.nz182 := -3+b;
 frmMain.nz183 := -3+b;
 frmMain.nz184 := -3+b;
 frmMain.nz185 := -5+b;
 frmMain.nz186 := -5+b;
 frmMain.nz187 := -5+b;
 frmMain.nz188 := -5+b;
 frmMain.nz189 := -7+b;
 frmMain.nz190 := -7+b;
 frmMain.nz191 := -7+b;
 frmMain.nz192 := -7+b;
 frmMain.nz193 := -9+b;
 frmMain.nz194 := -9+b;
 frmMain.nz195 := -9+b;
 frmMain.nz196 := -9+b;
 frmMain.nz197 := -11+b;
 frmMain.nz198 := -11+b;
 frmMain.nz199 := -11+b;
 frmMain.nz200 := -11+b;
 frmMain.nz201 := -13+b;
 frmMain.nz202 := -13+b;
 frmMain.nz203 := -13+b;
 frmMain.nz204 := -13+b;
 frmMain.nz205 := -4+b;  //корабль
 frmMain.nz206 := -8+b;  //Подлодка
 frmMain.nz215 := -12+b;
 frmMain.frmGL.Width:=800;
 b:=0;


end;


















  if (c=1) and (d=3) then
begin
StringGrid1.Cells[c,d]:='1';
a:=a+7;
b:=b+15;
frmMain.nx := 0+a;
  frmMain.nx1 := 0+a;
  frmMain.nx2 := 0+a;
 frmMain.nx3 := 0+a;
 frmMain.nx7 := -1+a;
 frmMain.nx8 := 1+a;
 frmMain.nx9 := -1+a;
  frmMain.nx10 := -2+a;
 frmMain.nx11 := -1+a;
 frmMain.nx12 := 1+a;
 frmMain.nx14 := 1+a;
 frmMain.nx15 := -1+a;
 frmMain.nx16 := -1+a;
 frmMain.nx17 := 1+a;
  frmMain.nx18 := -1+a;
 frmMain.nx19 := 1+a;
 frmMain.nx20 := -1+a;
 frmMain.nx21 := -1+a;
 frmMain.nx22 := 1+a;
  frmMain.nx23 := -1+a;
 frmMain.nx24 := 1+a;
  frmMain.nx25 := 1+a;
 frmMain.nx26 := -1+a;
 frmMain.nx27 := 1+a;
  frmMain.nx28 := -1+a;
  frmMain.nx29 := 1+a;
 frmMain.nx30 := -1+a;

// 1

 frmMain.nx31 := -2+a;
 frmMain.nx32 := 2+a;
 frmMain.nx33 := -2+a;
 frmMain.nx34 :=  2+a;
 frmMain.nx35 := -2+a;
 frmMain.nx36 := 2+a;
  frmMain.nx37 := -2+a;
 frmMain.nx38 := 2+a;
 frmMain.nx39 := -2+a;
 frmMain.nx40 := 2+a;
 frmMain.nx41 := -2+a;
 frmMain.nx42 := 2+a;
 frmMain.nx43 := -2+a;
 frmMain.nx44 := 2+a;
 frmMain.nx45 := -2+a;  //////////////


 //////////////////////

 frmMain.nx46 := -2+a;
 frmMain.nx47 := -2+a;
 frmMain.nx48 := 2+a;
 frmMain.nx49 := -2+a;
 frmMain.nx50 := 2+a;
 frmMain.nx51 := -3+a;
 frmMain.nx52 :=3+a;
 frmMain.nx53 := -3+a;
 frmMain.nx54 :=  3+a;
 frmMain.nx55 := -3+a;
 frmMain.nx56 := 3+a;
 frmMain.nx57 := -3+a;
 frmMain.nx58 := 3+a;
 frmMain.nx59 := -3+a;
 frmMain.nx60 := 3+a;
 frmMain.nx61 := -3+a;
 frmMain.nx62 := 3+a;
 frmMain.nx63 := -3+a;
 frmMain.nx64 := 3+a;
 frmMain.nx65 := -3+a;
 frmMain.nx66 := 3+a;
 frmMain.nx67 := -3+a;
 frmMain.nx68 := 3+a;
 frmMain.nx69 := -3+a;
 frmMain.nx70 := 3+a;


  ///3
 ///
 ///
 frmMain.nx71 := -4+a;
 frmMain.nx72 :=4+a;
 frmMain.nx73 := -4+a;
 frmMain.nx74 :=  4+a;
 frmMain.nx75 := -4+a;
 frmMain.nx76 := 4+a;
 frmMain.nx77 := -4+a;
 frmMain.nx78 := 4+a;
 frmMain.nx79 := -4+a;
 frmMain.nx80 := 4+a;
 frmMain.nx81 := -4+a;
 frmMain.nx82 := 4+a;
 frmMain.nx83 := -4+a;
 frmMain.nx84 := 4+a;
 frmMain.nx85 := -4+a;
 frmMain.nx86 := 4+a;
 frmMain.nx87 := -4+a;
 frmMain.nx88 := 4+a;
 frmMain.nx89 := -4+a;
 frmMain.nx90 := -2+a;

frmMain.nx94 :=0+a;
frmMain.nx95 :=-2+a;  //цифры
frmMain.nx96 :=-4+a;  //цифры
frmMain.nx97 :=-6+a;  //цифры
frmMain.nx98 := 2+a;  //цифры
frmMain.nx99 := 4+a;  //цифры
frmMain.nx100 := 6+a;  //цифры
frmMain.nx101 := 8+a;  //цифры
frmMain.nx102 := 10+a;  //цифры
frmMain.nx103 := 12+a;  //цифры

frmMain.nx104 := -8+a;  //буквы
frmMain.nx105 := -8+a;  //буквы
frmMain.nx106 := -8+a;  //буквы
frmMain.nx107 := -8+a;  //буквы
frmMain.nx108 := -8+a;  //буквы
frmMain.nx109 := -8+a;  //буквы
frmMain.nx110 := -8+a;  //буквы
frmMain.nx111 := -8+a;  //буквы
frmMain.nx112 := -8+a;  //буквы
frmMain.nx113 := -8+a;  //буквы

frmMain.nx114 := -6+a;  //корабль
frmMain.nx115 := 0+a;  //цифры
frmMain.nx116 :=-2+a;  //цифры
frmMain.nx117 :=-4+a;  //цифры
frmMain.nx118 :=-6+a;  //цифры
frmMain.nx119 := 2+a;  //цифры
frmMain.nx120 := 4+a;  //цифры
frmMain.nx121 := 6+a;  //цифры
frmMain.nx122 := 8+a;  //цифры
frmMain.nx123 := 10+a;  //цифры
frmMain.nx124 := 12+a;  //цифры
frmMain.nx125 := 0+a;
frmMain.nx126 := 0+a;
frmMain.nx127 := 0+a;
frmMain.nx128 := 2+a;
frmMain.nx129 := -2+a;
frmMain.nx130 := -4+a;
frmMain.nx131 := 4+a;
frmMain.nx132 := -6+a;
frmMain.nx133 := 6+a;
frmMain.nx134 := 8+a;
frmMain.nx135 := -8+a;
frmMain.nx136 := -2+a;
frmMain.nx137 := 2+a;
frmMain.nx138 := -4+a;
frmMain.nx139 := 4+a;
frmMain.nx140 := -2+a;
frmMain.nx141 := 2+a;
frmMain.nx142 := 0+a;
frmMain.nx143 := 2+a;
frmMain.nx144 := -2+a;
frmMain.nx145 := -4+a;
frmMain.nx146 := 4+a;
frmMain.nx147 := 6+a;
frmMain.nx148 := -6+a;
frmMain.nx149 := -6+a;
frmMain.nx150 := 6+a;
frmMain.nx151 := 2+a;
frmMain.nx152 := -2+a;
frmMain.nx153 := 2+a;
frmMain.nx154 := -2+a;
frmMain.nx155 := 0+a;
frmMain.nx156 := 0+a;
frmMain.nx157 := 4+a;
frmMain.nx158 := -4+a;
frmMain.nx159 := -6+a;
frmMain.nx160 := 6+a;
frmMain.nx161 := 4+a;
frmMain.nx162 := -4+a;
frmMain.nx163 := -6+a;
frmMain.nx164 := 6+a;
frmMain.nx165 := 4+a;
frmMain.nx166 := -4+a;
frmMain.nx167 := -6+a;
frmMain.nx168 := 6+a;
frmMain.nx169 := 4+a;
frmMain.nx170 := -4+a;
frmMain.nx171 := -6+a;
frmMain.nx172 := 6+a;
frmMain.nx173 := 4+a;
frmMain.nx174 := -4+a;
frmMain.nx175 := -6+a;
frmMain.nx176 := 6+a;
frmMain.nx177 := 4+a;
frmMain.nx178 := -4+a;
frmMain.nx179 := -6+a;
frmMain.nx180 := 6+a;
 frmMain.nx181 := 4+a;
 frmMain.nx182 := -4+a;
 frmMain.nx183 := -6+a;
 frmMain.nx184 := 6+a;
 frmMain.nx185 := 4+a;
 frmMain.nx186 := -4+a;
 frmMain.nx187 := -6+a;
 frmMain.nx188 := 6+a;
 frmMain.nx189 := -4+a;
 frmMain.nx190 := 4+a;
 frmMain.nx191 := -6+a;
 frmMain.nx192 := 6+a;
 frmMain.nx193 := -4+a;
 frmMain.nx194 := 4+a;
 frmMain.nx195 := -6+a;
 frmMain.nx196 := 6+a;
 frmMain.nx197 := -4+a;
 frmMain.nx198 := 4+a;
 frmMain.nx199 := -6+a;
 frmMain.nx200 := 6+a;
 frmMain.nx201 := -4+a;
 frmMain.nx202 := 4+a;
 frmMain.nx203 := -6+a;
 frmMain.nx204 := 6+a;
 frmMain.nx205 := 6+a;  //корабль
 frmMain.nx206 := 6+a;  //Подлодка
 frmMain.nx215 := -6+a;
 frmMain.frmGL.Width:=800;
 a:=0;
 frmMain.nz := 0+b;
  frmMain.nz1 := 0+b;
  frmMain.nz2 := 0+b;
 frmMain.nz3 := 1+b;
 frmMain.nz7 := 0+b;
 frmMain.nz8 := 2+b;
 frmMain.nz9 := 2+b;
  frmMain.nz10 := -2+b;
 frmMain.nz11 := -2+b;
 frmMain.nz12 := -2+b;
 frmMain.nz14 := -3+b;
 frmMain.nz15 := -3+b;
 frmMain.nz16 := -4+b;
 frmMain.nz17 := -4+b;
  frmMain.nz18 := -5+b;
 frmMain.nz19 := -5+b;
 frmMain.nz20 := -6+b;
 frmMain.nz21 := -7+b;
 frmMain.nz22 := -7+b;
  frmMain.nz23 := -8+b;
 frmMain.nz24 := -8+b;
  frmMain.nz25 := -9+b;
 frmMain.nz26 := -9+b;
 frmMain.nz27 := -10+b;
  frmMain.nz28 := -10+b;
  frmMain.nz29 := -11+b;
 frmMain.nz30 := -11+b;

// 1

 frmMain.nz31 := -2+b;
 frmMain.nz32 := -2+b;
 frmMain.nz33 := -3+b;
 frmMain.nz34 := -3+b;
 frmMain.nz35 := -4+b;
 frmMain.nz36 := -4+b;
  frmMain.nz37 := -5+b;
 frmMain.nz38 := -5+b;
 frmMain.nz39 := -6+b;
 frmMain.nz40 := -6+b;
 frmMain.nz41 := -7+b;
 frmMain.nz42 := -7+b;
 frmMain.nz43 := -8+b;
 frmMain.nz44 := -8+b;
 frmMain.nz45 := -9+b;  //////////////


 //////////////////////

 frmMain.nz46 := -9+b;
 frmMain.nz47 := -9+b;
 frmMain.nz48 := -10+b;
 frmMain.nz49 := -11+b;
 frmMain.nz50 := -11+b;
 frmMain.nz51 := -2+b;
 frmMain.nz52 :=-2+b;
 frmMain.nz53 := -3+b;
 frmMain.nz54 :=  3+b;
 frmMain.nz55 := -3+b;
 frmMain.nz56 := -4+b;
 frmMain.nz57 := -5+b;
 frmMain.nz58 := -5+b;
 frmMain.nz59 := -6+b;
 frmMain.nz60 := -6+b;
 frmMain.nz61 := -7+b;
 frmMain.nz62 := -7+b;
 frmMain.nz63 := -8+b;
 frmMain.nz64 := -8+b;
 frmMain.nz65 := -9+b;
 frmMain.nz66 := -9+b;
 frmMain.nz67 := -10+b;
 frmMain.nz68 := -10+b;
 frmMain.nz69 := -11+b;
 frmMain.nz70 := -11+b;


  ///3
 ///
 ///
 frmMain.nz71 := -2+b;
 frmMain.nz72 :=-2+b;
 frmMain.nz73 := -3+b;
 frmMain.nz74 :=  -3+b;
 frmMain.nz75 := -4+b;
 frmMain.nz76 := -4+b;
 frmMain.nz77 := -5+b;
 frmMain.nz78 := -5+b;
 frmMain.nz79 := -6+b;
 frmMain.nz80 := -6+b;
 frmMain.nz81 := -7+b;
 frmMain.nz82 := -7+b;
 frmMain.nz83 := -8+b;
 frmMain.nz84 := -8+b;
 frmMain.nz85 := -9+b;
 frmMain.nz86 := -9+b;
 frmMain.nz87 := -10+b;
 frmMain.nz88 := -10+b;
 frmMain.nz89 := -11+b;
 frmMain.nz90 := -2+b;

frmMain.nz94 :=1+b;
frmMain.nz95 :=1+b;  //цифры
frmMain.nz96 :=1+b;  //цифры
frmMain.nz97 :=1+b;  //цифры
frmMain.nz98 := 1+b;  //цифры
frmMain.nz99 := 1+b;  //цифры
frmMain.nz100 := 1+b;  //цифры
frmMain.nz101 := 1+b;  //цифры
frmMain.nz102 := 1+b;  //цифры
frmMain.nz103 := 1+b;  //цифры

frmMain.nz104 := -0+b;  //буквы
frmMain.nz105 := -2+b;  //буквы
frmMain.nz106 := -4+b;  //буквы
frmMain.nz107 := -6+b;  //буквы
frmMain.nz108 := -8+b;  //буквы
frmMain.nz109 := -10+b;  //буквы
frmMain.nz110 := -12+b;  //буквы
frmMain.nz111 := -14+b;  //буквы
frmMain.nz112 := -16+b;  //буквы
frmMain.nz113 := -18+b;  //буквы

frmMain.nz114 := -4+b;  //корабль
frmMain.nz115 := -18+b;  //цифры
frmMain.nz116 :=-18+b;  //цифры
frmMain.nz117 :=-18+b;  //цифры
frmMain.nz118 :=-18+b;  //цифры
frmMain.nz119 := -18+b;  //цифры
frmMain.nz120 := -18+b;  //цифры
frmMain.nz121 := -18+b;  //цифры
frmMain.nz122 := -18+b;  //цифры
frmMain.nz123 := -18+b;  //цифры
frmMain.nz124 := -18+b;  //цифры
frmMain.nz125 := -16+b;
frmMain.nz126 := -14+b;
frmMain.nz127 := -12+b;
frmMain.nz128 := -16+b;
frmMain.nz129 := -16+b;
frmMain.nz130 := -16+b;
frmMain.nz131 := -16+b;
frmMain.nz132 := -16+b;
frmMain.nz133 := -16+b;
frmMain.nz134 := -16+b;
frmMain.nz135 := -16+b;
frmMain.nz136 := -14+b;
frmMain.nz137 := -14+b;
frmMain.nz138 := -14+b;
frmMain.nz139 := -14+b;
frmMain.nz140 := -14+b;
frmMain.nz141 := -15+b;
frmMain.nz142 := -15+b;
frmMain.nz143 := -15+b;
frmMain.nz144 := -15+b;
frmMain.nz145 := -15+b;
frmMain.nz146 := -15+b;
frmMain.nz147 := -15+b;
frmMain.nz148 := -15+b;
frmMain.nz149 := -14+b;
frmMain.nz150 := -14+b;
frmMain.nz151 := -12+b;
frmMain.nz152 := -12+b;
frmMain.nz153 := -13+b;
frmMain.nz154 := -13+b;
frmMain.nz155 := -13+b;
frmMain.nz156 := -6+b;
frmMain.nz157 := -12+b;
frmMain.nz158 := -12+b;
frmMain.nz159 := -12+b;
frmMain.nz160 := -12+b;
frmMain.nz161 := -10+b;
frmMain.nz162 := -10+b;
frmMain.nz163 := -10+b;
frmMain.nz164 := -10+b;
frmMain.nz165 := -8+b;
frmMain.nz166 := -8+b;
frmMain.nz167 := -8+b;
frmMain.nz168 := -8+b;
frmMain.nz169 := -6+b;
frmMain.nz170 := -6+b;
frmMain.nz171 := -6+b;
frmMain.nz172 := -6+b;
frmMain.nz173 := -4+b;
frmMain.nz174 := -4+b;
frmMain.nz175 := -4+b;
frmMain.nz176 := -4+b;
frmMain.nz177 := -2+b;
frmMain.nz178 := -2+b;
frmMain.nz179 := -2+b;
frmMain.nz180 := -2+b;
 frmMain.nz181 := -3+b;
 frmMain.nz182 := -3+b;
 frmMain.nz183 := -3+b;
 frmMain.nz184 := -3+b;
 frmMain.nz185 := -5+b;
 frmMain.nz186 := -5+b;
 frmMain.nz187 := -5+b;
 frmMain.nz188 := -5+b;
 frmMain.nz189 := -7+b;
 frmMain.nz190 := -7+b;
 frmMain.nz191 := -7+b;
 frmMain.nz192 := -7+b;
 frmMain.nz193 := -9+b;
 frmMain.nz194 := -9+b;
 frmMain.nz195 := -9+b;
 frmMain.nz196 := -9+b;
 frmMain.nz197 := -11+b;
 frmMain.nz198 := -11+b;
 frmMain.nz199 := -11+b;
 frmMain.nz200 := -11+b;
 frmMain.nz201 := -13+b;
 frmMain.nz202 := -13+b;
 frmMain.nz203 := -13+b;
 frmMain.nz204 := -13+b;
 frmMain.nz205 := -4+b;  //корабль
 frmMain.nz206 := -8+b;  //Подлодка

 frmMain.nz215 := -12+b;
 frmMain.frmGL.Width:=800;
 b:=0;


end;


































  if (c=1) and (d=2) then
begin
StringGrid1.Cells[c,d]:='1';
a:=a+7;
b:=b+17;
frmMain.nx := 0+a;
  frmMain.nx1 := 0+a;
  frmMain.nx2 := 0+a;
 frmMain.nx3 := 0+a;
 frmMain.nx7 := -1+a;
 frmMain.nx8 := 1+a;
 frmMain.nx9 := -1+a;
  frmMain.nx10 := -2+a;
 frmMain.nx11 := -1+a;
 frmMain.nx12 := 1+a;
 frmMain.nx14 := 1+a;
 frmMain.nx15 := -1+a;
 frmMain.nx16 := -1+a;
 frmMain.nx17 := 1+a;
  frmMain.nx18 := -1+a;
 frmMain.nx19 := 1+a;
 frmMain.nx20 := -1+a;
 frmMain.nx21 := -1+a;
 frmMain.nx22 := 1+a;
  frmMain.nx23 := -1+a;
 frmMain.nx24 := 1+a;
  frmMain.nx25 := 1+a;
 frmMain.nx26 := -1+a;
 frmMain.nx27 := 1+a;
  frmMain.nx28 := -1+a;
  frmMain.nx29 := 1+a;
 frmMain.nx30 := -1+a;

// 1

 frmMain.nx31 := -2+a;
 frmMain.nx32 := 2+a;
 frmMain.nx33 := -2+a;
 frmMain.nx34 :=  2+a;
 frmMain.nx35 := -2+a;
 frmMain.nx36 := 2+a;
  frmMain.nx37 := -2+a;
 frmMain.nx38 := 2+a;
 frmMain.nx39 := -2+a;
 frmMain.nx40 := 2+a;
 frmMain.nx41 := -2+a;
 frmMain.nx42 := 2+a;
 frmMain.nx43 := -2+a;
 frmMain.nx44 := 2+a;
 frmMain.nx45 := -2+a;  //////////////


 //////////////////////

 frmMain.nx46 := -2+a;
 frmMain.nx47 := -2+a;
 frmMain.nx48 := 2+a;
 frmMain.nx49 := -2+a;
 frmMain.nx50 := 2+a;
 frmMain.nx51 := -3+a;
 frmMain.nx52 :=3+a;
 frmMain.nx53 := -3+a;
 frmMain.nx54 :=  3+a;
 frmMain.nx55 := -3+a;
 frmMain.nx56 := 3+a;
 frmMain.nx57 := -3+a;
 frmMain.nx58 := 3+a;
 frmMain.nx59 := -3+a;
 frmMain.nx60 := 3+a;
 frmMain.nx61 := -3+a;
 frmMain.nx62 := 3+a;
 frmMain.nx63 := -3+a;
 frmMain.nx64 := 3+a;
 frmMain.nx65 := -3+a;
 frmMain.nx66 := 3+a;
 frmMain.nx67 := -3+a;
 frmMain.nx68 := 3+a;
 frmMain.nx69 := -3+a;
 frmMain.nx70 := 3+a;


  ///3
 ///
 ///
 frmMain.nx71 := -4+a;
 frmMain.nx72 :=4+a;
 frmMain.nx73 := -4+a;
 frmMain.nx74 :=  4+a;
 frmMain.nx75 := -4+a;
 frmMain.nx76 := 4+a;
 frmMain.nx77 := -4+a;
 frmMain.nx78 := 4+a;
 frmMain.nx79 := -4+a;
 frmMain.nx80 := 4+a;
 frmMain.nx81 := -4+a;
 frmMain.nx82 := 4+a;
 frmMain.nx83 := -4+a;
 frmMain.nx84 := 4+a;
 frmMain.nx85 := -4+a;
 frmMain.nx86 := 4+a;
 frmMain.nx87 := -4+a;
 frmMain.nx88 := 4+a;
 frmMain.nx89 := -4+a;
 frmMain.nx90 := -2+a;

frmMain.nx94 :=0+a;
frmMain.nx95 :=-2+a;  //цифры
frmMain.nx96 :=-4+a;  //цифры
frmMain.nx97 :=-6+a;  //цифры
frmMain.nx98 := 2+a;  //цифры
frmMain.nx99 := 4+a;  //цифры
frmMain.nx100 := 6+a;  //цифры
frmMain.nx101 := 8+a;  //цифры
frmMain.nx102 := 10+a;  //цифры
frmMain.nx103 := 12+a;  //цифры

frmMain.nx104 := -8+a;  //буквы
frmMain.nx105 := -8+a;  //буквы
frmMain.nx106 := -8+a;  //буквы
frmMain.nx107 := -8+a;  //буквы
frmMain.nx108 := -8+a;  //буквы
frmMain.nx109 := -8+a;  //буквы
frmMain.nx110 := -8+a;  //буквы
frmMain.nx111 := -8+a;  //буквы
frmMain.nx112 := -8+a;  //буквы
frmMain.nx113 := -8+a;  //буквы

frmMain.nx114 := -6+a;  //корабль
frmMain.nx115 := 0+a;  //цифры
frmMain.nx116 :=-2+a;  //цифры
frmMain.nx117 :=-4+a;  //цифры
frmMain.nx118 :=-6+a;  //цифры
frmMain.nx119 := 2+a;  //цифры
frmMain.nx120 := 4+a;  //цифры
frmMain.nx121 := 6+a;  //цифры
frmMain.nx122 := 8+a;  //цифры
frmMain.nx123 := 10+a;  //цифры
frmMain.nx124 := 12+a;  //цифры
frmMain.nx125 := 0+a;
frmMain.nx126 := 0+a;
frmMain.nx127 := 0+a;
frmMain.nx128 := 2+a;
frmMain.nx129 := -2+a;
frmMain.nx130 := -4+a;
frmMain.nx131 := 4+a;
frmMain.nx132 := -6+a;
frmMain.nx133 := 6+a;
frmMain.nx134 := 8+a;
frmMain.nx135 := -8+a;
frmMain.nx136 := -2+a;
frmMain.nx137 := 2+a;
frmMain.nx138 := -4+a;
frmMain.nx139 := 4+a;
frmMain.nx140 := -2+a;
frmMain.nx141 := 2+a;
frmMain.nx142 := 0+a;
frmMain.nx143 := 2+a;
frmMain.nx144 := -2+a;
frmMain.nx145 := -4+a;
frmMain.nx146 := 4+a;
frmMain.nx147 := 6+a;
frmMain.nx148 := -6+a;
frmMain.nx149 := -6+a;
frmMain.nx150 := 6+a;
frmMain.nx151 := 2+a;
frmMain.nx152 := -2+a;
frmMain.nx153 := 2+a;
frmMain.nx154 := -2+a;
frmMain.nx155 := 0+a;
frmMain.nx156 := 0+a;
frmMain.nx157 := 4+a;
frmMain.nx158 := -4+a;
frmMain.nx159 := -6+a;
frmMain.nx160 := 6+a;
frmMain.nx161 := 4+a;
frmMain.nx162 := -4+a;
frmMain.nx163 := -6+a;
frmMain.nx164 := 6+a;
frmMain.nx165 := 4+a;
frmMain.nx166 := -4+a;
frmMain.nx167 := -6+a;
frmMain.nx168 := 6+a;
frmMain.nx169 := 4+a;
frmMain.nx170 := -4+a;
frmMain.nx171 := -6+a;
frmMain.nx172 := 6+a;
frmMain.nx173 := 4+a;
frmMain.nx174 := -4+a;
frmMain.nx175 := -6+a;
frmMain.nx176 := 6+a;
frmMain.nx177 := 4+a;
frmMain.nx178 := -4+a;
frmMain.nx179 := -6+a;
frmMain.nx180 := 6+a;
 frmMain.nx181 := 4+a;
 frmMain.nx182 := -4+a;
 frmMain.nx183 := -6+a;
 frmMain.nx184 := 6+a;
 frmMain.nx185 := 4+a;
 frmMain.nx186 := -4+a;
 frmMain.nx187 := -6+a;
 frmMain.nx188 := 6+a;
 frmMain.nx189 := -4+a;
 frmMain.nx190 := 4+a;
 frmMain.nx191 := -6+a;
 frmMain.nx192 := 6+a;
 frmMain.nx193 := -4+a;
 frmMain.nx194 := 4+a;
 frmMain.nx195 := -6+a;
 frmMain.nx196 := 6+a;
 frmMain.nx197 := -4+a;
 frmMain.nx198 := 4+a;
 frmMain.nx199 := -6+a;
 frmMain.nx200 := 6+a;
 frmMain.nx201 := -4+a;
 frmMain.nx202 := 4+a;
 frmMain.nx203 := -6+a;
 frmMain.nx204 := 6+a;
 frmMain.nx205 := 6+a;  //корабль
 frmMain.nx206 := 6+a;  //Подлодка
 frmMain.nx215 := -6+a;
 frmMain.frmGL.Width:=800;
 a:=0;
 frmMain.nz := 0+b;
  frmMain.nz1 := 0+b;
  frmMain.nz2 := 0+b;
 frmMain.nz3 := 1+b;
 frmMain.nz7 := 0+b;
 frmMain.nz8 := 2+b;
 frmMain.nz9 := 2+b;
  frmMain.nz10 := -2+b;
 frmMain.nz11 := -2+b;
 frmMain.nz12 := -2+b;
 frmMain.nz14 := -3+b;
 frmMain.nz15 := -3+b;
 frmMain.nz16 := -4+b;
 frmMain.nz17 := -4+b;
  frmMain.nz18 := -5+b;
 frmMain.nz19 := -5+b;
 frmMain.nz20 := -6+b;
 frmMain.nz21 := -7+b;
 frmMain.nz22 := -7+b;
  frmMain.nz23 := -8+b;
 frmMain.nz24 := -8+b;
  frmMain.nz25 := -9+b;
 frmMain.nz26 := -9+b;
 frmMain.nz27 := -10+b;
  frmMain.nz28 := -10+b;
  frmMain.nz29 := -11+b;
 frmMain.nz30 := -11+b;

// 1

 frmMain.nz31 := -2+b;
 frmMain.nz32 := -2+b;
 frmMain.nz33 := -3+b;
 frmMain.nz34 := -3+b;
 frmMain.nz35 := -4+b;
 frmMain.nz36 := -4+b;
  frmMain.nz37 := -5+b;
 frmMain.nz38 := -5+b;
 frmMain.nz39 := -6+b;
 frmMain.nz40 := -6+b;
 frmMain.nz41 := -7+b;
 frmMain.nz42 := -7+b;
 frmMain.nz43 := -8+b;
 frmMain.nz44 := -8+b;
 frmMain.nz45 := -9+b;  //////////////


 //////////////////////

 frmMain.nz46 := -9+b;
 frmMain.nz47 := -9+b;
 frmMain.nz48 := -10+b;
 frmMain.nz49 := -11+b;
 frmMain.nz50 := -11+b;
 frmMain.nz51 := -2+b;
 frmMain.nz52 :=-2+b;
 frmMain.nz53 := -3+b;
 frmMain.nz54 :=  3+b;
 frmMain.nz55 := -3+b;
 frmMain.nz56 := -4+b;
 frmMain.nz57 := -5+b;
 frmMain.nz58 := -5+b;
 frmMain.nz59 := -6+b;
 frmMain.nz60 := -6+b;
 frmMain.nz61 := -7+b;
 frmMain.nz62 := -7+b;
 frmMain.nz63 := -8+b;
 frmMain.nz64 := -8+b;
 frmMain.nz65 := -9+b;
 frmMain.nz66 := -9+b;
 frmMain.nz67 := -10+b;
 frmMain.nz68 := -10+b;
 frmMain.nz69 := -11+b;
 frmMain.nz70 := -11+b;


  ///3
 ///
 ///
 frmMain.nz71 := -2+b;
 frmMain.nz72 :=-2+b;
 frmMain.nz73 := -3+b;
 frmMain.nz74 :=  -3+b;
 frmMain.nz75 := -4+b;
 frmMain.nz76 := -4+b;
 frmMain.nz77 := -5+b;
 frmMain.nz78 := -5+b;
 frmMain.nz79 := -6+b;
 frmMain.nz80 := -6+b;
 frmMain.nz81 := -7+b;
 frmMain.nz82 := -7+b;
 frmMain.nz83 := -8+b;
 frmMain.nz84 := -8+b;
 frmMain.nz85 := -9+b;
 frmMain.nz86 := -9+b;
 frmMain.nz87 := -10+b;
 frmMain.nz88 := -10+b;
 frmMain.nz89 := -11+b;
 frmMain.nz90 := -2+b;

frmMain.nz94 :=1+b;
frmMain.nz95 :=1+b;  //цифры
frmMain.nz96 :=1+b;  //цифры
frmMain.nz97 :=1+b;  //цифры
frmMain.nz98 := 1+b;  //цифры
frmMain.nz99 := 1+b;  //цифры
frmMain.nz100 := 1+b;  //цифры
frmMain.nz101 := 1+b;  //цифры
frmMain.nz102 := 1+b;  //цифры
frmMain.nz103 := 1+b;  //цифры

frmMain.nz104 := -0+b;  //буквы
frmMain.nz105 := -2+b;  //буквы
frmMain.nz106 := -4+b;  //буквы
frmMain.nz107 := -6+b;  //буквы
frmMain.nz108 := -8+b;  //буквы
frmMain.nz109 := -10+b;  //буквы
frmMain.nz110 := -12+b;  //буквы
frmMain.nz111 := -14+b;  //буквы
frmMain.nz112 := -16+b;  //буквы
frmMain.nz113 := -18+b;  //буквы

frmMain.nz114 := -4+b;  //корабль
frmMain.nz115 := -18+b;  //цифры
frmMain.nz116 :=-18+b;  //цифры
frmMain.nz117 :=-18+b;  //цифры
frmMain.nz118 :=-18+b;  //цифры
frmMain.nz119 := -18+b;  //цифры
frmMain.nz120 := -18+b;  //цифры
frmMain.nz121 := -18+b;  //цифры
frmMain.nz122 := -18+b;  //цифры
frmMain.nz123 := -18+b;  //цифры
frmMain.nz124 := -18+b;  //цифры
frmMain.nz125 := -16+b;
frmMain.nz126 := -14+b;
frmMain.nz127 := -12+b;
frmMain.nz128 := -16+b;
frmMain.nz129 := -16+b;
frmMain.nz130 := -16+b;
frmMain.nz131 := -16+b;
frmMain.nz132 := -16+b;
frmMain.nz133 := -16+b;
frmMain.nz134 := -16+b;
frmMain.nz135 := -16+b;
frmMain.nz136 := -14+b;
frmMain.nz137 := -14+b;
frmMain.nz138 := -14+b;
frmMain.nz139 := -14+b;
frmMain.nz140 := -14+b;
frmMain.nz141 := -15+b;
frmMain.nz142 := -15+b;
frmMain.nz143 := -15+b;
frmMain.nz144 := -15+b;
frmMain.nz145 := -15+b;
frmMain.nz146 := -15+b;
frmMain.nz147 := -15+b;
frmMain.nz148 := -15+b;
frmMain.nz149 := -14+b;
frmMain.nz150 := -14+b;
frmMain.nz151 := -12+b;
frmMain.nz152 := -12+b;
frmMain.nz153 := -13+b;
frmMain.nz154 := -13+b;
frmMain.nz155 := -13+b;
frmMain.nz156 := -6+b;
frmMain.nz157 := -12+b;
frmMain.nz158 := -12+b;
frmMain.nz159 := -12+b;
frmMain.nz160 := -12+b;
frmMain.nz161 := -10+b;
frmMain.nz162 := -10+b;
frmMain.nz163 := -10+b;
frmMain.nz164 := -10+b;
frmMain.nz165 := -8+b;
frmMain.nz166 := -8+b;
frmMain.nz167 := -8+b;
frmMain.nz168 := -8+b;
frmMain.nz169 := -6+b;
frmMain.nz170 := -6+b;
frmMain.nz171 := -6+b;
frmMain.nz172 := -6+b;
frmMain.nz173 := -4+b;
frmMain.nz174 := -4+b;
frmMain.nz175 := -4+b;
frmMain.nz176 := -4+b;
frmMain.nz177 := -2+b;
frmMain.nz178 := -2+b;
frmMain.nz179 := -2+b;
frmMain.nz180 := -2+b;
 frmMain.nz181 := -3+b;
 frmMain.nz182 := -3+b;
 frmMain.nz183 := -3+b;
 frmMain.nz184 := -3+b;
 frmMain.nz185 := -5+b;
 frmMain.nz186 := -5+b;
 frmMain.nz187 := -5+b;
 frmMain.nz188 := -5+b;
 frmMain.nz189 := -7+b;
 frmMain.nz190 := -7+b;
 frmMain.nz191 := -7+b;
 frmMain.nz192 := -7+b;
 frmMain.nz193 := -9+b;
 frmMain.nz194 := -9+b;
 frmMain.nz195 := -9+b;
 frmMain.nz196 := -9+b;
 frmMain.nz197 := -11+b;
 frmMain.nz198 := -11+b;
 frmMain.nz199 := -11+b;
 frmMain.nz200 := -11+b;
 frmMain.nz201 := -13+b;
 frmMain.nz202 := -13+b;
 frmMain.nz203 := -13+b;
 frmMain.nz204 := -13+b;
 frmMain.nz205 := -4+b;  //корабль
 frmMain.nz206 := -8+b;  //Подлодка
 frmMain.nz215 := -12+b;  //Подлодка
 frmMain.frmGL.Width:=800;
 b:=0;


end;


















 if (c=1) and (d=1) then
begin
StringGrid1.Cells[c,d]:='1';
a:=a+7;
b:=b+19;
frmMain.nx := 0+a;
  frmMain.nx1 := 0+a;
  frmMain.nx2 := 0+a;
 frmMain.nx3 := 0+a;
 frmMain.nx7 := -1+a;
 frmMain.nx8 := 1+a;
 frmMain.nx9 := -1+a;
  frmMain.nx10 := -2+a;
 frmMain.nx11 := -1+a;
 frmMain.nx12 := 1+a;
 frmMain.nx14 := 1+a;
 frmMain.nx15 := -1+a;
 frmMain.nx16 := -1+a;
 frmMain.nx17 := 1+a;
  frmMain.nx18 := -1+a;
 frmMain.nx19 := 1+a;
 frmMain.nx20 := -1+a;
 frmMain.nx21 := -1+a;
 frmMain.nx22 := 1+a;
  frmMain.nx23 := -1+a;
 frmMain.nx24 := 1+a;
  frmMain.nx25 := 1+a;
 frmMain.nx26 := -1+a;
 frmMain.nx27 := 1+a;
  frmMain.nx28 := -1+a;
  frmMain.nx29 := 1+a;
 frmMain.nx30 := -1+a;

// 1

 frmMain.nx31 := -2+a;
 frmMain.nx32 := 2+a;
 frmMain.nx33 := -2+a;
 frmMain.nx34 :=  2+a;
 frmMain.nx35 := -2+a;
 frmMain.nx36 := 2+a;
  frmMain.nx37 := -2+a;
 frmMain.nx38 := 2+a;
 frmMain.nx39 := -2+a;
 frmMain.nx40 := 2+a;
 frmMain.nx41 := -2+a;
 frmMain.nx42 := 2+a;
 frmMain.nx43 := -2+a;
 frmMain.nx44 := 2+a;
 frmMain.nx45 := -2+a;  //////////////


 //////////////////////

 frmMain.nx46 := -2+a;
 frmMain.nx47 := -2+a;
 frmMain.nx48 := 2+a;
 frmMain.nx49 := -2+a;
 frmMain.nx50 := 2+a;
 frmMain.nx51 := -3+a;
 frmMain.nx52 :=3+a;
 frmMain.nx53 := -3+a;
 frmMain.nx54 :=  3+a;
 frmMain.nx55 := -3+a;
 frmMain.nx56 := 3+a;
 frmMain.nx57 := -3+a;
 frmMain.nx58 := 3+a;
 frmMain.nx59 := -3+a;
 frmMain.nx60 := 3+a;
 frmMain.nx61 := -3+a;
 frmMain.nx62 := 3+a;
 frmMain.nx63 := -3+a;
 frmMain.nx64 := 3+a;
 frmMain.nx65 := -3+a;
 frmMain.nx66 := 3+a;
 frmMain.nx67 := -3+a;
 frmMain.nx68 := 3+a;
 frmMain.nx69 := -3+a;
 frmMain.nx70 := 3+a;


  ///3
 ///
 ///
 frmMain.nx71 := -4+a;
 frmMain.nx72 :=4+a;
 frmMain.nx73 := -4+a;
 frmMain.nx74 :=  4+a;
 frmMain.nx75 := -4+a;
 frmMain.nx76 := 4+a;
 frmMain.nx77 := -4+a;
 frmMain.nx78 := 4+a;
 frmMain.nx79 := -4+a;
 frmMain.nx80 := 4+a;
 frmMain.nx81 := -4+a;
 frmMain.nx82 := 4+a;
 frmMain.nx83 := -4+a;
 frmMain.nx84 := 4+a;
 frmMain.nx85 := -4+a;
 frmMain.nx86 := 4+a;
 frmMain.nx87 := -4+a;
 frmMain.nx88 := 4+a;
 frmMain.nx89 := -4+a;
 frmMain.nx90 := -2+a;

frmMain.nx94 :=0+a;
frmMain.nx95 :=-2+a;  //цифры
frmMain.nx96 :=-4+a;  //цифры
frmMain.nx97 :=-6+a;  //цифры
frmMain.nx98 := 2+a;  //цифры
frmMain.nx99 := 4+a;  //цифры
frmMain.nx100 := 6+a;  //цифры
frmMain.nx101 := 8+a;  //цифры
frmMain.nx102 := 10+a;  //цифры
frmMain.nx103 := 12+a;  //цифры

frmMain.nx104 := -8+a;  //буквы
frmMain.nx105 := -8+a;  //буквы
frmMain.nx106 := -8+a;  //буквы
frmMain.nx107 := -8+a;  //буквы
frmMain.nx108 := -8+a;  //буквы
frmMain.nx109 := -8+a;  //буквы
frmMain.nx110 := -8+a;  //буквы
frmMain.nx111 := -8+a;  //буквы
frmMain.nx112 := -8+a;  //буквы
frmMain.nx113 := -8+a;  //буквы

frmMain.nx114 := -6+a;  //корабль
frmMain.nx115 := 0+a;  //цифры
frmMain.nx116 :=-2+a;  //цифры
frmMain.nx117 :=-4+a;  //цифры
frmMain.nx118 :=-6+a;  //цифры
frmMain.nx119 := 2+a;  //цифры
frmMain.nx120 := 4+a;  //цифры
frmMain.nx121 := 6+a;  //цифры
frmMain.nx122 := 8+a;  //цифры
frmMain.nx123 := 10+a;  //цифры
frmMain.nx124 := 12+a;  //цифры
frmMain.nx125 := 0+a;
frmMain.nx126 := 0+a;
frmMain.nx127 := 0+a;
frmMain.nx128 := 2+a;
frmMain.nx129 := -2+a;
frmMain.nx130 := -4+a;
frmMain.nx131 := 4+a;
frmMain.nx132 := -6+a;
frmMain.nx133 := 6+a;
frmMain.nx134 := 8+a;
frmMain.nx135 := -8+a;
frmMain.nx136 := -2+a;
frmMain.nx137 := 2+a;
frmMain.nx138 := -4+a;
frmMain.nx139 := 4+a;
frmMain.nx140 := -2+a;
frmMain.nx141 := 2+a;
frmMain.nx142 := 0+a;
frmMain.nx143 := 2+a;
frmMain.nx144 := -2+a;
frmMain.nx145 := -4+a;
frmMain.nx146 := 4+a;
frmMain.nx147 := 6+a;
frmMain.nx148 := -6+a;
frmMain.nx149 := -6+a;
frmMain.nx150 := 6+a;
frmMain.nx151 := 2+a;
frmMain.nx152 := -2+a;
frmMain.nx153 := 2+a;
frmMain.nx154 := -2+a;
frmMain.nx155 := 0+a;
frmMain.nx156 := 0+a;
frmMain.nx157 := 4+a;
frmMain.nx158 := -4+a;
frmMain.nx159 := -6+a;
frmMain.nx160 := 6+a;
frmMain.nx161 := 4+a;
frmMain.nx162 := -4+a;
frmMain.nx163 := -6+a;
frmMain.nx164 := 6+a;
frmMain.nx165 := 4+a;
frmMain.nx166 := -4+a;
frmMain.nx167 := -6+a;
frmMain.nx168 := 6+a;
frmMain.nx169 := 4+a;
frmMain.nx170 := -4+a;
frmMain.nx171 := -6+a;
frmMain.nx172 := 6+a;
frmMain.nx173 := 4+a;
frmMain.nx174 := -4+a;
frmMain.nx175 := -6+a;
frmMain.nx176 := 6+a;
frmMain.nx177 := 4+a;
frmMain.nx178 := -4+a;
frmMain.nx179 := -6+a;
frmMain.nx180 := 6+a;
 frmMain.nx181 := 4+a;
 frmMain.nx182 := -4+a;
 frmMain.nx183 := -6+a;
 frmMain.nx184 := 6+a;
 frmMain.nx185 := 4+a;
 frmMain.nx186 := -4+a;
 frmMain.nx187 := -6+a;
 frmMain.nx188 := 6+a;
 frmMain.nx189 := -4+a;
 frmMain.nx190 := 4+a;
 frmMain.nx191 := -6+a;
 frmMain.nx192 := 6+a;
 frmMain.nx193 := -4+a;
 frmMain.nx194 := 4+a;
 frmMain.nx195 := -6+a;
 frmMain.nx196 := 6+a;
 frmMain.nx197 := -4+a;
 frmMain.nx198 := 4+a;
 frmMain.nx199 := -6+a;
 frmMain.nx200 := 6+a;
 frmMain.nx201 := -4+a;
 frmMain.nx202 := 4+a;
 frmMain.nx203 := -6+a;
 frmMain.nx204 := 6+a;
 frmMain.nx205 := 6+a;  //корабль
 frmMain.nx206 := 6+a;  //Подлодка
 frmMain.nx215 := -6+a;
 frmMain.frmGL.Width:=800;
 a:=0;
 frmMain.nz := 0+b;
  frmMain.nz1 := 0+b;
  frmMain.nz2 := 0+b;
 frmMain.nz3 := 1+b;
 frmMain.nz7 := 0+b;
 frmMain.nz8 := 2+b;
 frmMain.nz9 := 2+b;
  frmMain.nz10 := -2+b;
 frmMain.nz11 := -2+b;
 frmMain.nz12 := -2+b;
 frmMain.nz14 := -3+b;
 frmMain.nz15 := -3+b;
 frmMain.nz16 := -4+b;
 frmMain.nz17 := -4+b;
  frmMain.nz18 := -5+b;
 frmMain.nz19 := -5+b;
 frmMain.nz20 := -6+b;
 frmMain.nz21 := -7+b;
 frmMain.nz22 := -7+b;
  frmMain.nz23 := -8+b;
 frmMain.nz24 := -8+b;
  frmMain.nz25 := -9+b;
 frmMain.nz26 := -9+b;
 frmMain.nz27 := -10+b;
  frmMain.nz28 := -10+b;
  frmMain.nz29 := -11+b;
 frmMain.nz30 := -11+b;

// 1

 frmMain.nz31 := -2+b;
 frmMain.nz32 := -2+b;
 frmMain.nz33 := -3+b;
 frmMain.nz34 := -3+b;
 frmMain.nz35 := -4+b;
 frmMain.nz36 := -4+b;
  frmMain.nz37 := -5+b;
 frmMain.nz38 := -5+b;
 frmMain.nz39 := -6+b;
 frmMain.nz40 := -6+b;
 frmMain.nz41 := -7+b;
 frmMain.nz42 := -7+b;
 frmMain.nz43 := -8+b;
 frmMain.nz44 := -8+b;
 frmMain.nz45 := -9+b;  //////////////


 //////////////////////

 frmMain.nz46 := -9+b;
 frmMain.nz47 := -9+b;
 frmMain.nz48 := -10+b;
 frmMain.nz49 := -11+b;
 frmMain.nz50 := -11+b;
 frmMain.nz51 := -2+b;
 frmMain.nz52 :=-2+b;
 frmMain.nz53 := -3+b;
 frmMain.nz54 :=  3+b;
 frmMain.nz55 := -3+b;
 frmMain.nz56 := -4+b;
 frmMain.nz57 := -5+b;
 frmMain.nz58 := -5+b;
 frmMain.nz59 := -6+b;
 frmMain.nz60 := -6+b;
 frmMain.nz61 := -7+b;
 frmMain.nz62 := -7+b;
 frmMain.nz63 := -8+b;
 frmMain.nz64 := -8+b;
 frmMain.nz65 := -9+b;
 frmMain.nz66 := -9+b;
 frmMain.nz67 := -10+b;
 frmMain.nz68 := -10+b;
 frmMain.nz69 := -11+b;
 frmMain.nz70 := -11+b;


  ///3
 ///
 ///
 frmMain.nz71 := -2+b;
 frmMain.nz72 :=-2+b;
 frmMain.nz73 := -3+b;
 frmMain.nz74 :=  -3+b;
 frmMain.nz75 := -4+b;
 frmMain.nz76 := -4+b;
 frmMain.nz77 := -5+b;
 frmMain.nz78 := -5+b;
 frmMain.nz79 := -6+b;
 frmMain.nz80 := -6+b;
 frmMain.nz81 := -7+b;
 frmMain.nz82 := -7+b;
 frmMain.nz83 := -8+b;
 frmMain.nz84 := -8+b;
 frmMain.nz85 := -9+b;
 frmMain.nz86 := -9+b;
 frmMain.nz87 := -10+b;
 frmMain.nz88 := -10+b;
 frmMain.nz89 := -11+b;
 frmMain.nz90 := -2+b;

frmMain.nz94 :=1+b;
frmMain.nz95 :=1+b;  //цифры
frmMain.nz96 :=1+b;  //цифры
frmMain.nz97 :=1+b;  //цифры
frmMain.nz98 := 1+b;  //цифры
frmMain.nz99 := 1+b;  //цифры
frmMain.nz100 := 1+b;  //цифры
frmMain.nz101 := 1+b;  //цифры
frmMain.nz102 := 1+b;  //цифры
frmMain.nz103 := 1+b;  //цифры

frmMain.nz104 := -0+b;  //буквы
frmMain.nz105 := -2+b;  //буквы
frmMain.nz106 := -4+b;  //буквы
frmMain.nz107 := -6+b;  //буквы
frmMain.nz108 := -8+b;  //буквы
frmMain.nz109 := -10+b;  //буквы
frmMain.nz110 := -12+b;  //буквы
frmMain.nz111 := -14+b;  //буквы
frmMain.nz112 := -16+b;  //буквы
frmMain.nz113 := -18+b;  //буквы

frmMain.nz114 := -4+b;  //корабль
frmMain.nz115 := -18+b;  //цифры
frmMain.nz116 :=-18+b;  //цифры
frmMain.nz117 :=-18+b;  //цифры
frmMain.nz118 :=-18+b;  //цифры
frmMain.nz119 := -18+b;  //цифры
frmMain.nz120 := -18+b;  //цифры
frmMain.nz121 := -18+b;  //цифры
frmMain.nz122 := -18+b;  //цифры
frmMain.nz123 := -18+b;  //цифры
frmMain.nz124 := -18+b;  //цифры
frmMain.nz125 := -16+b;
frmMain.nz126 := -14+b;
frmMain.nz127 := -12+b;
frmMain.nz128 := -16+b;
frmMain.nz129 := -16+b;
frmMain.nz130 := -16+b;
frmMain.nz131 := -16+b;
frmMain.nz132 := -16+b;
frmMain.nz133 := -16+b;
frmMain.nz134 := -16+b;
frmMain.nz135 := -16+b;
frmMain.nz136 := -14+b;
frmMain.nz137 := -14+b;
frmMain.nz138 := -14+b;
frmMain.nz139 := -14+b;
frmMain.nz140 := -14+b;
frmMain.nz141 := -15+b;
frmMain.nz142 := -15+b;
frmMain.nz143 := -15+b;
frmMain.nz144 := -15+b;
frmMain.nz145 := -15+b;
frmMain.nz146 := -15+b;
frmMain.nz147 := -15+b;
frmMain.nz148 := -15+b;
frmMain.nz149 := -14+b;
frmMain.nz150 := -14+b;
frmMain.nz151 := -12+b;
frmMain.nz152 := -12+b;
frmMain.nz153 := -13+b;
frmMain.nz154 := -13+b;
frmMain.nz155 := -13+b;
frmMain.nz156 := -6+b;
frmMain.nz157 := -12+b;
frmMain.nz158 := -12+b;
frmMain.nz159 := -12+b;
frmMain.nz160 := -12+b;
frmMain.nz161 := -10+b;
frmMain.nz162 := -10+b;
frmMain.nz163 := -10+b;
frmMain.nz164 := -10+b;
frmMain.nz165 := -8+b;
frmMain.nz166 := -8+b;
frmMain.nz167 := -8+b;
frmMain.nz168 := -8+b;
frmMain.nz169 := -6+b;
frmMain.nz170 := -6+b;
frmMain.nz171 := -6+b;
frmMain.nz172 := -6+b;
frmMain.nz173 := -4+b;
frmMain.nz174 := -4+b;
frmMain.nz175 := -4+b;
frmMain.nz176 := -4+b;
frmMain.nz177 := -2+b;
frmMain.nz178 := -2+b;
frmMain.nz179 := -2+b;
frmMain.nz180 := -2+b;
 frmMain.nz181 := -3+b;
 frmMain.nz182 := -3+b;
 frmMain.nz183 := -3+b;
 frmMain.nz184 := -3+b;
 frmMain.nz185 := -5+b;
 frmMain.nz186 := -5+b;
 frmMain.nz187 := -5+b;
 frmMain.nz188 := -5+b;
 frmMain.nz189 := -7+b;
 frmMain.nz190 := -7+b;
 frmMain.nz191 := -7+b;
 frmMain.nz192 := -7+b;
 frmMain.nz193 := -9+b;
 frmMain.nz194 := -9+b;
 frmMain.nz195 := -9+b;
 frmMain.nz196 := -9+b;
 frmMain.nz197 := -11+b;
 frmMain.nz198 := -11+b;
 frmMain.nz199 := -11+b;
 frmMain.nz200 := -11+b;
 frmMain.nz201 := -13+b;
 frmMain.nz202 := -13+b;
 frmMain.nz203 := -13+b;
 frmMain.nz204 := -13+b;
 frmMain.nz205 := -4+b;  //корабль
 frmMain.nz206 := -8+b;  //Подлодка
 frmMain.nz215 := -12+b;
 frmMain.frmGL.Width:=800;
 b:=0;


end;
















 if (c=2) and (d=1) then
begin
StringGrid1.Cells[c,d]:='1';
a:=a+5;
b:=b+19;
frmMain.nx := 0+a;
  frmMain.nx1 := 0+a;
  frmMain.nx2 := 0+a;
 frmMain.nx3 := 0+a;
 frmMain.nx7 := -1+a;
 frmMain.nx8 := 1+a;
 frmMain.nx9 := -1+a;
  frmMain.nx10 := -2+a;
 frmMain.nx11 := -1+a;
 frmMain.nx12 := 1+a;
 frmMain.nx14 := 1+a;
 frmMain.nx15 := -1+a;
 frmMain.nx16 := -1+a;
 frmMain.nx17 := 1+a;
  frmMain.nx18 := -1+a;
 frmMain.nx19 := 1+a;
 frmMain.nx20 := -1+a;
 frmMain.nx21 := -1+a;
 frmMain.nx22 := 1+a;
  frmMain.nx23 := -1+a;
 frmMain.nx24 := 1+a;
  frmMain.nx25 := 1+a;
 frmMain.nx26 := -1+a;
 frmMain.nx27 := 1+a;
  frmMain.nx28 := -1+a;
  frmMain.nx29 := 1+a;
 frmMain.nx30 := -1+a;

// 1

 frmMain.nx31 := -2+a;
 frmMain.nx32 := 2+a;
 frmMain.nx33 := -2+a;
 frmMain.nx34 :=  2+a;
 frmMain.nx35 := -2+a;
 frmMain.nx36 := 2+a;
  frmMain.nx37 := -2+a;
 frmMain.nx38 := 2+a;
 frmMain.nx39 := -2+a;
 frmMain.nx40 := 2+a;
 frmMain.nx41 := -2+a;
 frmMain.nx42 := 2+a;
 frmMain.nx43 := -2+a;
 frmMain.nx44 := 2+a;
 frmMain.nx45 := -2+a;  //////////////


 //////////////////////

 frmMain.nx46 := -2+a;
 frmMain.nx47 := -2+a;
 frmMain.nx48 := 2+a;
 frmMain.nx49 := -2+a;
 frmMain.nx50 := 2+a;
 frmMain.nx51 := -3+a;
 frmMain.nx52 :=3+a;
 frmMain.nx53 := -3+a;
 frmMain.nx54 :=  3+a;
 frmMain.nx55 := -3+a;
 frmMain.nx56 := 3+a;
 frmMain.nx57 := -3+a;
 frmMain.nx58 := 3+a;
 frmMain.nx59 := -3+a;
 frmMain.nx60 := 3+a;
 frmMain.nx61 := -3+a;
 frmMain.nx62 := 3+a;
 frmMain.nx63 := -3+a;
 frmMain.nx64 := 3+a;
 frmMain.nx65 := -3+a;
 frmMain.nx66 := 3+a;
 frmMain.nx67 := -3+a;
 frmMain.nx68 := 3+a;
 frmMain.nx69 := -3+a;
 frmMain.nx70 := 3+a;


  ///3
 ///
 ///
 frmMain.nx71 := -4+a;
 frmMain.nx72 :=4+a;
 frmMain.nx73 := -4+a;
 frmMain.nx74 :=  4+a;
 frmMain.nx75 := -4+a;
 frmMain.nx76 := 4+a;
 frmMain.nx77 := -4+a;
 frmMain.nx78 := 4+a;
 frmMain.nx79 := -4+a;
 frmMain.nx80 := 4+a;
 frmMain.nx81 := -4+a;
 frmMain.nx82 := 4+a;
 frmMain.nx83 := -4+a;
 frmMain.nx84 := 4+a;
 frmMain.nx85 := -4+a;
 frmMain.nx86 := 4+a;
 frmMain.nx87 := -4+a;
 frmMain.nx88 := 4+a;
 frmMain.nx89 := -4+a;
 frmMain.nx90 := -2+a;

frmMain.nx94 :=0+a;
frmMain.nx95 :=-2+a;  //цифры
frmMain.nx96 :=-4+a;  //цифры
frmMain.nx97 :=-6+a;  //цифры
frmMain.nx98 := 2+a;  //цифры
frmMain.nx99 := 4+a;  //цифры
frmMain.nx100 := 6+a;  //цифры
frmMain.nx101 := 8+a;  //цифры
frmMain.nx102 := 10+a;  //цифры
frmMain.nx103 := 12+a;  //цифры

frmMain.nx104 := -8+a;  //буквы
frmMain.nx105 := -8+a;  //буквы
frmMain.nx106 := -8+a;  //буквы
frmMain.nx107 := -8+a;  //буквы
frmMain.nx108 := -8+a;  //буквы
frmMain.nx109 := -8+a;  //буквы
frmMain.nx110 := -8+a;  //буквы
frmMain.nx111 := -8+a;  //буквы
frmMain.nx112 := -8+a;  //буквы
frmMain.nx113 := -8+a;  //буквы

frmMain.nx114 := -6+a;  //корабль
frmMain.nx115 := 0+a;  //цифры
frmMain.nx116 :=-2+a;  //цифры
frmMain.nx117 :=-4+a;  //цифры
frmMain.nx118 :=-6+a;  //цифры
frmMain.nx119 := 2+a;  //цифры
frmMain.nx120 := 4+a;  //цифры
frmMain.nx121 := 6+a;  //цифры
frmMain.nx122 := 8+a;  //цифры
frmMain.nx123 := 10+a;  //цифры
frmMain.nx124 := 12+a;  //цифры
frmMain.nx125 := 0+a;
frmMain.nx126 := 0+a;
frmMain.nx127 := 0+a;
frmMain.nx128 := 2+a;
frmMain.nx129 := -2+a;
frmMain.nx130 := -4+a;
frmMain.nx131 := 4+a;
frmMain.nx132 := -6+a;
frmMain.nx133 := 6+a;
frmMain.nx134 := 8+a;
frmMain.nx135 := -8+a;
frmMain.nx136 := -2+a;
frmMain.nx137 := 2+a;
frmMain.nx138 := -4+a;
frmMain.nx139 := 4+a;
frmMain.nx140 := -2+a;
frmMain.nx141 := 2+a;
frmMain.nx142 := 0+a;
frmMain.nx143 := 2+a;
frmMain.nx144 := -2+a;
frmMain.nx145 := -4+a;
frmMain.nx146 := 4+a;
frmMain.nx147 := 6+a;
frmMain.nx148 := -6+a;
frmMain.nx149 := -6+a;
frmMain.nx150 := 6+a;
frmMain.nx151 := 2+a;
frmMain.nx152 := -2+a;
frmMain.nx153 := 2+a;
frmMain.nx154 := -2+a;
frmMain.nx155 := 0+a;
frmMain.nx156 := 0+a;
frmMain.nx157 := 4+a;
frmMain.nx158 := -4+a;
frmMain.nx159 := -6+a;
frmMain.nx160 := 6+a;
frmMain.nx161 := 4+a;
frmMain.nx162 := -4+a;
frmMain.nx163 := -6+a;
frmMain.nx164 := 6+a;
frmMain.nx165 := 4+a;
frmMain.nx166 := -4+a;
frmMain.nx167 := -6+a;
frmMain.nx168 := 6+a;
frmMain.nx169 := 4+a;
frmMain.nx170 := -4+a;
frmMain.nx171 := -6+a;
frmMain.nx172 := 6+a;
frmMain.nx173 := 4+a;
frmMain.nx174 := -4+a;
frmMain.nx175 := -6+a;
frmMain.nx176 := 6+a;
frmMain.nx177 := 4+a;
frmMain.nx178 := -4+a;
frmMain.nx179 := -6+a;
frmMain.nx180 := 6+a;
 frmMain.nx181 := 4+a;
 frmMain.nx182 := -4+a;
 frmMain.nx183 := -6+a;
 frmMain.nx184 := 6+a;
 frmMain.nx185 := 4+a;
 frmMain.nx186 := -4+a;
 frmMain.nx187 := -6+a;
 frmMain.nx188 := 6+a;
 frmMain.nx189 := -4+a;
 frmMain.nx190 := 4+a;
 frmMain.nx191 := -6+a;
 frmMain.nx192 := 6+a;
 frmMain.nx193 := -4+a;
 frmMain.nx194 := 4+a;
 frmMain.nx195 := -6+a;
 frmMain.nx196 := 6+a;
 frmMain.nx197 := -4+a;
 frmMain.nx198 := 4+a;
 frmMain.nx199 := -6+a;
 frmMain.nx200 := 6+a;
 frmMain.nx201 := -4+a;
 frmMain.nx202 := 4+a;
 frmMain.nx203 := -6+a;
 frmMain.nx204 := 6+a;
 frmMain.nx205 := 6+a;  //корабль
 frmMain.nx206 := 6+a;  //Подлодка
 frmMain.frmGL.Width:=800;
 a:=0;
 frmMain.nz := 0+b;
  frmMain.nz1 := 0+b;
  frmMain.nz2 := 0+b;
 frmMain.nz3 := 1+b;
 frmMain.nz7 := 0+b;
 frmMain.nz8 := 2+b;
 frmMain.nz9 := 2+b;
  frmMain.nz10 := -2+b;
 frmMain.nz11 := -2+b;
 frmMain.nz12 := -2+b;
 frmMain.nz14 := -3+b;
 frmMain.nz15 := -3+b;
 frmMain.nz16 := -4+b;
 frmMain.nz17 := -4+b;
  frmMain.nz18 := -5+b;
 frmMain.nz19 := -5+b;
 frmMain.nz20 := -6+b;
 frmMain.nz21 := -7+b;
 frmMain.nz22 := -7+b;
  frmMain.nz23 := -8+b;
 frmMain.nz24 := -8+b;
  frmMain.nz25 := -9+b;
 frmMain.nz26 := -9+b;
 frmMain.nz27 := -10+b;
  frmMain.nz28 := -10+b;
  frmMain.nz29 := -11+b;
 frmMain.nz30 := -11+b;

// 1

 frmMain.nz31 := -2+b;
 frmMain.nz32 := -2+b;
 frmMain.nz33 := -3+b;
 frmMain.nz34 := -3+b;
 frmMain.nz35 := -4+b;
 frmMain.nz36 := -4+b;
  frmMain.nz37 := -5+b;
 frmMain.nz38 := -5+b;
 frmMain.nz39 := -6+b;
 frmMain.nz40 := -6+b;
 frmMain.nz41 := -7+b;
 frmMain.nz42 := -7+b;
 frmMain.nz43 := -8+b;
 frmMain.nz44 := -8+b;
 frmMain.nz45 := -9+b;  //////////////


 //////////////////////

 frmMain.nz46 := -9+b;
 frmMain.nz47 := -9+b;
 frmMain.nz48 := -10+b;
 frmMain.nz49 := -11+b;
 frmMain.nz50 := -11+b;
 frmMain.nz51 := -2+b;
 frmMain.nz52 :=-2+b;
 frmMain.nz53 := -3+b;
 frmMain.nz54 :=  3+b;
 frmMain.nz55 := -3+b;
 frmMain.nz56 := -4+b;
 frmMain.nz57 := -5+b;
 frmMain.nz58 := -5+b;
 frmMain.nz59 := -6+b;
 frmMain.nz60 := -6+b;
 frmMain.nz61 := -7+b;
 frmMain.nz62 := -7+b;
 frmMain.nz63 := -8+b;
 frmMain.nz64 := -8+b;
 frmMain.nz65 := -9+b;
 frmMain.nz66 := -9+b;
 frmMain.nz67 := -10+b;
 frmMain.nz68 := -10+b;
 frmMain.nz69 := -11+b;
 frmMain.nz70 := -11+b;


  ///3
 ///
 ///
 frmMain.nz71 := -2+b;
 frmMain.nz72 :=-2+b;
 frmMain.nz73 := -3+b;
 frmMain.nz74 :=  -3+b;
 frmMain.nz75 := -4+b;
 frmMain.nz76 := -4+b;
 frmMain.nz77 := -5+b;
 frmMain.nz78 := -5+b;
 frmMain.nz79 := -6+b;
 frmMain.nz80 := -6+b;
 frmMain.nz81 := -7+b;
 frmMain.nz82 := -7+b;
 frmMain.nz83 := -8+b;
 frmMain.nz84 := -8+b;
 frmMain.nz85 := -9+b;
 frmMain.nz86 := -9+b;
 frmMain.nz87 := -10+b;
 frmMain.nz88 := -10+b;
 frmMain.nz89 := -11+b;
 frmMain.nz90 := -2+b;

frmMain.nz94 :=1+b;
frmMain.nz95 :=1+b;  //цифры
frmMain.nz96 :=1+b;  //цифры
frmMain.nz97 :=1+b;  //цифры
frmMain.nz98 := 1+b;  //цифры
frmMain.nz99 := 1+b;  //цифры
frmMain.nz100 := 1+b;  //цифры
frmMain.nz101 := 1+b;  //цифры
frmMain.nz102 := 1+b;  //цифры
frmMain.nz103 := 1+b;  //цифры

frmMain.nz104 := -0+b;  //буквы
frmMain.nz105 := -2+b;  //буквы
frmMain.nz106 := -4+b;  //буквы
frmMain.nz107 := -6+b;  //буквы
frmMain.nz108 := -8+b;  //буквы
frmMain.nz109 := -10+b;  //буквы
frmMain.nz110 := -12+b;  //буквы
frmMain.nz111 := -14+b;  //буквы
frmMain.nz112 := -16+b;  //буквы
frmMain.nz113 := -18+b;  //буквы

frmMain.nz114 := -4+b;  //корабль
frmMain.nz115 := -18+b;  //цифры
frmMain.nz116 :=-18+b;  //цифры
frmMain.nz117 :=-18+b;  //цифры
frmMain.nz118 :=-18+b;  //цифры
frmMain.nz119 := -18+b;  //цифры
frmMain.nz120 := -18+b;  //цифры
frmMain.nz121 := -18+b;  //цифры
frmMain.nz122 := -18+b;  //цифры
frmMain.nz123 := -18+b;  //цифры
frmMain.nz124 := -18+b;  //цифры
frmMain.nz125 := -16+b;
frmMain.nz126 := -14+b;
frmMain.nz127 := -12+b;
frmMain.nz128 := -16+b;
frmMain.nz129 := -16+b;
frmMain.nz130 := -16+b;
frmMain.nz131 := -16+b;
frmMain.nz132 := -16+b;
frmMain.nz133 := -16+b;
frmMain.nz134 := -16+b;
frmMain.nz135 := -16+b;
frmMain.nz136 := -14+b;
frmMain.nz137 := -14+b;
frmMain.nz138 := -14+b;
frmMain.nz139 := -14+b;
frmMain.nz140 := -14+b;
frmMain.nz141 := -15+b;
frmMain.nz142 := -15+b;
frmMain.nz143 := -15+b;
frmMain.nz144 := -15+b;
frmMain.nz145 := -15+b;
frmMain.nz146 := -15+b;
frmMain.nz147 := -15+b;
frmMain.nz148 := -15+b;
frmMain.nz149 := -14+b;
frmMain.nz150 := -14+b;
frmMain.nz151 := -12+b;
frmMain.nz152 := -12+b;
frmMain.nz153 := -13+b;
frmMain.nz154 := -13+b;
frmMain.nz155 := -13+b;
frmMain.nz156 := -6+b;
frmMain.nz157 := -12+b;
frmMain.nz158 := -12+b;
frmMain.nz159 := -12+b;
frmMain.nz160 := -12+b;
frmMain.nz161 := -10+b;
frmMain.nz162 := -10+b;
frmMain.nz163 := -10+b;
frmMain.nz164 := -10+b;
frmMain.nz165 := -8+b;
frmMain.nz166 := -8+b;
frmMain.nz167 := -8+b;
frmMain.nz168 := -8+b;
frmMain.nz169 := -6+b;
frmMain.nz170 := -6+b;
frmMain.nz171 := -6+b;
frmMain.nz172 := -6+b;
frmMain.nz173 := -4+b;
frmMain.nz174 := -4+b;
frmMain.nz175 := -4+b;
frmMain.nz176 := -4+b;
frmMain.nz177 := -2+b;
frmMain.nz178 := -2+b;
frmMain.nz179 := -2+b;
frmMain.nz180 := -2+b;
 frmMain.nz181 := -3+b;
 frmMain.nz182 := -3+b;
 frmMain.nz183 := -3+b;
 frmMain.nz184 := -3+b;
 frmMain.nz185 := -5+b;
 frmMain.nz186 := -5+b;
 frmMain.nz187 := -5+b;
 frmMain.nz188 := -5+b;
 frmMain.nz189 := -7+b;
 frmMain.nz190 := -7+b;
 frmMain.nz191 := -7+b;
 frmMain.nz192 := -7+b;
 frmMain.nz193 := -9+b;
 frmMain.nz194 := -9+b;
 frmMain.nz195 := -9+b;
 frmMain.nz196 := -9+b;
 frmMain.nz197 := -11+b;
 frmMain.nz198 := -11+b;
 frmMain.nz199 := -11+b;
 frmMain.nz200 := -11+b;
 frmMain.nz201 := -13+b;
 frmMain.nz202 := -13+b;
 frmMain.nz203 := -13+b;
 frmMain.nz204 := -13+b;
 frmMain.nz205 := -4+b;  //корабль
 frmMain.nz206 := -8+b;  //Подлодка
 frmMain.frmGL.Width:=800;
 b:=0;


end;







  if (c=2) and (d=2) then
begin
StringGrid1.Cells[c,d]:='1';
a:=a+5;
b:=b+17;
frmMain.nx := 0+a;
  frmMain.nx1 := 0+a;
  frmMain.nx2 := 0+a;
 frmMain.nx3 := 0+a;
 frmMain.nx7 := -1+a;
 frmMain.nx8 := 1+a;
 frmMain.nx9 := -1+a;
  frmMain.nx10 := -2+a;
 frmMain.nx11 := -1+a;
 frmMain.nx12 := 1+a;
 frmMain.nx14 := 1+a;
 frmMain.nx15 := -1+a;
 frmMain.nx16 := -1+a;
 frmMain.nx17 := 1+a;
  frmMain.nx18 := -1+a;
 frmMain.nx19 := 1+a;
 frmMain.nx20 := -1+a;
 frmMain.nx21 := -1+a;
 frmMain.nx22 := 1+a;
  frmMain.nx23 := -1+a;
 frmMain.nx24 := 1+a;
  frmMain.nx25 := 1+a;
 frmMain.nx26 := -1+a;
 frmMain.nx27 := 1+a;
  frmMain.nx28 := -1+a;
  frmMain.nx29 := 1+a;
 frmMain.nx30 := -1+a;

// 1

 frmMain.nx31 := -2+a;
 frmMain.nx32 := 2+a;
 frmMain.nx33 := -2+a;
 frmMain.nx34 :=  2+a;
 frmMain.nx35 := -2+a;
 frmMain.nx36 := 2+a;
  frmMain.nx37 := -2+a;
 frmMain.nx38 := 2+a;
 frmMain.nx39 := -2+a;
 frmMain.nx40 := 2+a;
 frmMain.nx41 := -2+a;
 frmMain.nx42 := 2+a;
 frmMain.nx43 := -2+a;
 frmMain.nx44 := 2+a;
 frmMain.nx45 := -2+a;  //////////////


 //////////////////////

 frmMain.nx46 := -2+a;
 frmMain.nx47 := -2+a;
 frmMain.nx48 := 2+a;
 frmMain.nx49 := -2+a;
 frmMain.nx50 := 2+a;
 frmMain.nx51 := -3+a;
 frmMain.nx52 :=3+a;
 frmMain.nx53 := -3+a;
 frmMain.nx54 :=  3+a;
 frmMain.nx55 := -3+a;
 frmMain.nx56 := 3+a;
 frmMain.nx57 := -3+a;
 frmMain.nx58 := 3+a;
 frmMain.nx59 := -3+a;
 frmMain.nx60 := 3+a;
 frmMain.nx61 := -3+a;
 frmMain.nx62 := 3+a;
 frmMain.nx63 := -3+a;
 frmMain.nx64 := 3+a;
 frmMain.nx65 := -3+a;
 frmMain.nx66 := 3+a;
 frmMain.nx67 := -3+a;
 frmMain.nx68 := 3+a;
 frmMain.nx69 := -3+a;
 frmMain.nx70 := 3+a;


  ///3
 ///
 ///
 frmMain.nx71 := -4+a;
 frmMain.nx72 :=4+a;
 frmMain.nx73 := -4+a;
 frmMain.nx74 :=  4+a;
 frmMain.nx75 := -4+a;
 frmMain.nx76 := 4+a;
 frmMain.nx77 := -4+a;
 frmMain.nx78 := 4+a;
 frmMain.nx79 := -4+a;
 frmMain.nx80 := 4+a;
 frmMain.nx81 := -4+a;
 frmMain.nx82 := 4+a;
 frmMain.nx83 := -4+a;
 frmMain.nx84 := 4+a;
 frmMain.nx85 := -4+a;
 frmMain.nx86 := 4+a;
 frmMain.nx87 := -4+a;
 frmMain.nx88 := 4+a;
 frmMain.nx89 := -4+a;
 frmMain.nx90 := -2+a;

frmMain.nx94 :=0+a;
frmMain.nx95 :=-2+a;  //цифры
frmMain.nx96 :=-4+a;  //цифры
frmMain.nx97 :=-6+a;  //цифры
frmMain.nx98 := 2+a;  //цифры
frmMain.nx99 := 4+a;  //цифры
frmMain.nx100 := 6+a;  //цифры
frmMain.nx101 := 8+a;  //цифры
frmMain.nx102 := 10+a;  //цифры
frmMain.nx103 := 12+a;  //цифры

frmMain.nx104 := -8+a;  //буквы
frmMain.nx105 := -8+a;  //буквы
frmMain.nx106 := -8+a;  //буквы
frmMain.nx107 := -8+a;  //буквы
frmMain.nx108 := -8+a;  //буквы
frmMain.nx109 := -8+a;  //буквы
frmMain.nx110 := -8+a;  //буквы
frmMain.nx111 := -8+a;  //буквы
frmMain.nx112 := -8+a;  //буквы
frmMain.nx113 := -8+a;  //буквы

frmMain.nx114 := -6+a;  //корабль
frmMain.nx115 := 0+a;  //цифры
frmMain.nx116 :=-2+a;  //цифры
frmMain.nx117 :=-4+a;  //цифры
frmMain.nx118 :=-6+a;  //цифры
frmMain.nx119 := 2+a;  //цифры
frmMain.nx120 := 4+a;  //цифры
frmMain.nx121 := 6+a;  //цифры
frmMain.nx122 := 8+a;  //цифры
frmMain.nx123 := 10+a;  //цифры
frmMain.nx124 := 12+a;  //цифры
frmMain.nx125 := 0+a;
frmMain.nx126 := 0+a;
frmMain.nx127 := 0+a;
frmMain.nx128 := 2+a;
frmMain.nx129 := -2+a;
frmMain.nx130 := -4+a;
frmMain.nx131 := 4+a;
frmMain.nx132 := -6+a;
frmMain.nx133 := 6+a;
frmMain.nx134 := 8+a;
frmMain.nx135 := -8+a;
frmMain.nx136 := -2+a;
frmMain.nx137 := 2+a;
frmMain.nx138 := -4+a;
frmMain.nx139 := 4+a;
frmMain.nx140 := -2+a;
frmMain.nx141 := 2+a;
frmMain.nx142 := 0+a;
frmMain.nx143 := 2+a;
frmMain.nx144 := -2+a;
frmMain.nx145 := -4+a;
frmMain.nx146 := 4+a;
frmMain.nx147 := 6+a;
frmMain.nx148 := -6+a;
frmMain.nx149 := -6+a;
frmMain.nx150 := 6+a;
frmMain.nx151 := 2+a;
frmMain.nx152 := -2+a;
frmMain.nx153 := 2+a;
frmMain.nx154 := -2+a;
frmMain.nx155 := 0+a;
frmMain.nx156 := 0+a;
frmMain.nx157 := 4+a;
frmMain.nx158 := -4+a;
frmMain.nx159 := -6+a;
frmMain.nx160 := 6+a;
frmMain.nx161 := 4+a;
frmMain.nx162 := -4+a;
frmMain.nx163 := -6+a;
frmMain.nx164 := 6+a;
frmMain.nx165 := 4+a;
frmMain.nx166 := -4+a;
frmMain.nx167 := -6+a;
frmMain.nx168 := 6+a;
frmMain.nx169 := 4+a;
frmMain.nx170 := -4+a;
frmMain.nx171 := -6+a;
frmMain.nx172 := 6+a;
frmMain.nx173 := 4+a;
frmMain.nx174 := -4+a;
frmMain.nx175 := -6+a;
frmMain.nx176 := 6+a;
frmMain.nx177 := 4+a;
frmMain.nx178 := -4+a;
frmMain.nx179 := -6+a;
frmMain.nx180 := 6+a;
 frmMain.nx181 := 4+a;
 frmMain.nx182 := -4+a;
 frmMain.nx183 := -6+a;
 frmMain.nx184 := 6+a;
 frmMain.nx185 := 4+a;
 frmMain.nx186 := -4+a;
 frmMain.nx187 := -6+a;
 frmMain.nx188 := 6+a;
 frmMain.nx189 := -4+a;
 frmMain.nx190 := 4+a;
 frmMain.nx191 := -6+a;
 frmMain.nx192 := 6+a;
 frmMain.nx193 := -4+a;
 frmMain.nx194 := 4+a;
 frmMain.nx195 := -6+a;
 frmMain.nx196 := 6+a;
 frmMain.nx197 := -4+a;
 frmMain.nx198 := 4+a;
 frmMain.nx199 := -6+a;
 frmMain.nx200 := 6+a;
 frmMain.nx201 := -4+a;
 frmMain.nx202 := 4+a;
 frmMain.nx203 := -6+a;
 frmMain.nx204 := 6+a;
 frmMain.nx205 := 6+a;  //корабль
 frmMain.nx206 := 6+a;  //Подлодка
 frmMain.frmGL.Width:=800;
 a:=0;
 frmMain.nz := 0+b;
  frmMain.nz1 := 0+b;
  frmMain.nz2 := 0+b;
 frmMain.nz3 := 1+b;
 frmMain.nz7 := 0+b;
 frmMain.nz8 := 2+b;
 frmMain.nz9 := 2+b;
  frmMain.nz10 := -2+b;
 frmMain.nz11 := -2+b;
 frmMain.nz12 := -2+b;
 frmMain.nz14 := -3+b;
 frmMain.nz15 := -3+b;
 frmMain.nz16 := -4+b;
 frmMain.nz17 := -4+b;
  frmMain.nz18 := -5+b;
 frmMain.nz19 := -5+b;
 frmMain.nz20 := -6+b;
 frmMain.nz21 := -7+b;
 frmMain.nz22 := -7+b;
  frmMain.nz23 := -8+b;
 frmMain.nz24 := -8+b;
  frmMain.nz25 := -9+b;
 frmMain.nz26 := -9+b;
 frmMain.nz27 := -10+b;
  frmMain.nz28 := -10+b;
  frmMain.nz29 := -11+b;
 frmMain.nz30 := -11+b;

// 1

 frmMain.nz31 := -2+b;
 frmMain.nz32 := -2+b;
 frmMain.nz33 := -3+b;
 frmMain.nz34 := -3+b;
 frmMain.nz35 := -4+b;
 frmMain.nz36 := -4+b;
  frmMain.nz37 := -5+b;
 frmMain.nz38 := -5+b;
 frmMain.nz39 := -6+b;
 frmMain.nz40 := -6+b;
 frmMain.nz41 := -7+b;
 frmMain.nz42 := -7+b;
 frmMain.nz43 := -8+b;
 frmMain.nz44 := -8+b;
 frmMain.nz45 := -9+b;  //////////////


 //////////////////////

 frmMain.nz46 := -9+b;
 frmMain.nz47 := -9+b;
 frmMain.nz48 := -10+b;
 frmMain.nz49 := -11+b;
 frmMain.nz50 := -11+b;
 frmMain.nz51 := -2+b;
 frmMain.nz52 :=-2+b;
 frmMain.nz53 := -3+b;
 frmMain.nz54 :=  3+b;
 frmMain.nz55 := -3+b;
 frmMain.nz56 := -4+b;
 frmMain.nz57 := -5+b;
 frmMain.nz58 := -5+b;
 frmMain.nz59 := -6+b;
 frmMain.nz60 := -6+b;
 frmMain.nz61 := -7+b;
 frmMain.nz62 := -7+b;
 frmMain.nz63 := -8+b;
 frmMain.nz64 := -8+b;
 frmMain.nz65 := -9+b;
 frmMain.nz66 := -9+b;
 frmMain.nz67 := -10+b;
 frmMain.nz68 := -10+b;
 frmMain.nz69 := -11+b;
 frmMain.nz70 := -11+b;


  ///3
 ///
 ///
 frmMain.nz71 := -2+b;
 frmMain.nz72 :=-2+b;
 frmMain.nz73 := -3+b;
 frmMain.nz74 :=  -3+b;
 frmMain.nz75 := -4+b;
 frmMain.nz76 := -4+b;
 frmMain.nz77 := -5+b;
 frmMain.nz78 := -5+b;
 frmMain.nz79 := -6+b;
 frmMain.nz80 := -6+b;
 frmMain.nz81 := -7+b;
 frmMain.nz82 := -7+b;
 frmMain.nz83 := -8+b;
 frmMain.nz84 := -8+b;
 frmMain.nz85 := -9+b;
 frmMain.nz86 := -9+b;
 frmMain.nz87 := -10+b;
 frmMain.nz88 := -10+b;
 frmMain.nz89 := -11+b;
 frmMain.nz90 := -2+b;

frmMain.nz94 :=1+b;
frmMain.nz95 :=1+b;  //цифры
frmMain.nz96 :=1+b;  //цифры
frmMain.nz97 :=1+b;  //цифры
frmMain.nz98 := 1+b;  //цифры
frmMain.nz99 := 1+b;  //цифры
frmMain.nz100 := 1+b;  //цифры
frmMain.nz101 := 1+b;  //цифры
frmMain.nz102 := 1+b;  //цифры
frmMain.nz103 := 1+b;  //цифры

frmMain.nz104 := -0+b;  //буквы
frmMain.nz105 := -2+b;  //буквы
frmMain.nz106 := -4+b;  //буквы
frmMain.nz107 := -6+b;  //буквы
frmMain.nz108 := -8+b;  //буквы
frmMain.nz109 := -10+b;  //буквы
frmMain.nz110 := -12+b;  //буквы
frmMain.nz111 := -14+b;  //буквы
frmMain.nz112 := -16+b;  //буквы
frmMain.nz113 := -18+b;  //буквы

frmMain.nz114 := -4+b;  //корабль
frmMain.nz115 := -18+b;  //цифры
frmMain.nz116 :=-18+b;  //цифры
frmMain.nz117 :=-18+b;  //цифры
frmMain.nz118 :=-18+b;  //цифры
frmMain.nz119 := -18+b;  //цифры
frmMain.nz120 := -18+b;  //цифры
frmMain.nz121 := -18+b;  //цифры
frmMain.nz122 := -18+b;  //цифры
frmMain.nz123 := -18+b;  //цифры
frmMain.nz124 := -18+b;  //цифры
frmMain.nz125 := -16+b;
frmMain.nz126 := -14+b;
frmMain.nz127 := -12+b;
frmMain.nz128 := -16+b;
frmMain.nz129 := -16+b;
frmMain.nz130 := -16+b;
frmMain.nz131 := -16+b;
frmMain.nz132 := -16+b;
frmMain.nz133 := -16+b;
frmMain.nz134 := -16+b;
frmMain.nz135 := -16+b;
frmMain.nz136 := -14+b;
frmMain.nz137 := -14+b;
frmMain.nz138 := -14+b;
frmMain.nz139 := -14+b;
frmMain.nz140 := -14+b;
frmMain.nz141 := -15+b;
frmMain.nz142 := -15+b;
frmMain.nz143 := -15+b;
frmMain.nz144 := -15+b;
frmMain.nz145 := -15+b;
frmMain.nz146 := -15+b;
frmMain.nz147 := -15+b;
frmMain.nz148 := -15+b;
frmMain.nz149 := -14+b;
frmMain.nz150 := -14+b;
frmMain.nz151 := -12+b;
frmMain.nz152 := -12+b;
frmMain.nz153 := -13+b;
frmMain.nz154 := -13+b;
frmMain.nz155 := -13+b;
frmMain.nz156 := -6+b;
frmMain.nz157 := -12+b;
frmMain.nz158 := -12+b;
frmMain.nz159 := -12+b;
frmMain.nz160 := -12+b;
frmMain.nz161 := -10+b;
frmMain.nz162 := -10+b;
frmMain.nz163 := -10+b;
frmMain.nz164 := -10+b;
frmMain.nz165 := -8+b;
frmMain.nz166 := -8+b;
frmMain.nz167 := -8+b;
frmMain.nz168 := -8+b;
frmMain.nz169 := -6+b;
frmMain.nz170 := -6+b;
frmMain.nz171 := -6+b;
frmMain.nz172 := -6+b;
frmMain.nz173 := -4+b;
frmMain.nz174 := -4+b;
frmMain.nz175 := -4+b;
frmMain.nz176 := -4+b;
frmMain.nz177 := -2+b;
frmMain.nz178 := -2+b;
frmMain.nz179 := -2+b;
frmMain.nz180 := -2+b;
 frmMain.nz181 := -3+b;
 frmMain.nz182 := -3+b;
 frmMain.nz183 := -3+b;
 frmMain.nz184 := -3+b;
 frmMain.nz185 := -5+b;
 frmMain.nz186 := -5+b;
 frmMain.nz187 := -5+b;
 frmMain.nz188 := -5+b;
 frmMain.nz189 := -7+b;
 frmMain.nz190 := -7+b;
 frmMain.nz191 := -7+b;
 frmMain.nz192 := -7+b;
 frmMain.nz193 := -9+b;
 frmMain.nz194 := -9+b;
 frmMain.nz195 := -9+b;
 frmMain.nz196 := -9+b;
 frmMain.nz197 := -11+b;
 frmMain.nz198 := -11+b;
 frmMain.nz199 := -11+b;
 frmMain.nz200 := -11+b;
 frmMain.nz201 := -13+b;
 frmMain.nz202 := -13+b;
 frmMain.nz203 := -13+b;
 frmMain.nz204 := -13+b;
 frmMain.nz205 := -4+b;  //корабль
 frmMain.nz206 := -8+b;  //Подлодка
 frmMain.frmGL.Width:=800;
 b:=0;


end;


 if (c=2) and (d=3) then
begin
StringGrid1.Cells[c,d]:='1';
a:=a+5;
b:=b+15;
frmMain.nx := 0+a;
  frmMain.nx1 := 0+a;
  frmMain.nx2 := 0+a;
 frmMain.nx3 := 0+a;
 frmMain.nx7 := -1+a;
 frmMain.nx8 := 1+a;
 frmMain.nx9 := -1+a;
  frmMain.nx10 := -2+a;
 frmMain.nx11 := -1+a;
 frmMain.nx12 := 1+a;
 frmMain.nx14 := 1+a;
 frmMain.nx15 := -1+a;
 frmMain.nx16 := -1+a;
 frmMain.nx17 := 1+a;
  frmMain.nx18 := -1+a;
 frmMain.nx19 := 1+a;
 frmMain.nx20 := -1+a;
 frmMain.nx21 := -1+a;
 frmMain.nx22 := 1+a;
  frmMain.nx23 := -1+a;
 frmMain.nx24 := 1+a;
  frmMain.nx25 := 1+a;
 frmMain.nx26 := -1+a;
 frmMain.nx27 := 1+a;
  frmMain.nx28 := -1+a;
  frmMain.nx29 := 1+a;
 frmMain.nx30 := -1+a;

// 1

 frmMain.nx31 := -2+a;
 frmMain.nx32 := 2+a;
 frmMain.nx33 := -2+a;
 frmMain.nx34 :=  2+a;
 frmMain.nx35 := -2+a;
 frmMain.nx36 := 2+a;
  frmMain.nx37 := -2+a;
 frmMain.nx38 := 2+a;
 frmMain.nx39 := -2+a;
 frmMain.nx40 := 2+a;
 frmMain.nx41 := -2+a;
 frmMain.nx42 := 2+a;
 frmMain.nx43 := -2+a;
 frmMain.nx44 := 2+a;
 frmMain.nx45 := -2+a;  //////////////


 //////////////////////

 frmMain.nx46 := -2+a;
 frmMain.nx47 := -2+a;
 frmMain.nx48 := 2+a;
 frmMain.nx49 := -2+a;
 frmMain.nx50 := 2+a;
 frmMain.nx51 := -3+a;
 frmMain.nx52 :=3+a;
 frmMain.nx53 := -3+a;
 frmMain.nx54 :=  3+a;
 frmMain.nx55 := -3+a;
 frmMain.nx56 := 3+a;
 frmMain.nx57 := -3+a;
 frmMain.nx58 := 3+a;
 frmMain.nx59 := -3+a;
 frmMain.nx60 := 3+a;
 frmMain.nx61 := -3+a;
 frmMain.nx62 := 3+a;
 frmMain.nx63 := -3+a;
 frmMain.nx64 := 3+a;
 frmMain.nx65 := -3+a;
 frmMain.nx66 := 3+a;
 frmMain.nx67 := -3+a;
 frmMain.nx68 := 3+a;
 frmMain.nx69 := -3+a;
 frmMain.nx70 := 3+a;


  ///3
 ///
 ///
 frmMain.nx71 := -4+a;
 frmMain.nx72 :=4+a;
 frmMain.nx73 := -4+a;
 frmMain.nx74 :=  4+a;
 frmMain.nx75 := -4+a;
 frmMain.nx76 := 4+a;
 frmMain.nx77 := -4+a;
 frmMain.nx78 := 4+a;
 frmMain.nx79 := -4+a;
 frmMain.nx80 := 4+a;
 frmMain.nx81 := -4+a;
 frmMain.nx82 := 4+a;
 frmMain.nx83 := -4+a;
 frmMain.nx84 := 4+a;
 frmMain.nx85 := -4+a;
 frmMain.nx86 := 4+a;
 frmMain.nx87 := -4+a;
 frmMain.nx88 := 4+a;
 frmMain.nx89 := -4+a;
 frmMain.nx90 := -2+a;

frmMain.nx94 :=0+a;
frmMain.nx95 :=-2+a;  //цифры
frmMain.nx96 :=-4+a;  //цифры
frmMain.nx97 :=-6+a;  //цифры
frmMain.nx98 := 2+a;  //цифры
frmMain.nx99 := 4+a;  //цифры
frmMain.nx100 := 6+a;  //цифры
frmMain.nx101 := 8+a;  //цифры
frmMain.nx102 := 10+a;  //цифры
frmMain.nx103 := 12+a;  //цифры

frmMain.nx104 := -8+a;  //буквы
frmMain.nx105 := -8+a;  //буквы
frmMain.nx106 := -8+a;  //буквы
frmMain.nx107 := -8+a;  //буквы
frmMain.nx108 := -8+a;  //буквы
frmMain.nx109 := -8+a;  //буквы
frmMain.nx110 := -8+a;  //буквы
frmMain.nx111 := -8+a;  //буквы
frmMain.nx112 := -8+a;  //буквы
frmMain.nx113 := -8+a;  //буквы

frmMain.nx114 := -6+a;  //корабль
frmMain.nx115 := 0+a;  //цифры
frmMain.nx116 :=-2+a;  //цифры
frmMain.nx117 :=-4+a;  //цифры
frmMain.nx118 :=-6+a;  //цифры
frmMain.nx119 := 2+a;  //цифры
frmMain.nx120 := 4+a;  //цифры
frmMain.nx121 := 6+a;  //цифры
frmMain.nx122 := 8+a;  //цифры
frmMain.nx123 := 10+a;  //цифры
frmMain.nx124 := 12+a;  //цифры
frmMain.nx125 := 0+a;
frmMain.nx126 := 0+a;
frmMain.nx127 := 0+a;
frmMain.nx128 := 2+a;
frmMain.nx129 := -2+a;
frmMain.nx130 := -4+a;
frmMain.nx131 := 4+a;
frmMain.nx132 := -6+a;
frmMain.nx133 := 6+a;
frmMain.nx134 := 8+a;
frmMain.nx135 := -8+a;
frmMain.nx136 := -2+a;
frmMain.nx137 := 2+a;
frmMain.nx138 := -4+a;
frmMain.nx139 := 4+a;
frmMain.nx140 := -2+a;
frmMain.nx141 := 2+a;
frmMain.nx142 := 0+a;
frmMain.nx143 := 2+a;
frmMain.nx144 := -2+a;
frmMain.nx145 := -4+a;
frmMain.nx146 := 4+a;
frmMain.nx147 := 6+a;
frmMain.nx148 := -6+a;
frmMain.nx149 := -6+a;
frmMain.nx150 := 6+a;
frmMain.nx151 := 2+a;
frmMain.nx152 := -2+a;
frmMain.nx153 := 2+a;
frmMain.nx154 := -2+a;
frmMain.nx155 := 0+a;
frmMain.nx156 := 0+a;
frmMain.nx157 := 4+a;
frmMain.nx158 := -4+a;
frmMain.nx159 := -6+a;
frmMain.nx160 := 6+a;
frmMain.nx161 := 4+a;
frmMain.nx162 := -4+a;
frmMain.nx163 := -6+a;
frmMain.nx164 := 6+a;
frmMain.nx165 := 4+a;
frmMain.nx166 := -4+a;
frmMain.nx167 := -6+a;
frmMain.nx168 := 6+a;
frmMain.nx169 := 4+a;
frmMain.nx170 := -4+a;
frmMain.nx171 := -6+a;
frmMain.nx172 := 6+a;
frmMain.nx173 := 4+a;
frmMain.nx174 := -4+a;
frmMain.nx175 := -6+a;
frmMain.nx176 := 6+a;
frmMain.nx177 := 4+a;
frmMain.nx178 := -4+a;
frmMain.nx179 := -6+a;
frmMain.nx180 := 6+a;
 frmMain.nx181 := 4+a;
 frmMain.nx182 := -4+a;
 frmMain.nx183 := -6+a;
 frmMain.nx184 := 6+a;
 frmMain.nx185 := 4+a;
 frmMain.nx186 := -4+a;
 frmMain.nx187 := -6+a;
 frmMain.nx188 := 6+a;
 frmMain.nx189 := -4+a;
 frmMain.nx190 := 4+a;
 frmMain.nx191 := -6+a;
 frmMain.nx192 := 6+a;
 frmMain.nx193 := -4+a;
 frmMain.nx194 := 4+a;
 frmMain.nx195 := -6+a;
 frmMain.nx196 := 6+a;
 frmMain.nx197 := -4+a;
 frmMain.nx198 := 4+a;
 frmMain.nx199 := -6+a;
 frmMain.nx200 := 6+a;
 frmMain.nx201 := -4+a;
 frmMain.nx202 := 4+a;
 frmMain.nx203 := -6+a;
 frmMain.nx204 := 6+a;
 frmMain.nx205 := 6+a;  //корабль
 frmMain.nx206 := 6+a;  //Подлодка
 frmMain.nx215 := -6+a;

 frmMain.frmGL.Width:=800;
 a:=0;
 frmMain.nz := 0+b;
  frmMain.nz1 := 0+b;
  frmMain.nz2 := 0+b;
 frmMain.nz3 := 1+b;
 frmMain.nz7 := 0+b;
 frmMain.nz8 := 2+b;
 frmMain.nz9 := 2+b;
  frmMain.nz10 := -2+b;
 frmMain.nz11 := -2+b;
 frmMain.nz12 := -2+b;
 frmMain.nz14 := -3+b;
 frmMain.nz15 := -3+b;
 frmMain.nz16 := -4+b;
 frmMain.nz17 := -4+b;
  frmMain.nz18 := -5+b;
 frmMain.nz19 := -5+b;
 frmMain.nz20 := -6+b;
 frmMain.nz21 := -7+b;
 frmMain.nz22 := -7+b;
  frmMain.nz23 := -8+b;
 frmMain.nz24 := -8+b;
  frmMain.nz25 := -9+b;
 frmMain.nz26 := -9+b;
 frmMain.nz27 := -10+b;
  frmMain.nz28 := -10+b;
  frmMain.nz29 := -11+b;
 frmMain.nz30 := -11+b;

// 1

 frmMain.nz31 := -2+b;
 frmMain.nz32 := -2+b;
 frmMain.nz33 := -3+b;
 frmMain.nz34 := -3+b;
 frmMain.nz35 := -4+b;
 frmMain.nz36 := -4+b;
  frmMain.nz37 := -5+b;
 frmMain.nz38 := -5+b;
 frmMain.nz39 := -6+b;
 frmMain.nz40 := -6+b;
 frmMain.nz41 := -7+b;
 frmMain.nz42 := -7+b;
 frmMain.nz43 := -8+b;
 frmMain.nz44 := -8+b;
 frmMain.nz45 := -9+b;  //////////////


 //////////////////////

 frmMain.nz46 := -9+b;
 frmMain.nz47 := -9+b;
 frmMain.nz48 := -10+b;
 frmMain.nz49 := -11+b;
 frmMain.nz50 := -11+b;
 frmMain.nz51 := -2+b;
 frmMain.nz52 :=-2+b;
 frmMain.nz53 := -3+b;
 frmMain.nz54 :=  3+b;
 frmMain.nz55 := -3+b;
 frmMain.nz56 := -4+b;
 frmMain.nz57 := -5+b;
 frmMain.nz58 := -5+b;
 frmMain.nz59 := -6+b;
 frmMain.nz60 := -6+b;
 frmMain.nz61 := -7+b;
 frmMain.nz62 := -7+b;
 frmMain.nz63 := -8+b;
 frmMain.nz64 := -8+b;
 frmMain.nz65 := -9+b;
 frmMain.nz66 := -9+b;
 frmMain.nz67 := -10+b;
 frmMain.nz68 := -10+b;
 frmMain.nz69 := -11+b;
 frmMain.nz70 := -11+b;


  ///3
 ///
 ///
 frmMain.nz71 := -2+b;
 frmMain.nz72 :=-2+b;
 frmMain.nz73 := -3+b;
 frmMain.nz74 :=  -3+b;
 frmMain.nz75 := -4+b;
 frmMain.nz76 := -4+b;
 frmMain.nz77 := -5+b;
 frmMain.nz78 := -5+b;
 frmMain.nz79 := -6+b;
 frmMain.nz80 := -6+b;
 frmMain.nz81 := -7+b;
 frmMain.nz82 := -7+b;
 frmMain.nz83 := -8+b;
 frmMain.nz84 := -8+b;
 frmMain.nz85 := -9+b;
 frmMain.nz86 := -9+b;
 frmMain.nz87 := -10+b;
 frmMain.nz88 := -10+b;
 frmMain.nz89 := -11+b;
 frmMain.nz90 := -2+b;

frmMain.nz94 :=1+b;
frmMain.nz95 :=1+b;  //цифры
frmMain.nz96 :=1+b;  //цифры
frmMain.nz97 :=1+b;  //цифры
frmMain.nz98 := 1+b;  //цифры
frmMain.nz99 := 1+b;  //цифры
frmMain.nz100 := 1+b;  //цифры
frmMain.nz101 := 1+b;  //цифры
frmMain.nz102 := 1+b;  //цифры
frmMain.nz103 := 1+b;  //цифры

frmMain.nz104 := -0+b;  //буквы
frmMain.nz105 := -2+b;  //буквы
frmMain.nz106 := -4+b;  //буквы
frmMain.nz107 := -6+b;  //буквы
frmMain.nz108 := -8+b;  //буквы
frmMain.nz109 := -10+b;  //буквы
frmMain.nz110 := -12+b;  //буквы
frmMain.nz111 := -14+b;  //буквы
frmMain.nz112 := -16+b;  //буквы
frmMain.nz113 := -18+b;  //буквы

frmMain.nz114 := -4+b;  //корабль
frmMain.nz115 := -18+b;  //цифры
frmMain.nz116 :=-18+b;  //цифры
frmMain.nz117 :=-18+b;  //цифры
frmMain.nz118 :=-18+b;  //цифры
frmMain.nz119 := -18+b;  //цифры
frmMain.nz120 := -18+b;  //цифры
frmMain.nz121 := -18+b;  //цифры
frmMain.nz122 := -18+b;  //цифры
frmMain.nz123 := -18+b;  //цифры
frmMain.nz124 := -18+b;  //цифры
frmMain.nz125 := -16+b;
frmMain.nz126 := -14+b;
frmMain.nz127 := -12+b;
frmMain.nz128 := -16+b;
frmMain.nz129 := -16+b;
frmMain.nz130 := -16+b;
frmMain.nz131 := -16+b;
frmMain.nz132 := -16+b;
frmMain.nz133 := -16+b;
frmMain.nz134 := -16+b;
frmMain.nz135 := -16+b;
frmMain.nz136 := -14+b;
frmMain.nz137 := -14+b;
frmMain.nz138 := -14+b;
frmMain.nz139 := -14+b;
frmMain.nz140 := -14+b;
frmMain.nz141 := -15+b;
frmMain.nz142 := -15+b;
frmMain.nz143 := -15+b;
frmMain.nz144 := -15+b;
frmMain.nz145 := -15+b;
frmMain.nz146 := -15+b;
frmMain.nz147 := -15+b;
frmMain.nz148 := -15+b;
frmMain.nz149 := -14+b;
frmMain.nz150 := -14+b;
frmMain.nz151 := -12+b;
frmMain.nz152 := -12+b;
frmMain.nz153 := -13+b;
frmMain.nz154 := -13+b;
frmMain.nz155 := -13+b;
frmMain.nz156 := -6+b;
frmMain.nz157 := -12+b;
frmMain.nz158 := -12+b;
frmMain.nz159 := -12+b;
frmMain.nz160 := -12+b;
frmMain.nz161 := -10+b;
frmMain.nz162 := -10+b;
frmMain.nz163 := -10+b;
frmMain.nz164 := -10+b;
frmMain.nz165 := -8+b;
frmMain.nz166 := -8+b;
frmMain.nz167 := -8+b;
frmMain.nz168 := -8+b;
frmMain.nz169 := -6+b;
frmMain.nz170 := -6+b;
frmMain.nz171 := -6+b;
frmMain.nz172 := -6+b;
frmMain.nz173 := -4+b;
frmMain.nz174 := -4+b;
frmMain.nz175 := -4+b;
frmMain.nz176 := -4+b;
frmMain.nz177 := -2+b;
frmMain.nz178 := -2+b;
frmMain.nz179 := -2+b;
frmMain.nz180 := -2+b;
 frmMain.nz181 := -3+b;
 frmMain.nz182 := -3+b;
 frmMain.nz183 := -3+b;
 frmMain.nz184 := -3+b;
 frmMain.nz185 := -5+b;
 frmMain.nz186 := -5+b;
 frmMain.nz187 := -5+b;
 frmMain.nz188 := -5+b;
 frmMain.nz189 := -7+b;
 frmMain.nz190 := -7+b;
 frmMain.nz191 := -7+b;
 frmMain.nz192 := -7+b;
 frmMain.nz193 := -9+b;
 frmMain.nz194 := -9+b;
 frmMain.nz195 := -9+b;
 frmMain.nz196 := -9+b;
 frmMain.nz197 := -11+b;
 frmMain.nz198 := -11+b;
 frmMain.nz199 := -11+b;
 frmMain.nz200 := -11+b;
 frmMain.nz201 := -13+b;
 frmMain.nz202 := -13+b;
 frmMain.nz203 := -13+b;
 frmMain.nz204 := -13+b;
 frmMain.nz205 := -4+b;  //корабль
 frmMain.nz206 := -8+b;  //Подлодка
 frmMain.frmGL.Width:=800;
 b:=0;
end;



 if (c=2) and (d=4) then
begin
StringGrid1.Cells[c,d]:='1';
c:=1; d:=4;
StringGrid1.Cells[c,d]:='d';
c:=2; d:=4;
a:=a+5;
b:=b+13;
korabley:=korabley+1;
label2.Caption:=inttostr(korabley);
ochkofnabrano:=ochkofnabrano+200;
label6.Caption:=inttostr(ochkofnabrano);
frmMain.nx := 0+a;
  frmMain.nx1 := 0+a;
  frmMain.nx2 := 0+a;
 frmMain.nx3 := 0+a;
 frmMain.nx7 := -1+a;
 frmMain.nx8 := 1+a;
 frmMain.nx9 := -1+a;
  frmMain.nx10 := -2+a;
 frmMain.nx11 := -1+a;
 frmMain.nx12 := 1+a;
 frmMain.nx14 := 1+a;
 frmMain.nx15 := -1+a;
 frmMain.nx16 := -1+a;
 frmMain.nx17 := 1+a;
  frmMain.nx18 := -1+a;
 frmMain.nx19 := 1+a;
 frmMain.nx20 := -1+a;
 frmMain.nx21 := -1+a;
 frmMain.nx22 := 1+a;
  frmMain.nx23 := -1+a;
 frmMain.nx24 := 1+a;
  frmMain.nx25 := 1+a;
 frmMain.nx26 := -1+a;
 frmMain.nx27 := 1+a;
  frmMain.nx28 := -1+a;
  frmMain.nx29 := 1+a;
 frmMain.nx30 := -1+a;

// 1

 frmMain.nx31 := -2+a;
 frmMain.nx32 := 2+a;
 frmMain.nx33 := -2+a;
 frmMain.nx34 :=  2+a;
 frmMain.nx35 := -2+a;
 frmMain.nx36 := 2+a;
  frmMain.nx37 := -2+a;
 frmMain.nx38 := 2+a;
 frmMain.nx39 := -2+a;
 frmMain.nx40 := 2+a;
 frmMain.nx41 := -2+a;
 frmMain.nx42 := 2+a;
 frmMain.nx43 := -2+a;
 frmMain.nx44 := 2+a;
 frmMain.nx45 := -2+a;  //////////////


 //////////////////////

 frmMain.nx46 := -2+a;
 frmMain.nx47 := -2+a;
 frmMain.nx48 := 2+a;
 frmMain.nx49 := -2+a;
 frmMain.nx50 := 2+a;
 frmMain.nx51 := -3+a;
 frmMain.nx52 :=3+a;
 frmMain.nx53 := -3+a;
 frmMain.nx54 :=  3+a;
 frmMain.nx55 := -3+a;
 frmMain.nx56 := 3+a;
 frmMain.nx57 := -3+a;
 frmMain.nx58 := 3+a;
 frmMain.nx59 := -3+a;
 frmMain.nx60 := 3+a;
 frmMain.nx61 := -3+a;
 frmMain.nx62 := 3+a;
 frmMain.nx63 := -3+a;
 frmMain.nx64 := 3+a;
 frmMain.nx65 := -3+a;
 frmMain.nx66 := 3+a;
 frmMain.nx67 := -3+a;
 frmMain.nx68 := 3+a;
 frmMain.nx69 := -3+a;
 frmMain.nx70 := 3+a;


  ///3
 ///
 ///
 frmMain.nx71 := -4+a;
 frmMain.nx72 :=4+a;
 frmMain.nx73 := -4+a;
 frmMain.nx74 :=  4+a;
 frmMain.nx75 := -4+a;
 frmMain.nx76 := 4+a;
 frmMain.nx77 := -4+a;
 frmMain.nx78 := 4+a;
 frmMain.nx79 := -4+a;
 frmMain.nx80 := 4+a;
 frmMain.nx81 := -4+a;
 frmMain.nx82 := 4+a;
 frmMain.nx83 := -4+a;
 frmMain.nx84 := 4+a;
 frmMain.nx85 := -4+a;
 frmMain.nx86 := 4+a;
 frmMain.nx87 := -4+a;
 frmMain.nx88 := 4+a;
 frmMain.nx89 := -4+a;
 frmMain.nx90 := -2+a;

frmMain.nx94 :=0+a;
frmMain.nx95 :=-2+a;  //цифры
frmMain.nx96 :=-4+a;  //цифры
frmMain.nx97 :=-6+a;  //цифры
frmMain.nx98 := 2+a;  //цифры
frmMain.nx99 := 4+a;  //цифры
frmMain.nx100 := 6+a;  //цифры
frmMain.nx101 := 8+a;  //цифры
frmMain.nx102 := 10+a;  //цифры
frmMain.nx103 := 12+a;  //цифры

frmMain.nx104 := -8+a;  //буквы
frmMain.nx105 := -8+a;  //буквы
frmMain.nx106 := -8+a;  //буквы
frmMain.nx107 := -8+a;  //буквы
frmMain.nx108 := -8+a;  //буквы
frmMain.nx109 := -8+a;  //буквы
frmMain.nx110 := -8+a;  //буквы
frmMain.nx111 := -8+a;  //буквы
frmMain.nx112 := -8+a;  //буквы
frmMain.nx113 := -8+a;  //буквы

frmMain.nx114 := -6+a;  //корабль
frmMain.nx115 := 0+a;  //цифры
frmMain.nx116 :=-2+a;  //цифры
frmMain.nx117 :=-4+a;  //цифры
frmMain.nx118 :=-6+a;  //цифры
frmMain.nx119 := 2+a;  //цифры
frmMain.nx120 := 4+a;  //цифры
frmMain.nx121 := 6+a;  //цифры
frmMain.nx122 := 8+a;  //цифры
frmMain.nx123 := 10+a;  //цифры
frmMain.nx124 := 12+a;  //цифры
frmMain.nx125 := 0+a;
frmMain.nx126 := 0+a;
frmMain.nx127 := 0+a;
frmMain.nx128 := 2+a;
frmMain.nx129 := -2+a;
frmMain.nx130 := -4+a;
frmMain.nx131 := 4+a;
frmMain.nx132 := -6+a;
frmMain.nx133 := 6+a;
frmMain.nx134 := 8+a;
frmMain.nx135 := -8+a;
frmMain.nx136 := -2+a;
frmMain.nx137 := 2+a;
frmMain.nx138 := -4+a;
frmMain.nx139 := 4+a;
frmMain.nx140 := -2+a;
frmMain.nx141 := 2+a;
frmMain.nx142 := 0+a;
frmMain.nx143 := 2+a;
frmMain.nx144 := -2+a;
frmMain.nx145 := -4+a;
frmMain.nx146 := 4+a;
frmMain.nx147 := 6+a;
frmMain.nx148 := -6+a;
frmMain.nx149 := -6+a;
frmMain.nx150 := 6+a;
frmMain.nx151 := 2+a;
frmMain.nx152 := -2+a;
frmMain.nx153 := 2+a;
frmMain.nx154 := -2+a;
frmMain.nx155 := 0+a;
frmMain.nx156 := 0+a;
frmMain.nx157 := 4+a;
frmMain.nx158 := -4+a;
frmMain.nx159 := -6+a;
frmMain.nx160 := 6+a;
frmMain.nx161 := 4+a;
frmMain.nx162 := -4+a;
frmMain.nx163 := -6+a;
frmMain.nx164 := 6+a;
frmMain.nx165 := 4+a;
frmMain.nx166 := -4+a;
frmMain.nx167 := -6+a;
frmMain.nx168 := 6+a;
frmMain.nx169 := 4+a;
frmMain.nx170 := -4+a;
frmMain.nx171 := -6+a;
frmMain.nx172 := 6+a;
frmMain.nx173 := 4+a;
frmMain.nx174 := -4+a;
frmMain.nx175 := -6+a;
frmMain.nx176 := 6+a;
frmMain.nx177 := 4+a;
frmMain.nx178 := -4+a;
frmMain.nx179 := -6+a;
frmMain.nx180 := 6+a;
 frmMain.nx181 := 4+a;
 frmMain.nx182 := -4+a;
 frmMain.nx183 := -6+a;
 frmMain.nx184 := 6+a;
 frmMain.nx185 := 4+a;
 frmMain.nx186 := -4+a;
 frmMain.nx187 := -6+a;
 frmMain.nx188 := 6+a;
 frmMain.nx189 := -4+a;
 frmMain.nx190 := 4+a;
 frmMain.nx191 := -6+a;
 frmMain.nx192 := 6+a;
 frmMain.nx193 := -4+a;
 frmMain.nx194 := 4+a;
 frmMain.nx195 := -6+a;
 frmMain.nx196 := 6+a;
 frmMain.nx197 := -4+a;
 frmMain.nx198 := 4+a;
 frmMain.nx199 := -6+a;
 frmMain.nx200 := 6+a;
 frmMain.nx201 := -4+a;
 frmMain.nx202 := 4+a;
 frmMain.nx203 := -6+a;
 frmMain.nx204 := 6+a;
 frmMain.nx205 := 6+a;  //корабль
 frmMain.nx206 := 6+a;  //Подлодка
 frmMain.nx215 := -6+a;
 frmMain.frmGL.Width:=800;
 a:=0;
 frmMain.nz := 0+b;
  frmMain.nz1 := 0+b;
  frmMain.nz2 := 0+b;
 frmMain.nz3 := 1+b;
 frmMain.nz7 := 0+b;
 frmMain.nz8 := 2+b;
 frmMain.nz9 := 2+b;
  frmMain.nz10 := -2+b;
 frmMain.nz11 := -2+b;
 frmMain.nz12 := -2+b;
 frmMain.nz14 := -3+b;
 frmMain.nz15 := -3+b;
 frmMain.nz16 := -4+b;
 frmMain.nz17 := -4+b;
  frmMain.nz18 := -5+b;
 frmMain.nz19 := -5+b;
 frmMain.nz20 := -6+b;
 frmMain.nz21 := -7+b;
 frmMain.nz22 := -7+b;
  frmMain.nz23 := -8+b;
 frmMain.nz24 := -8+b;
  frmMain.nz25 := -9+b;
 frmMain.nz26 := -9+b;
 frmMain.nz27 := -10+b;
  frmMain.nz28 := -10+b;
  frmMain.nz29 := -11+b;
 frmMain.nz30 := -11+b;

// 1

 frmMain.nz31 := -2+b;
 frmMain.nz32 := -2+b;
 frmMain.nz33 := -3+b;
 frmMain.nz34 := -3+b;
 frmMain.nz35 := -4+b;
 frmMain.nz36 := -4+b;
  frmMain.nz37 := -5+b;
 frmMain.nz38 := -5+b;
 frmMain.nz39 := -6+b;
 frmMain.nz40 := -6+b;
 frmMain.nz41 := -7+b;
 frmMain.nz42 := -7+b;
 frmMain.nz43 := -8+b;
 frmMain.nz44 := -8+b;
 frmMain.nz45 := -9+b;  //////////////


 //////////////////////

 frmMain.nz46 := -9+b;
 frmMain.nz47 := -9+b;
 frmMain.nz48 := -10+b;
 frmMain.nz49 := -11+b;
 frmMain.nz50 := -11+b;
 frmMain.nz51 := -2+b;
 frmMain.nz52 :=-2+b;
 frmMain.nz53 := -3+b;
 frmMain.nz54 :=  3+b;
 frmMain.nz55 := -3+b;
 frmMain.nz56 := -4+b;
 frmMain.nz57 := -5+b;
 frmMain.nz58 := -5+b;
 frmMain.nz59 := -6+b;
 frmMain.nz60 := -6+b;
 frmMain.nz61 := -7+b;
 frmMain.nz62 := -7+b;
 frmMain.nz63 := -8+b;
 frmMain.nz64 := -8+b;
 frmMain.nz65 := -9+b;
 frmMain.nz66 := -9+b;
 frmMain.nz67 := -10+b;
 frmMain.nz68 := -10+b;
 frmMain.nz69 := -11+b;
 frmMain.nz70 := -11+b;


  ///3
 ///
 ///
 frmMain.nz71 := -2+b;
 frmMain.nz72 :=-2+b;
 frmMain.nz73 := -3+b;
 frmMain.nz74 :=  -3+b;
 frmMain.nz75 := -4+b;
 frmMain.nz76 := -4+b;
 frmMain.nz77 := -5+b;
 frmMain.nz78 := -5+b;
 frmMain.nz79 := -6+b;
 frmMain.nz80 := -6+b;
 frmMain.nz81 := -7+b;
 frmMain.nz82 := -7+b;
 frmMain.nz83 := -8+b;
 frmMain.nz84 := -8+b;
 frmMain.nz85 := -9+b;
 frmMain.nz86 := -9+b;
 frmMain.nz87 := -10+b;
 frmMain.nz88 := -10+b;
 frmMain.nz89 := -11+b;
 frmMain.nz90 := -2+b;

frmMain.nz94 :=1+b;
frmMain.nz95 :=1+b;  //цифры
frmMain.nz96 :=1+b;  //цифры
frmMain.nz97 :=1+b;  //цифры
frmMain.nz98 := 1+b;  //цифры
frmMain.nz99 := 1+b;  //цифры
frmMain.nz100 := 1+b;  //цифры
frmMain.nz101 := 1+b;  //цифры
frmMain.nz102 := 1+b;  //цифры
frmMain.nz103 := 1+b;  //цифры

frmMain.nz104 := -0+b;  //буквы
frmMain.nz105 := -2+b;  //буквы
frmMain.nz106 := -4+b;  //буквы
frmMain.nz107 := -6+b;  //буквы
frmMain.nz108 := -8+b;  //буквы
frmMain.nz109 := -10+b;  //буквы
frmMain.nz110 := -12+b;  //буквы
frmMain.nz111 := -14+b;  //буквы
frmMain.nz112 := -16+b;  //буквы
frmMain.nz113 := -18+b;  //буквы

frmMain.nz114 := -4+b;  //корабль
frmMain.nz115 := -18+b;  //цифры
frmMain.nz116 :=-18+b;  //цифры
frmMain.nz117 :=-18+b;  //цифры
frmMain.nz118 :=-18+b;  //цифры
frmMain.nz119 := -18+b;  //цифры
frmMain.nz120 := -18+b;  //цифры
frmMain.nz121 := -18+b;  //цифры
frmMain.nz122 := -18+b;  //цифры
frmMain.nz123 := -18+b;  //цифры
frmMain.nz124 := -18+b;  //цифры
frmMain.nz125 := -16+b;
frmMain.nz126 := -14+b;
frmMain.nz127 := -12+b;
frmMain.nz128 := -16+b;
frmMain.nz129 := -16+b;
frmMain.nz130 := -16+b;
frmMain.nz131 := -16+b;
frmMain.nz132 := -16+b;
frmMain.nz133 := -16+b;
frmMain.nz134 := -16+b;
frmMain.nz135 := -16+b;
frmMain.nz136 := -14+b;
frmMain.nz137 := -14+b;
frmMain.nz138 := -14+b;
frmMain.nz139 := -14+b;
frmMain.nz140 := -14+b;
frmMain.nz141 := -15+b;
frmMain.nz142 := -15+b;
frmMain.nz143 := -15+b;
frmMain.nz144 := -15+b;
frmMain.nz145 := -15+b;
frmMain.nz146 := -15+b;
frmMain.nz147 := -15+b;
frmMain.nz148 := -15+b;
frmMain.nz149 := -14+b;
frmMain.nz150 := -14+b;
frmMain.nz151 := -12+b;
frmMain.nz152 := -12+b;
frmMain.nz153 := -13+b;
frmMain.nz154 := -13+b;
frmMain.nz155 := -13+b;
frmMain.nz156 := -6+b;
frmMain.nz157 := -12+b;
frmMain.nz158 := -12+b;
frmMain.nz159 := -12+b;
frmMain.nz160 := -12+b;
frmMain.nz161 := -10+b;
frmMain.nz162 := -10+b;
frmMain.nz163 := -10+b;
frmMain.nz164 := -10+b;
frmMain.nz165 := -8+b;
frmMain.nz166 := -8+b;
frmMain.nz167 := -8+b;
frmMain.nz168 := -8+b;
frmMain.nz169 := -6+b;
frmMain.nz170 := -6+b;
frmMain.nz171 := -6+b;
frmMain.nz172 := -6+b;
frmMain.nz173 := -4+b;
frmMain.nz174 := -4+b;
frmMain.nz175 := -4+b;
frmMain.nz176 := -4+b;
frmMain.nz177 := -2+b;
frmMain.nz178 := -2+b;
frmMain.nz179 := -2+b;
frmMain.nz180 := -2+b;
 frmMain.nz181 := -3+b;
 frmMain.nz182 := -3+b;
 frmMain.nz183 := -3+b;
 frmMain.nz184 := -3+b;
 frmMain.nz185 := -5+b;
 frmMain.nz186 := -5+b;
 frmMain.nz187 := -5+b;
 frmMain.nz188 := -5+b;
 frmMain.nz189 := -7+b;
 frmMain.nz190 := -7+b;
 frmMain.nz191 := -7+b;
 frmMain.nz192 := -7+b;
 frmMain.nz193 := -9+b;
 frmMain.nz194 := -9+b;
 frmMain.nz195 := -9+b;
 frmMain.nz196 := -9+b;
 frmMain.nz197 := -11+b;
 frmMain.nz198 := -11+b;
 frmMain.nz199 := -11+b;
 frmMain.nz200 := -11+b;
 frmMain.nz201 := -13+b;
 frmMain.nz202 := -13+b;
 frmMain.nz203 := -13+b;
 frmMain.nz204 := -13+b;
 frmMain.nz205 := -4+b;  //корабль
 frmMain.nz206 := -8+b;  //Подлодка
 frmMain.nz215 := -12+b;  //Подлодка
 frmMain.frmGL.Width:=800;
 b:=0;

 end;




 if (c=2) and (d=5) then
begin
StringGrid1.Cells[c,d]:='1';
a:=a+5;
b:=b+11;
frmMain.nx := 0+a;
  frmMain.nx1 := 0+a;
  frmMain.nx2 := 0+a;
 frmMain.nx3 := 0+a;
 frmMain.nx7 := -1+a;
 frmMain.nx8 := 1+a;
 frmMain.nx9 := -1+a;
  frmMain.nx10 := -2+a;
 frmMain.nx11 := -1+a;
 frmMain.nx12 := 1+a;
 frmMain.nx14 := 1+a;
 frmMain.nx15 := -1+a;
 frmMain.nx16 := -1+a;
 frmMain.nx17 := 1+a;
  frmMain.nx18 := -1+a;
 frmMain.nx19 := 1+a;
 frmMain.nx20 := -1+a;
 frmMain.nx21 := -1+a;
 frmMain.nx22 := 1+a;
  frmMain.nx23 := -1+a;
 frmMain.nx24 := 1+a;
  frmMain.nx25 := 1+a;
 frmMain.nx26 := -1+a;
 frmMain.nx27 := 1+a;
  frmMain.nx28 := -1+a;
  frmMain.nx29 := 1+a;
 frmMain.nx30 := -1+a;

// 1

 frmMain.nx31 := -2+a;
 frmMain.nx32 := 2+a;
 frmMain.nx33 := -2+a;
 frmMain.nx34 :=  2+a;
 frmMain.nx35 := -2+a;
 frmMain.nx36 := 2+a;
  frmMain.nx37 := -2+a;
 frmMain.nx38 := 2+a;
 frmMain.nx39 := -2+a;
 frmMain.nx40 := 2+a;
 frmMain.nx41 := -2+a;
 frmMain.nx42 := 2+a;
 frmMain.nx43 := -2+a;
 frmMain.nx44 := 2+a;
 frmMain.nx45 := -2+a;  //////////////


 //////////////////////

 frmMain.nx46 := -2+a;
 frmMain.nx47 := -2+a;
 frmMain.nx48 := 2+a;
 frmMain.nx49 := -2+a;
 frmMain.nx50 := 2+a;
 frmMain.nx51 := -3+a;
 frmMain.nx52 :=3+a;
 frmMain.nx53 := -3+a;
 frmMain.nx54 :=  3+a;
 frmMain.nx55 := -3+a;
 frmMain.nx56 := 3+a;
 frmMain.nx57 := -3+a;
 frmMain.nx58 := 3+a;
 frmMain.nx59 := -3+a;
 frmMain.nx60 := 3+a;
 frmMain.nx61 := -3+a;
 frmMain.nx62 := 3+a;
 frmMain.nx63 := -3+a;
 frmMain.nx64 := 3+a;
 frmMain.nx65 := -3+a;
 frmMain.nx66 := 3+a;
 frmMain.nx67 := -3+a;
 frmMain.nx68 := 3+a;
 frmMain.nx69 := -3+a;
 frmMain.nx70 := 3+a;


  ///3
 ///
 ///
 frmMain.nx71 := -4+a;
 frmMain.nx72 :=4+a;
 frmMain.nx73 := -4+a;
 frmMain.nx74 :=  4+a;
 frmMain.nx75 := -4+a;
 frmMain.nx76 := 4+a;
 frmMain.nx77 := -4+a;
 frmMain.nx78 := 4+a;
 frmMain.nx79 := -4+a;
 frmMain.nx80 := 4+a;
 frmMain.nx81 := -4+a;
 frmMain.nx82 := 4+a;
 frmMain.nx83 := -4+a;
 frmMain.nx84 := 4+a;
 frmMain.nx85 := -4+a;
 frmMain.nx86 := 4+a;
 frmMain.nx87 := -4+a;
 frmMain.nx88 := 4+a;
 frmMain.nx89 := -4+a;
 frmMain.nx90 := -2+a;

frmMain.nx94 :=0+a;
frmMain.nx95 :=-2+a;  //цифры
frmMain.nx96 :=-4+a;  //цифры
frmMain.nx97 :=-6+a;  //цифры
frmMain.nx98 := 2+a;  //цифры
frmMain.nx99 := 4+a;  //цифры
frmMain.nx100 := 6+a;  //цифры
frmMain.nx101 := 8+a;  //цифры
frmMain.nx102 := 10+a;  //цифры
frmMain.nx103 := 12+a;  //цифры

frmMain.nx104 := -8+a;  //буквы
frmMain.nx105 := -8+a;  //буквы
frmMain.nx106 := -8+a;  //буквы
frmMain.nx107 := -8+a;  //буквы
frmMain.nx108 := -8+a;  //буквы
frmMain.nx109 := -8+a;  //буквы
frmMain.nx110 := -8+a;  //буквы
frmMain.nx111 := -8+a;  //буквы
frmMain.nx112 := -8+a;  //буквы
frmMain.nx113 := -8+a;  //буквы

frmMain.nx114 := -6+a;  //корабль
frmMain.nx115 := 0+a;  //цифры
frmMain.nx116 :=-2+a;  //цифры
frmMain.nx117 :=-4+a;  //цифры
frmMain.nx118 :=-6+a;  //цифры
frmMain.nx119 := 2+a;  //цифры
frmMain.nx120 := 4+a;  //цифры
frmMain.nx121 := 6+a;  //цифры
frmMain.nx122 := 8+a;  //цифры
frmMain.nx123 := 10+a;  //цифры
frmMain.nx124 := 12+a;  //цифры
frmMain.nx125 := 0+a;
frmMain.nx126 := 0+a;
frmMain.nx127 := 0+a;
frmMain.nx128 := 2+a;
frmMain.nx129 := -2+a;
frmMain.nx130 := -4+a;
frmMain.nx131 := 4+a;
frmMain.nx132 := -6+a;
frmMain.nx133 := 6+a;
frmMain.nx134 := 8+a;
frmMain.nx135 := -8+a;
frmMain.nx136 := -2+a;
frmMain.nx137 := 2+a;
frmMain.nx138 := -4+a;
frmMain.nx139 := 4+a;
frmMain.nx140 := -2+a;
frmMain.nx141 := 2+a;
frmMain.nx142 := 0+a;
frmMain.nx143 := 2+a;
frmMain.nx144 := -2+a;
frmMain.nx145 := -4+a;
frmMain.nx146 := 4+a;
frmMain.nx147 := 6+a;
frmMain.nx148 := -6+a;
frmMain.nx149 := -6+a;
frmMain.nx150 := 6+a;
frmMain.nx151 := 2+a;
frmMain.nx152 := -2+a;
frmMain.nx153 := 2+a;
frmMain.nx154 := -2+a;
frmMain.nx155 := 0+a;
frmMain.nx156 := 0+a;
frmMain.nx157 := 4+a;
frmMain.nx158 := -4+a;
frmMain.nx159 := -6+a;
frmMain.nx160 := 6+a;
frmMain.nx161 := 4+a;
frmMain.nx162 := -4+a;
frmMain.nx163 := -6+a;
frmMain.nx164 := 6+a;
frmMain.nx165 := 4+a;
frmMain.nx166 := -4+a;
frmMain.nx167 := -6+a;
frmMain.nx168 := 6+a;
frmMain.nx169 := 4+a;
frmMain.nx170 := -4+a;
frmMain.nx171 := -6+a;
frmMain.nx172 := 6+a;
frmMain.nx173 := 4+a;
frmMain.nx174 := -4+a;
frmMain.nx175 := -6+a;
frmMain.nx176 := 6+a;
frmMain.nx177 := 4+a;
frmMain.nx178 := -4+a;
frmMain.nx179 := -6+a;
frmMain.nx180 := 6+a;
 frmMain.nx181 := 4+a;
 frmMain.nx182 := -4+a;
 frmMain.nx183 := -6+a;
 frmMain.nx184 := 6+a;
 frmMain.nx185 := 4+a;
 frmMain.nx186 := -4+a;
 frmMain.nx187 := -6+a;
 frmMain.nx188 := 6+a;
 frmMain.nx189 := -4+a;
 frmMain.nx190 := 4+a;
 frmMain.nx191 := -6+a;
 frmMain.nx192 := 6+a;
 frmMain.nx193 := -4+a;
 frmMain.nx194 := 4+a;
 frmMain.nx195 := -6+a;
 frmMain.nx196 := 6+a;
 frmMain.nx197 := -4+a;
 frmMain.nx198 := 4+a;
 frmMain.nx199 := -6+a;
 frmMain.nx200 := 6+a;
 frmMain.nx201 := -4+a;
 frmMain.nx202 := 4+a;
 frmMain.nx203 := -6+a;
 frmMain.nx204 := 6+a;
 frmMain.nx205 := 6+a;  //корабль
 frmMain.nx206 := 6+a;  //Подлодка
 frmMain.nx215 := -6+a;
 frmMain.frmGL.Width:=800;
 a:=0;
 frmMain.nz := 0+b;
  frmMain.nz1 := 0+b;
  frmMain.nz2 := 0+b;
 frmMain.nz3 := 1+b;
 frmMain.nz7 := 0+b;
 frmMain.nz8 := 2+b;
 frmMain.nz9 := 2+b;
  frmMain.nz10 := -2+b;
 frmMain.nz11 := -2+b;
 frmMain.nz12 := -2+b;
 frmMain.nz14 := -3+b;
 frmMain.nz15 := -3+b;
 frmMain.nz16 := -4+b;
 frmMain.nz17 := -4+b;
  frmMain.nz18 := -5+b;
 frmMain.nz19 := -5+b;
 frmMain.nz20 := -6+b;
 frmMain.nz21 := -7+b;
 frmMain.nz22 := -7+b;
  frmMain.nz23 := -8+b;
 frmMain.nz24 := -8+b;
  frmMain.nz25 := -9+b;
 frmMain.nz26 := -9+b;
 frmMain.nz27 := -10+b;
  frmMain.nz28 := -10+b;
  frmMain.nz29 := -11+b;
 frmMain.nz30 := -11+b;

// 1

 frmMain.nz31 := -2+b;
 frmMain.nz32 := -2+b;
 frmMain.nz33 := -3+b;
 frmMain.nz34 := -3+b;
 frmMain.nz35 := -4+b;
 frmMain.nz36 := -4+b;
  frmMain.nz37 := -5+b;
 frmMain.nz38 := -5+b;
 frmMain.nz39 := -6+b;
 frmMain.nz40 := -6+b;
 frmMain.nz41 := -7+b;
 frmMain.nz42 := -7+b;
 frmMain.nz43 := -8+b;
 frmMain.nz44 := -8+b;
 frmMain.nz45 := -9+b;  //////////////


 //////////////////////

 frmMain.nz46 := -9+b;
 frmMain.nz47 := -9+b;
 frmMain.nz48 := -10+b;
 frmMain.nz49 := -11+b;
 frmMain.nz50 := -11+b;
 frmMain.nz51 := -2+b;
 frmMain.nz52 :=-2+b;
 frmMain.nz53 := -3+b;
 frmMain.nz54 :=  3+b;
 frmMain.nz55 := -3+b;
 frmMain.nz56 := -4+b;
 frmMain.nz57 := -5+b;
 frmMain.nz58 := -5+b;
 frmMain.nz59 := -6+b;
 frmMain.nz60 := -6+b;
 frmMain.nz61 := -7+b;
 frmMain.nz62 := -7+b;
 frmMain.nz63 := -8+b;
 frmMain.nz64 := -8+b;
 frmMain.nz65 := -9+b;
 frmMain.nz66 := -9+b;
 frmMain.nz67 := -10+b;
 frmMain.nz68 := -10+b;
 frmMain.nz69 := -11+b;
 frmMain.nz70 := -11+b;


  ///3
 ///
 ///
 frmMain.nz71 := -2+b;
 frmMain.nz72 :=-2+b;
 frmMain.nz73 := -3+b;
 frmMain.nz74 :=  -3+b;
 frmMain.nz75 := -4+b;
 frmMain.nz76 := -4+b;
 frmMain.nz77 := -5+b;
 frmMain.nz78 := -5+b;
 frmMain.nz79 := -6+b;
 frmMain.nz80 := -6+b;
 frmMain.nz81 := -7+b;
 frmMain.nz82 := -7+b;
 frmMain.nz83 := -8+b;
 frmMain.nz84 := -8+b;
 frmMain.nz85 := -9+b;
 frmMain.nz86 := -9+b;
 frmMain.nz87 := -10+b;
 frmMain.nz88 := -10+b;
 frmMain.nz89 := -11+b;
 frmMain.nz90 := -2+b;

frmMain.nz94 :=1+b;
frmMain.nz95 :=1+b;  //цифры
frmMain.nz96 :=1+b;  //цифры
frmMain.nz97 :=1+b;  //цифры
frmMain.nz98 := 1+b;  //цифры
frmMain.nz99 := 1+b;  //цифры
frmMain.nz100 := 1+b;  //цифры
frmMain.nz101 := 1+b;  //цифры
frmMain.nz102 := 1+b;  //цифры
frmMain.nz103 := 1+b;  //цифры

frmMain.nz104 := -0+b;  //буквы
frmMain.nz105 := -2+b;  //буквы
frmMain.nz106 := -4+b;  //буквы
frmMain.nz107 := -6+b;  //буквы
frmMain.nz108 := -8+b;  //буквы
frmMain.nz109 := -10+b;  //буквы
frmMain.nz110 := -12+b;  //буквы
frmMain.nz111 := -14+b;  //буквы
frmMain.nz112 := -16+b;  //буквы
frmMain.nz113 := -18+b;  //буквы

frmMain.nz114 := -4+b;  //корабль
frmMain.nz115 := -18+b;  //цифры
frmMain.nz116 :=-18+b;  //цифры
frmMain.nz117 :=-18+b;  //цифры
frmMain.nz118 :=-18+b;  //цифры
frmMain.nz119 := -18+b;  //цифры
frmMain.nz120 := -18+b;  //цифры
frmMain.nz121 := -18+b;  //цифры
frmMain.nz122 := -18+b;  //цифры
frmMain.nz123 := -18+b;  //цифры
frmMain.nz124 := -18+b;  //цифры
frmMain.nz125 := -16+b;
frmMain.nz126 := -14+b;
frmMain.nz127 := -12+b;
frmMain.nz128 := -16+b;
frmMain.nz129 := -16+b;
frmMain.nz130 := -16+b;
frmMain.nz131 := -16+b;
frmMain.nz132 := -16+b;
frmMain.nz133 := -16+b;
frmMain.nz134 := -16+b;
frmMain.nz135 := -16+b;
frmMain.nz136 := -14+b;
frmMain.nz137 := -14+b;
frmMain.nz138 := -14+b;
frmMain.nz139 := -14+b;
frmMain.nz140 := -14+b;
frmMain.nz141 := -15+b;
frmMain.nz142 := -15+b;
frmMain.nz143 := -15+b;
frmMain.nz144 := -15+b;
frmMain.nz145 := -15+b;
frmMain.nz146 := -15+b;
frmMain.nz147 := -15+b;
frmMain.nz148 := -15+b;
frmMain.nz149 := -14+b;
frmMain.nz150 := -14+b;
frmMain.nz151 := -12+b;
frmMain.nz152 := -12+b;
frmMain.nz153 := -13+b;
frmMain.nz154 := -13+b;
frmMain.nz155 := -13+b;
frmMain.nz156 := -6+b;
frmMain.nz157 := -12+b;
frmMain.nz158 := -12+b;
frmMain.nz159 := -12+b;
frmMain.nz160 := -12+b;
frmMain.nz161 := -10+b;
frmMain.nz162 := -10+b;
frmMain.nz163 := -10+b;
frmMain.nz164 := -10+b;
frmMain.nz165 := -8+b;
frmMain.nz166 := -8+b;
frmMain.nz167 := -8+b;
frmMain.nz168 := -8+b;
frmMain.nz169 := -6+b;
frmMain.nz170 := -6+b;
frmMain.nz171 := -6+b;
frmMain.nz172 := -6+b;
frmMain.nz173 := -4+b;
frmMain.nz174 := -4+b;
frmMain.nz175 := -4+b;
frmMain.nz176 := -4+b;
frmMain.nz177 := -2+b;
frmMain.nz178 := -2+b;
frmMain.nz179 := -2+b;
frmMain.nz180 := -2+b;
 frmMain.nz181 := -3+b;
 frmMain.nz182 := -3+b;
 frmMain.nz183 := -3+b;
 frmMain.nz184 := -3+b;
 frmMain.nz185 := -5+b;
 frmMain.nz186 := -5+b;
 frmMain.nz187 := -5+b;
 frmMain.nz188 := -5+b;
 frmMain.nz189 := -7+b;
 frmMain.nz190 := -7+b;
 frmMain.nz191 := -7+b;
 frmMain.nz192 := -7+b;
 frmMain.nz193 := -9+b;
 frmMain.nz194 := -9+b;
 frmMain.nz195 := -9+b;
 frmMain.nz196 := -9+b;
 frmMain.nz197 := -11+b;
 frmMain.nz198 := -11+b;
 frmMain.nz199 := -11+b;
 frmMain.nz200 := -11+b;
 frmMain.nz201 := -13+b;
 frmMain.nz202 := -13+b;
 frmMain.nz203 := -13+b;
 frmMain.nz204 := -13+b;
 frmMain.nz205 := -4+b;  //корабль
 frmMain.nz206 := -8+b;  //Подлодка
 frmMain.nz215 := -12+b;  //Подлодка
 frmMain.frmGL.Width:=800;
 b:=0;

 end;





if (c=2) and (d=4) then
begin
StringGrid1.Cells[c,d]:='1';
a:=a+5;
b:=b+13;
frmMain.nx := 0+a;
  frmMain.nx1 := 0+a;
  frmMain.nx2 := 0+a;
 frmMain.nx3 := 0+a;
 frmMain.nx7 := -1+a;
 frmMain.nx8 := 1+a;
 frmMain.nx9 := -1+a;
  frmMain.nx10 := -2+a;
 frmMain.nx11 := -1+a;
 frmMain.nx12 := 1+a;
 frmMain.nx14 := 1+a;
 frmMain.nx15 := -1+a;
 frmMain.nx16 := -1+a;
 frmMain.nx17 := 1+a;
  frmMain.nx18 := -1+a;
 frmMain.nx19 := 1+a;
 frmMain.nx20 := -1+a;
 frmMain.nx21 := -1+a;
 frmMain.nx22 := 1+a;
  frmMain.nx23 := -1+a;
 frmMain.nx24 := 1+a;
  frmMain.nx25 := 1+a;
 frmMain.nx26 := -1+a;
 frmMain.nx27 := 1+a;
  frmMain.nx28 := -1+a;
  frmMain.nx29 := 1+a;
 frmMain.nx30 := -1+a;

// 1

 frmMain.nx31 := -2+a;
 frmMain.nx32 := 2+a;
 frmMain.nx33 := -2+a;
 frmMain.nx34 :=  2+a;
 frmMain.nx35 := -2+a;
 frmMain.nx36 := 2+a;
  frmMain.nx37 := -2+a;
 frmMain.nx38 := 2+a;
 frmMain.nx39 := -2+a;
 frmMain.nx40 := 2+a;
 frmMain.nx41 := -2+a;
 frmMain.nx42 := 2+a;
 frmMain.nx43 := -2+a;
 frmMain.nx44 := 2+a;
 frmMain.nx45 := -2+a;  //////////////


 //////////////////////

 frmMain.nx46 := -2+a;
 frmMain.nx47 := -2+a;
 frmMain.nx48 := 2+a;
 frmMain.nx49 := -2+a;
 frmMain.nx50 := 2+a;
 frmMain.nx51 := -3+a;
 frmMain.nx52 :=3+a;
 frmMain.nx53 := -3+a;
 frmMain.nx54 :=  3+a;
 frmMain.nx55 := -3+a;
 frmMain.nx56 := 3+a;
 frmMain.nx57 := -3+a;
 frmMain.nx58 := 3+a;
 frmMain.nx59 := -3+a;
 frmMain.nx60 := 3+a;
 frmMain.nx61 := -3+a;
 frmMain.nx62 := 3+a;
 frmMain.nx63 := -3+a;
 frmMain.nx64 := 3+a;
 frmMain.nx65 := -3+a;
 frmMain.nx66 := 3+a;
 frmMain.nx67 := -3+a;
 frmMain.nx68 := 3+a;
 frmMain.nx69 := -3+a;
 frmMain.nx70 := 3+a;


  ///3
 ///
 ///
 frmMain.nx71 := -4+a;
 frmMain.nx72 :=4+a;
 frmMain.nx73 := -4+a;
 frmMain.nx74 :=  4+a;
 frmMain.nx75 := -4+a;
 frmMain.nx76 := 4+a;
 frmMain.nx77 := -4+a;
 frmMain.nx78 := 4+a;
 frmMain.nx79 := -4+a;
 frmMain.nx80 := 4+a;
 frmMain.nx81 := -4+a;
 frmMain.nx82 := 4+a;
 frmMain.nx83 := -4+a;
 frmMain.nx84 := 4+a;
 frmMain.nx85 := -4+a;
 frmMain.nx86 := 4+a;
 frmMain.nx87 := -4+a;
 frmMain.nx88 := 4+a;
 frmMain.nx89 := -4+a;
 frmMain.nx90 := -2+a;

frmMain.nx94 :=0+a;
frmMain.nx95 :=-2+a;  //цифры
frmMain.nx96 :=-4+a;  //цифры
frmMain.nx97 :=-6+a;  //цифры
frmMain.nx98 := 2+a;  //цифры
frmMain.nx99 := 4+a;  //цифры
frmMain.nx100 := 6+a;  //цифры
frmMain.nx101 := 8+a;  //цифры
frmMain.nx102 := 10+a;  //цифры
frmMain.nx103 := 12+a;  //цифры

frmMain.nx104 := -8+a;  //буквы
frmMain.nx105 := -8+a;  //буквы
frmMain.nx106 := -8+a;  //буквы
frmMain.nx107 := -8+a;  //буквы
frmMain.nx108 := -8+a;  //буквы
frmMain.nx109 := -8+a;  //буквы
frmMain.nx110 := -8+a;  //буквы
frmMain.nx111 := -8+a;  //буквы
frmMain.nx112 := -8+a;  //буквы
frmMain.nx113 := -8+a;  //буквы

frmMain.nx114 := -6+a;  //корабль
frmMain.nx115 := 0+a;  //цифры
frmMain.nx116 :=-2+a;  //цифры
frmMain.nx117 :=-4+a;  //цифры
frmMain.nx118 :=-6+a;  //цифры
frmMain.nx119 := 2+a;  //цифры
frmMain.nx120 := 4+a;  //цифры
frmMain.nx121 := 6+a;  //цифры
frmMain.nx122 := 8+a;  //цифры
frmMain.nx123 := 10+a;  //цифры
frmMain.nx124 := 12+a;  //цифры
frmMain.nx125 := 0+a;
frmMain.nx126 := 0+a;
frmMain.nx127 := 0+a;
frmMain.nx128 := 2+a;
frmMain.nx129 := -2+a;
frmMain.nx130 := -4+a;
frmMain.nx131 := 4+a;
frmMain.nx132 := -6+a;
frmMain.nx133 := 6+a;
frmMain.nx134 := 8+a;
frmMain.nx135 := -8+a;
frmMain.nx136 := -2+a;
frmMain.nx137 := 2+a;
frmMain.nx138 := -4+a;
frmMain.nx139 := 4+a;
frmMain.nx140 := -2+a;
frmMain.nx141 := 2+a;
frmMain.nx142 := 0+a;
frmMain.nx143 := 2+a;
frmMain.nx144 := -2+a;
frmMain.nx145 := -4+a;
frmMain.nx146 := 4+a;
frmMain.nx147 := 6+a;
frmMain.nx148 := -6+a;
frmMain.nx149 := -6+a;
frmMain.nx150 := 6+a;
frmMain.nx151 := 2+a;
frmMain.nx152 := -2+a;
frmMain.nx153 := 2+a;
frmMain.nx154 := -2+a;
frmMain.nx155 := 0+a;
frmMain.nx156 := 0+a;
frmMain.nx157 := 4+a;
frmMain.nx158 := -4+a;
frmMain.nx159 := -6+a;
frmMain.nx160 := 6+a;
frmMain.nx161 := 4+a;
frmMain.nx162 := -4+a;
frmMain.nx163 := -6+a;
frmMain.nx164 := 6+a;
frmMain.nx165 := 4+a;
frmMain.nx166 := -4+a;
frmMain.nx167 := -6+a;
frmMain.nx168 := 6+a;
frmMain.nx169 := 4+a;
frmMain.nx170 := -4+a;
frmMain.nx171 := -6+a;
frmMain.nx172 := 6+a;
frmMain.nx173 := 4+a;
frmMain.nx174 := -4+a;
frmMain.nx175 := -6+a;
frmMain.nx176 := 6+a;
frmMain.nx177 := 4+a;
frmMain.nx178 := -4+a;
frmMain.nx179 := -6+a;
frmMain.nx180 := 6+a;
 frmMain.nx181 := 4+a;
 frmMain.nx182 := -4+a;
 frmMain.nx183 := -6+a;
 frmMain.nx184 := 6+a;
 frmMain.nx185 := 4+a;
 frmMain.nx186 := -4+a;
 frmMain.nx187 := -6+a;
 frmMain.nx188 := 6+a;
 frmMain.nx189 := -4+a;
 frmMain.nx190 := 4+a;
 frmMain.nx191 := -6+a;
 frmMain.nx192 := 6+a;
 frmMain.nx193 := -4+a;
 frmMain.nx194 := 4+a;
 frmMain.nx195 := -6+a;
 frmMain.nx196 := 6+a;
 frmMain.nx197 := -4+a;
 frmMain.nx198 := 4+a;
 frmMain.nx199 := -6+a;
 frmMain.nx200 := 6+a;
 frmMain.nx201 := -4+a;
 frmMain.nx202 := 4+a;
 frmMain.nx203 := -6+a;
 frmMain.nx204 := 6+a;
 frmMain.nx205 := 6+a;  //корабль
 frmMain.nx206 := 6+a;  //Подлодка
 frmMain.frmGL.Width:=800;
 a:=0;
 frmMain.nz := 0+b;
  frmMain.nz1 := 0+b;
  frmMain.nz2 := 0+b;
 frmMain.nz3 := 1+b;
 frmMain.nz7 := 0+b;
 frmMain.nz8 := 2+b;
 frmMain.nz9 := 2+b;
  frmMain.nz10 := -2+b;
 frmMain.nz11 := -2+b;
 frmMain.nz12 := -2+b;
 frmMain.nz14 := -3+b;
 frmMain.nz15 := -3+b;
 frmMain.nz16 := -4+b;
 frmMain.nz17 := -4+b;
  frmMain.nz18 := -5+b;
 frmMain.nz19 := -5+b;
 frmMain.nz20 := -6+b;
 frmMain.nz21 := -7+b;
 frmMain.nz22 := -7+b;
  frmMain.nz23 := -8+b;
 frmMain.nz24 := -8+b;
  frmMain.nz25 := -9+b;
 frmMain.nz26 := -9+b;
 frmMain.nz27 := -10+b;
  frmMain.nz28 := -10+b;
  frmMain.nz29 := -11+b;
 frmMain.nz30 := -11+b;

// 1

 frmMain.nz31 := -2+b;
 frmMain.nz32 := -2+b;
 frmMain.nz33 := -3+b;
 frmMain.nz34 := -3+b;
 frmMain.nz35 := -4+b;
 frmMain.nz36 := -4+b;
  frmMain.nz37 := -5+b;
 frmMain.nz38 := -5+b;
 frmMain.nz39 := -6+b;
 frmMain.nz40 := -6+b;
 frmMain.nz41 := -7+b;
 frmMain.nz42 := -7+b;
 frmMain.nz43 := -8+b;
 frmMain.nz44 := -8+b;
 frmMain.nz45 := -9+b;  //////////////


 //////////////////////

 frmMain.nz46 := -9+b;
 frmMain.nz47 := -9+b;
 frmMain.nz48 := -10+b;
 frmMain.nz49 := -11+b;
 frmMain.nz50 := -11+b;
 frmMain.nz51 := -2+b;
 frmMain.nz52 :=-2+b;
 frmMain.nz53 := -3+b;
 frmMain.nz54 :=  3+b;
 frmMain.nz55 := -3+b;
 frmMain.nz56 := -4+b;
 frmMain.nz57 := -5+b;
 frmMain.nz58 := -5+b;
 frmMain.nz59 := -6+b;
 frmMain.nz60 := -6+b;
 frmMain.nz61 := -7+b;
 frmMain.nz62 := -7+b;
 frmMain.nz63 := -8+b;
 frmMain.nz64 := -8+b;
 frmMain.nz65 := -9+b;
 frmMain.nz66 := -9+b;
 frmMain.nz67 := -10+b;
 frmMain.nz68 := -10+b;
 frmMain.nz69 := -11+b;
 frmMain.nz70 := -11+b;


  ///3
 ///
 ///
 frmMain.nz71 := -2+b;
 frmMain.nz72 :=-2+b;
 frmMain.nz73 := -3+b;
 frmMain.nz74 :=  -3+b;
 frmMain.nz75 := -4+b;
 frmMain.nz76 := -4+b;
 frmMain.nz77 := -5+b;
 frmMain.nz78 := -5+b;
 frmMain.nz79 := -6+b;
 frmMain.nz80 := -6+b;
 frmMain.nz81 := -7+b;
 frmMain.nz82 := -7+b;
 frmMain.nz83 := -8+b;
 frmMain.nz84 := -8+b;
 frmMain.nz85 := -9+b;
 frmMain.nz86 := -9+b;
 frmMain.nz87 := -10+b;
 frmMain.nz88 := -10+b;
 frmMain.nz89 := -11+b;
 frmMain.nz90 := -2+b;

frmMain.nz94 :=1+b;
frmMain.nz95 :=1+b;  //цифры
frmMain.nz96 :=1+b;  //цифры
frmMain.nz97 :=1+b;  //цифры
frmMain.nz98 := 1+b;  //цифры
frmMain.nz99 := 1+b;  //цифры
frmMain.nz100 := 1+b;  //цифры
frmMain.nz101 := 1+b;  //цифры
frmMain.nz102 := 1+b;  //цифры
frmMain.nz103 := 1+b;  //цифры

frmMain.nz104 := -0+b;  //буквы
frmMain.nz105 := -2+b;  //буквы
frmMain.nz106 := -4+b;  //буквы
frmMain.nz107 := -6+b;  //буквы
frmMain.nz108 := -8+b;  //буквы
frmMain.nz109 := -10+b;  //буквы
frmMain.nz110 := -12+b;  //буквы
frmMain.nz111 := -14+b;  //буквы
frmMain.nz112 := -16+b;  //буквы
frmMain.nz113 := -18+b;  //буквы

frmMain.nz114 := -4+b;  //корабль
frmMain.nz115 := -18+b;  //цифры
frmMain.nz116 :=-18+b;  //цифры
frmMain.nz117 :=-18+b;  //цифры
frmMain.nz118 :=-18+b;  //цифры
frmMain.nz119 := -18+b;  //цифры
frmMain.nz120 := -18+b;  //цифры
frmMain.nz121 := -18+b;  //цифры
frmMain.nz122 := -18+b;  //цифры
frmMain.nz123 := -18+b;  //цифры
frmMain.nz124 := -18+b;  //цифры
frmMain.nz125 := -16+b;
frmMain.nz126 := -14+b;
frmMain.nz127 := -12+b;
frmMain.nz128 := -16+b;
frmMain.nz129 := -16+b;
frmMain.nz130 := -16+b;
frmMain.nz131 := -16+b;
frmMain.nz132 := -16+b;
frmMain.nz133 := -16+b;
frmMain.nz134 := -16+b;
frmMain.nz135 := -16+b;
frmMain.nz136 := -14+b;
frmMain.nz137 := -14+b;
frmMain.nz138 := -14+b;
frmMain.nz139 := -14+b;
frmMain.nz140 := -14+b;
frmMain.nz141 := -15+b;
frmMain.nz142 := -15+b;
frmMain.nz143 := -15+b;
frmMain.nz144 := -15+b;
frmMain.nz145 := -15+b;
frmMain.nz146 := -15+b;
frmMain.nz147 := -15+b;
frmMain.nz148 := -15+b;
frmMain.nz149 := -14+b;
frmMain.nz150 := -14+b;
frmMain.nz151 := -12+b;
frmMain.nz152 := -12+b;
frmMain.nz153 := -13+b;
frmMain.nz154 := -13+b;
frmMain.nz155 := -13+b;
frmMain.nz156 := -6+b;
frmMain.nz157 := -12+b;
frmMain.nz158 := -12+b;
frmMain.nz159 := -12+b;
frmMain.nz160 := -12+b;
frmMain.nz161 := -10+b;
frmMain.nz162 := -10+b;
frmMain.nz163 := -10+b;
frmMain.nz164 := -10+b;
frmMain.nz165 := -8+b;
frmMain.nz166 := -8+b;
frmMain.nz167 := -8+b;
frmMain.nz168 := -8+b;
frmMain.nz169 := -6+b;
frmMain.nz170 := -6+b;
frmMain.nz171 := -6+b;
frmMain.nz172 := -6+b;
frmMain.nz173 := -4+b;
frmMain.nz174 := -4+b;
frmMain.nz175 := -4+b;
frmMain.nz176 := -4+b;
frmMain.nz177 := -2+b;
frmMain.nz178 := -2+b;
frmMain.nz179 := -2+b;
frmMain.nz180 := -2+b;
 frmMain.nz181 := -3+b;
 frmMain.nz182 := -3+b;
 frmMain.nz183 := -3+b;
 frmMain.nz184 := -3+b;
 frmMain.nz185 := -5+b;
 frmMain.nz186 := -5+b;
 frmMain.nz187 := -5+b;
 frmMain.nz188 := -5+b;
 frmMain.nz189 := -7+b;
 frmMain.nz190 := -7+b;
 frmMain.nz191 := -7+b;
 frmMain.nz192 := -7+b;
 frmMain.nz193 := -9+b;
 frmMain.nz194 := -9+b;
 frmMain.nz195 := -9+b;
 frmMain.nz196 := -9+b;
 frmMain.nz197 := -11+b;
 frmMain.nz198 := -11+b;
 frmMain.nz199 := -11+b;
 frmMain.nz200 := -11+b;
 frmMain.nz201 := -13+b;
 frmMain.nz202 := -13+b;
 frmMain.nz203 := -13+b;
 frmMain.nz204 := -13+b;
 frmMain.nz205 := -4+b;  //корабль
 frmMain.nz206 := -8+b;  //Подлодка
 frmMain.frmGL.Width:=800;
 b:=0;

 end;


if (c=2) and (d=5) then
begin
StringGrid1.Cells[c,d]:='1';
a:=a+5;
b:=b+11;
frmMain.nx := 0+a;
  frmMain.nx1 := 0+a;
  frmMain.nx2 := 0+a;
 frmMain.nx3 := 0+a;
 frmMain.nx7 := -1+a;
 frmMain.nx8 := 1+a;
 frmMain.nx9 := -1+a;
  frmMain.nx10 := -2+a;
 frmMain.nx11 := -1+a;
 frmMain.nx12 := 1+a;
 frmMain.nx14 := 1+a;
 frmMain.nx15 := -1+a;
 frmMain.nx16 := -1+a;
 frmMain.nx17 := 1+a;
  frmMain.nx18 := -1+a;
 frmMain.nx19 := 1+a;
 frmMain.nx20 := -1+a;
 frmMain.nx21 := -1+a;
 frmMain.nx22 := 1+a;
  frmMain.nx23 := -1+a;
 frmMain.nx24 := 1+a;
  frmMain.nx25 := 1+a;
 frmMain.nx26 := -1+a;
 frmMain.nx27 := 1+a;
  frmMain.nx28 := -1+a;
  frmMain.nx29 := 1+a;
 frmMain.nx30 := -1+a;

// 1

 frmMain.nx31 := -2+a;
 frmMain.nx32 := 2+a;
 frmMain.nx33 := -2+a;
 frmMain.nx34 :=  2+a;
 frmMain.nx35 := -2+a;
 frmMain.nx36 := 2+a;
  frmMain.nx37 := -2+a;
 frmMain.nx38 := 2+a;
 frmMain.nx39 := -2+a;
 frmMain.nx40 := 2+a;
 frmMain.nx41 := -2+a;
 frmMain.nx42 := 2+a;
 frmMain.nx43 := -2+a;
 frmMain.nx44 := 2+a;
 frmMain.nx45 := -2+a;  //////////////


 //////////////////////

 frmMain.nx46 := -2+a;
 frmMain.nx47 := -2+a;
 frmMain.nx48 := 2+a;
 frmMain.nx49 := -2+a;
 frmMain.nx50 := 2+a;
 frmMain.nx51 := -3+a;
 frmMain.nx52 :=3+a;
 frmMain.nx53 := -3+a;
 frmMain.nx54 :=  3+a;
 frmMain.nx55 := -3+a;
 frmMain.nx56 := 3+a;
 frmMain.nx57 := -3+a;
 frmMain.nx58 := 3+a;
 frmMain.nx59 := -3+a;
 frmMain.nx60 := 3+a;
 frmMain.nx61 := -3+a;
 frmMain.nx62 := 3+a;
 frmMain.nx63 := -3+a;
 frmMain.nx64 := 3+a;
 frmMain.nx65 := -3+a;
 frmMain.nx66 := 3+a;
 frmMain.nx67 := -3+a;
 frmMain.nx68 := 3+a;
 frmMain.nx69 := -3+a;
 frmMain.nx70 := 3+a;


  ///3
 ///
 ///
 frmMain.nx71 := -4+a;
 frmMain.nx72 :=4+a;
 frmMain.nx73 := -4+a;
 frmMain.nx74 :=  4+a;
 frmMain.nx75 := -4+a;
 frmMain.nx76 := 4+a;
 frmMain.nx77 := -4+a;
 frmMain.nx78 := 4+a;
 frmMain.nx79 := -4+a;
 frmMain.nx80 := 4+a;
 frmMain.nx81 := -4+a;
 frmMain.nx82 := 4+a;
 frmMain.nx83 := -4+a;
 frmMain.nx84 := 4+a;
 frmMain.nx85 := -4+a;
 frmMain.nx86 := 4+a;
 frmMain.nx87 := -4+a;
 frmMain.nx88 := 4+a;
 frmMain.nx89 := -4+a;
 frmMain.nx90 := -2+a;

frmMain.nx94 :=0+a;
frmMain.nx95 :=-2+a;  //цифры
frmMain.nx96 :=-4+a;  //цифры
frmMain.nx97 :=-6+a;  //цифры
frmMain.nx98 := 2+a;  //цифры
frmMain.nx99 := 4+a;  //цифры
frmMain.nx100 := 6+a;  //цифры
frmMain.nx101 := 8+a;  //цифры
frmMain.nx102 := 10+a;  //цифры
frmMain.nx103 := 12+a;  //цифры

frmMain.nx104 := -8+a;  //буквы
frmMain.nx105 := -8+a;  //буквы
frmMain.nx106 := -8+a;  //буквы
frmMain.nx107 := -8+a;  //буквы
frmMain.nx108 := -8+a;  //буквы
frmMain.nx109 := -8+a;  //буквы
frmMain.nx110 := -8+a;  //буквы
frmMain.nx111 := -8+a;  //буквы
frmMain.nx112 := -8+a;  //буквы
frmMain.nx113 := -8+a;  //буквы

frmMain.nx114 := -6+a;  //корабль
frmMain.nx115 := 0+a;  //цифры
frmMain.nx116 :=-2+a;  //цифры
frmMain.nx117 :=-4+a;  //цифры
frmMain.nx118 :=-6+a;  //цифры
frmMain.nx119 := 2+a;  //цифры
frmMain.nx120 := 4+a;  //цифры
frmMain.nx121 := 6+a;  //цифры
frmMain.nx122 := 8+a;  //цифры
frmMain.nx123 := 10+a;  //цифры
frmMain.nx124 := 12+a;  //цифры
frmMain.nx125 := 0+a;
frmMain.nx126 := 0+a;
frmMain.nx127 := 0+a;
frmMain.nx128 := 2+a;
frmMain.nx129 := -2+a;
frmMain.nx130 := -4+a;
frmMain.nx131 := 4+a;
frmMain.nx132 := -6+a;
frmMain.nx133 := 6+a;
frmMain.nx134 := 8+a;
frmMain.nx135 := -8+a;
frmMain.nx136 := -2+a;
frmMain.nx137 := 2+a;
frmMain.nx138 := -4+a;
frmMain.nx139 := 4+a;
frmMain.nx140 := -2+a;
frmMain.nx141 := 2+a;
frmMain.nx142 := 0+a;
frmMain.nx143 := 2+a;
frmMain.nx144 := -2+a;
frmMain.nx145 := -4+a;
frmMain.nx146 := 4+a;
frmMain.nx147 := 6+a;
frmMain.nx148 := -6+a;
frmMain.nx149 := -6+a;
frmMain.nx150 := 6+a;
frmMain.nx151 := 2+a;
frmMain.nx152 := -2+a;
frmMain.nx153 := 2+a;
frmMain.nx154 := -2+a;
frmMain.nx155 := 0+a;
frmMain.nx156 := 0+a;
frmMain.nx157 := 4+a;
frmMain.nx158 := -4+a;
frmMain.nx159 := -6+a;
frmMain.nx160 := 6+a;
frmMain.nx161 := 4+a;
frmMain.nx162 := -4+a;
frmMain.nx163 := -6+a;
frmMain.nx164 := 6+a;
frmMain.nx165 := 4+a;
frmMain.nx166 := -4+a;
frmMain.nx167 := -6+a;
frmMain.nx168 := 6+a;
frmMain.nx169 := 4+a;
frmMain.nx170 := -4+a;
frmMain.nx171 := -6+a;
frmMain.nx172 := 6+a;
frmMain.nx173 := 4+a;
frmMain.nx174 := -4+a;
frmMain.nx175 := -6+a;
frmMain.nx176 := 6+a;
frmMain.nx177 := 4+a;
frmMain.nx178 := -4+a;
frmMain.nx179 := -6+a;
frmMain.nx180 := 6+a;
 frmMain.nx181 := 4+a;
 frmMain.nx182 := -4+a;
 frmMain.nx183 := -6+a;
 frmMain.nx184 := 6+a;
 frmMain.nx185 := 4+a;
 frmMain.nx186 := -4+a;
 frmMain.nx187 := -6+a;
 frmMain.nx188 := 6+a;
 frmMain.nx189 := -4+a;
 frmMain.nx190 := 4+a;
 frmMain.nx191 := -6+a;
 frmMain.nx192 := 6+a;
 frmMain.nx193 := -4+a;
 frmMain.nx194 := 4+a;
 frmMain.nx195 := -6+a;
 frmMain.nx196 := 6+a;
 frmMain.nx197 := -4+a;
 frmMain.nx198 := 4+a;
 frmMain.nx199 := -6+a;
 frmMain.nx200 := 6+a;
 frmMain.nx201 := -4+a;
 frmMain.nx202 := 4+a;
 frmMain.nx203 := -6+a;
 frmMain.nx204 := 6+a;
 frmMain.nx205 := 6+a;  //корабль
 frmMain.nx206 := 6+a;  //Подлодка
 frmMain.frmGL.Width:=800;
 a:=0;
 frmMain.nz := 0+b;
  frmMain.nz1 := 0+b;
  frmMain.nz2 := 0+b;
 frmMain.nz3 := 1+b;
 frmMain.nz7 := 0+b;
 frmMain.nz8 := 2+b;
 frmMain.nz9 := 2+b;
  frmMain.nz10 := -2+b;
 frmMain.nz11 := -2+b;
 frmMain.nz12 := -2+b;
 frmMain.nz14 := -3+b;
 frmMain.nz15 := -3+b;
 frmMain.nz16 := -4+b;
 frmMain.nz17 := -4+b;
  frmMain.nz18 := -5+b;
 frmMain.nz19 := -5+b;
 frmMain.nz20 := -6+b;
 frmMain.nz21 := -7+b;
 frmMain.nz22 := -7+b;
  frmMain.nz23 := -8+b;
 frmMain.nz24 := -8+b;
  frmMain.nz25 := -9+b;
 frmMain.nz26 := -9+b;
 frmMain.nz27 := -10+b;
  frmMain.nz28 := -10+b;
  frmMain.nz29 := -11+b;
 frmMain.nz30 := -11+b;

// 1

 frmMain.nz31 := -2+b;
 frmMain.nz32 := -2+b;
 frmMain.nz33 := -3+b;
 frmMain.nz34 := -3+b;
 frmMain.nz35 := -4+b;
 frmMain.nz36 := -4+b;
  frmMain.nz37 := -5+b;
 frmMain.nz38 := -5+b;
 frmMain.nz39 := -6+b;
 frmMain.nz40 := -6+b;
 frmMain.nz41 := -7+b;
 frmMain.nz42 := -7+b;
 frmMain.nz43 := -8+b;
 frmMain.nz44 := -8+b;
 frmMain.nz45 := -9+b;  //////////////


 //////////////////////

 frmMain.nz46 := -9+b;
 frmMain.nz47 := -9+b;
 frmMain.nz48 := -10+b;
 frmMain.nz49 := -11+b;
 frmMain.nz50 := -11+b;
 frmMain.nz51 := -2+b;
 frmMain.nz52 :=-2+b;
 frmMain.nz53 := -3+b;
 frmMain.nz54 :=  3+b;
 frmMain.nz55 := -3+b;
 frmMain.nz56 := -4+b;
 frmMain.nz57 := -5+b;
 frmMain.nz58 := -5+b;
 frmMain.nz59 := -6+b;
 frmMain.nz60 := -6+b;
 frmMain.nz61 := -7+b;
 frmMain.nz62 := -7+b;
 frmMain.nz63 := -8+b;
 frmMain.nz64 := -8+b;
 frmMain.nz65 := -9+b;
 frmMain.nz66 := -9+b;
 frmMain.nz67 := -10+b;
 frmMain.nz68 := -10+b;
 frmMain.nz69 := -11+b;
 frmMain.nz70 := -11+b;


  ///3
 ///
 ///
 frmMain.nz71 := -2+b;
 frmMain.nz72 :=-2+b;
 frmMain.nz73 := -3+b;
 frmMain.nz74 :=  -3+b;
 frmMain.nz75 := -4+b;
 frmMain.nz76 := -4+b;
 frmMain.nz77 := -5+b;
 frmMain.nz78 := -5+b;
 frmMain.nz79 := -6+b;
 frmMain.nz80 := -6+b;
 frmMain.nz81 := -7+b;
 frmMain.nz82 := -7+b;
 frmMain.nz83 := -8+b;
 frmMain.nz84 := -8+b;
 frmMain.nz85 := -9+b;
 frmMain.nz86 := -9+b;
 frmMain.nz87 := -10+b;
 frmMain.nz88 := -10+b;
 frmMain.nz89 := -11+b;
 frmMain.nz90 := -2+b;

frmMain.nz94 :=1+b;
frmMain.nz95 :=1+b;  //цифры
frmMain.nz96 :=1+b;  //цифры
frmMain.nz97 :=1+b;  //цифры
frmMain.nz98 := 1+b;  //цифры
frmMain.nz99 := 1+b;  //цифры
frmMain.nz100 := 1+b;  //цифры
frmMain.nz101 := 1+b;  //цифры
frmMain.nz102 := 1+b;  //цифры
frmMain.nz103 := 1+b;  //цифры

frmMain.nz104 := -0+b;  //буквы
frmMain.nz105 := -2+b;  //буквы
frmMain.nz106 := -4+b;  //буквы
frmMain.nz107 := -6+b;  //буквы
frmMain.nz108 := -8+b;  //буквы
frmMain.nz109 := -10+b;  //буквы
frmMain.nz110 := -12+b;  //буквы
frmMain.nz111 := -14+b;  //буквы
frmMain.nz112 := -16+b;  //буквы
frmMain.nz113 := -18+b;  //буквы

frmMain.nz114 := -4+b;  //корабль
frmMain.nz115 := -18+b;  //цифры
frmMain.nz116 :=-18+b;  //цифры
frmMain.nz117 :=-18+b;  //цифры
frmMain.nz118 :=-18+b;  //цифры
frmMain.nz119 := -18+b;  //цифры
frmMain.nz120 := -18+b;  //цифры
frmMain.nz121 := -18+b;  //цифры
frmMain.nz122 := -18+b;  //цифры
frmMain.nz123 := -18+b;  //цифры
frmMain.nz124 := -18+b;  //цифры
frmMain.nz125 := -16+b;
frmMain.nz126 := -14+b;
frmMain.nz127 := -12+b;
frmMain.nz128 := -16+b;
frmMain.nz129 := -16+b;
frmMain.nz130 := -16+b;
frmMain.nz131 := -16+b;
frmMain.nz132 := -16+b;
frmMain.nz133 := -16+b;
frmMain.nz134 := -16+b;
frmMain.nz135 := -16+b;
frmMain.nz136 := -14+b;
frmMain.nz137 := -14+b;
frmMain.nz138 := -14+b;
frmMain.nz139 := -14+b;
frmMain.nz140 := -14+b;
frmMain.nz141 := -15+b;
frmMain.nz142 := -15+b;
frmMain.nz143 := -15+b;
frmMain.nz144 := -15+b;
frmMain.nz145 := -15+b;
frmMain.nz146 := -15+b;
frmMain.nz147 := -15+b;
frmMain.nz148 := -15+b;
frmMain.nz149 := -14+b;
frmMain.nz150 := -14+b;
frmMain.nz151 := -12+b;
frmMain.nz152 := -12+b;
frmMain.nz153 := -13+b;
frmMain.nz154 := -13+b;
frmMain.nz155 := -13+b;
frmMain.nz156 := -6+b;
frmMain.nz157 := -12+b;
frmMain.nz158 := -12+b;
frmMain.nz159 := -12+b;
frmMain.nz160 := -12+b;
frmMain.nz161 := -10+b;
frmMain.nz162 := -10+b;
frmMain.nz163 := -10+b;
frmMain.nz164 := -10+b;
frmMain.nz165 := -8+b;
frmMain.nz166 := -8+b;
frmMain.nz167 := -8+b;
frmMain.nz168 := -8+b;
frmMain.nz169 := -6+b;
frmMain.nz170 := -6+b;
frmMain.nz171 := -6+b;
frmMain.nz172 := -6+b;
frmMain.nz173 := -4+b;
frmMain.nz174 := -4+b;
frmMain.nz175 := -4+b;
frmMain.nz176 := -4+b;
frmMain.nz177 := -2+b;
frmMain.nz178 := -2+b;
frmMain.nz179 := -2+b;
frmMain.nz180 := -2+b;
 frmMain.nz181 := -3+b;
 frmMain.nz182 := -3+b;
 frmMain.nz183 := -3+b;
 frmMain.nz184 := -3+b;
 frmMain.nz185 := -5+b;
 frmMain.nz186 := -5+b;
 frmMain.nz187 := -5+b;
 frmMain.nz188 := -5+b;
 frmMain.nz189 := -7+b;
 frmMain.nz190 := -7+b;
 frmMain.nz191 := -7+b;
 frmMain.nz192 := -7+b;
 frmMain.nz193 := -9+b;
 frmMain.nz194 := -9+b;
 frmMain.nz195 := -9+b;
 frmMain.nz196 := -9+b;
 frmMain.nz197 := -11+b;
 frmMain.nz198 := -11+b;
 frmMain.nz199 := -11+b;
 frmMain.nz200 := -11+b;
 frmMain.nz201 := -13+b;
 frmMain.nz202 := -13+b;
 frmMain.nz203 := -13+b;
 frmMain.nz204 := -13+b;
 frmMain.nz205 := -4+b;  //корабль
 frmMain.nz206 := -8+b;  //Подлодка
 frmMain.frmGL.Width:=800;
 b:=0;

 end;




if (c=2) and (d=6) then
begin
StringGrid1.Cells[c,d]:='1';
a:=a+5;
b:=b+9;
frmMain.nx := 0+a;
  frmMain.nx1 := 0+a;
  frmMain.nx2 := 0+a;
 frmMain.nx3 := 0+a;
 frmMain.nx7 := -1+a;
 frmMain.nx8 := 1+a;
 frmMain.nx9 := -1+a;
  frmMain.nx10 := -2+a;
 frmMain.nx11 := -1+a;
 frmMain.nx12 := 1+a;
 frmMain.nx14 := 1+a;
 frmMain.nx15 := -1+a;
 frmMain.nx16 := -1+a;
 frmMain.nx17 := 1+a;
  frmMain.nx18 := -1+a;
 frmMain.nx19 := 1+a;
 frmMain.nx20 := -1+a;
 frmMain.nx21 := -1+a;
 frmMain.nx22 := 1+a;
  frmMain.nx23 := -1+a;
 frmMain.nx24 := 1+a;
  frmMain.nx25 := 1+a;
 frmMain.nx26 := -1+a;
 frmMain.nx27 := 1+a;
  frmMain.nx28 := -1+a;
  frmMain.nx29 := 1+a;
 frmMain.nx30 := -1+a;

// 1

 frmMain.nx31 := -2+a;
 frmMain.nx32 := 2+a;
 frmMain.nx33 := -2+a;
 frmMain.nx34 :=  2+a;
 frmMain.nx35 := -2+a;
 frmMain.nx36 := 2+a;
  frmMain.nx37 := -2+a;
 frmMain.nx38 := 2+a;
 frmMain.nx39 := -2+a;
 frmMain.nx40 := 2+a;
 frmMain.nx41 := -2+a;
 frmMain.nx42 := 2+a;
 frmMain.nx43 := -2+a;
 frmMain.nx44 := 2+a;
 frmMain.nx45 := -2+a;  //////////////


 //////////////////////

 frmMain.nx46 := -2+a;
 frmMain.nx47 := -2+a;
 frmMain.nx48 := 2+a;
 frmMain.nx49 := -2+a;
 frmMain.nx50 := 2+a;
 frmMain.nx51 := -3+a;
 frmMain.nx52 :=3+a;
 frmMain.nx53 := -3+a;
 frmMain.nx54 :=  3+a;
 frmMain.nx55 := -3+a;
 frmMain.nx56 := 3+a;
 frmMain.nx57 := -3+a;
 frmMain.nx58 := 3+a;
 frmMain.nx59 := -3+a;
 frmMain.nx60 := 3+a;
 frmMain.nx61 := -3+a;
 frmMain.nx62 := 3+a;
 frmMain.nx63 := -3+a;
 frmMain.nx64 := 3+a;
 frmMain.nx65 := -3+a;
 frmMain.nx66 := 3+a;
 frmMain.nx67 := -3+a;
 frmMain.nx68 := 3+a;
 frmMain.nx69 := -3+a;
 frmMain.nx70 := 3+a;


  ///3
 ///
 ///
 frmMain.nx71 := -4+a;
 frmMain.nx72 :=4+a;
 frmMain.nx73 := -4+a;
 frmMain.nx74 :=  4+a;
 frmMain.nx75 := -4+a;
 frmMain.nx76 := 4+a;
 frmMain.nx77 := -4+a;
 frmMain.nx78 := 4+a;
 frmMain.nx79 := -4+a;
 frmMain.nx80 := 4+a;
 frmMain.nx81 := -4+a;
 frmMain.nx82 := 4+a;
 frmMain.nx83 := -4+a;
 frmMain.nx84 := 4+a;
 frmMain.nx85 := -4+a;
 frmMain.nx86 := 4+a;
 frmMain.nx87 := -4+a;
 frmMain.nx88 := 4+a;
 frmMain.nx89 := -4+a;
 frmMain.nx90 := -2+a;

frmMain.nx94 :=0+a;
frmMain.nx95 :=-2+a;  //цифры
frmMain.nx96 :=-4+a;  //цифры
frmMain.nx97 :=-6+a;  //цифры
frmMain.nx98 := 2+a;  //цифры
frmMain.nx99 := 4+a;  //цифры
frmMain.nx100 := 6+a;  //цифры
frmMain.nx101 := 8+a;  //цифры
frmMain.nx102 := 10+a;  //цифры
frmMain.nx103 := 12+a;  //цифры

frmMain.nx104 := -8+a;  //буквы
frmMain.nx105 := -8+a;  //буквы
frmMain.nx106 := -8+a;  //буквы
frmMain.nx107 := -8+a;  //буквы
frmMain.nx108 := -8+a;  //буквы
frmMain.nx109 := -8+a;  //буквы
frmMain.nx110 := -8+a;  //буквы
frmMain.nx111 := -8+a;  //буквы
frmMain.nx112 := -8+a;  //буквы
frmMain.nx113 := -8+a;  //буквы

frmMain.nx114 := -6+a;  //корабль
frmMain.nx115 := 0+a;  //цифры
frmMain.nx116 :=-2+a;  //цифры
frmMain.nx117 :=-4+a;  //цифры
frmMain.nx118 :=-6+a;  //цифры
frmMain.nx119 := 2+a;  //цифры
frmMain.nx120 := 4+a;  //цифры
frmMain.nx121 := 6+a;  //цифры
frmMain.nx122 := 8+a;  //цифры
frmMain.nx123 := 10+a;  //цифры
frmMain.nx124 := 12+a;  //цифры
frmMain.nx125 := 0+a;
frmMain.nx126 := 0+a;
frmMain.nx127 := 0+a;
frmMain.nx128 := 2+a;
frmMain.nx129 := -2+a;
frmMain.nx130 := -4+a;
frmMain.nx131 := 4+a;
frmMain.nx132 := -6+a;
frmMain.nx133 := 6+a;
frmMain.nx134 := 8+a;
frmMain.nx135 := -8+a;
frmMain.nx136 := -2+a;
frmMain.nx137 := 2+a;
frmMain.nx138 := -4+a;
frmMain.nx139 := 4+a;
frmMain.nx140 := -2+a;
frmMain.nx141 := 2+a;
frmMain.nx142 := 0+a;
frmMain.nx143 := 2+a;
frmMain.nx144 := -2+a;
frmMain.nx145 := -4+a;
frmMain.nx146 := 4+a;
frmMain.nx147 := 6+a;
frmMain.nx148 := -6+a;
frmMain.nx149 := -6+a;
frmMain.nx150 := 6+a;
frmMain.nx151 := 2+a;
frmMain.nx152 := -2+a;
frmMain.nx153 := 2+a;
frmMain.nx154 := -2+a;
frmMain.nx155 := 0+a;
frmMain.nx156 := 0+a;
frmMain.nx157 := 4+a;
frmMain.nx158 := -4+a;
frmMain.nx159 := -6+a;
frmMain.nx160 := 6+a;
frmMain.nx161 := 4+a;
frmMain.nx162 := -4+a;
frmMain.nx163 := -6+a;
frmMain.nx164 := 6+a;
frmMain.nx165 := 4+a;
frmMain.nx166 := -4+a;
frmMain.nx167 := -6+a;
frmMain.nx168 := 6+a;
frmMain.nx169 := 4+a;
frmMain.nx170 := -4+a;
frmMain.nx171 := -6+a;
frmMain.nx172 := 6+a;
frmMain.nx173 := 4+a;
frmMain.nx174 := -4+a;
frmMain.nx175 := -6+a;
frmMain.nx176 := 6+a;
frmMain.nx177 := 4+a;
frmMain.nx178 := -4+a;
frmMain.nx179 := -6+a;
frmMain.nx180 := 6+a;
 frmMain.nx181 := 4+a;
 frmMain.nx182 := -4+a;
 frmMain.nx183 := -6+a;
 frmMain.nx184 := 6+a;
 frmMain.nx185 := 4+a;
 frmMain.nx186 := -4+a;
 frmMain.nx187 := -6+a;
 frmMain.nx188 := 6+a;
 frmMain.nx189 := -4+a;
 frmMain.nx190 := 4+a;
 frmMain.nx191 := -6+a;
 frmMain.nx192 := 6+a;
 frmMain.nx193 := -4+a;
 frmMain.nx194 := 4+a;
 frmMain.nx195 := -6+a;
 frmMain.nx196 := 6+a;
 frmMain.nx197 := -4+a;
 frmMain.nx198 := 4+a;
 frmMain.nx199 := -6+a;
 frmMain.nx200 := 6+a;
 frmMain.nx201 := -4+a;
 frmMain.nx202 := 4+a;
 frmMain.nx203 := -6+a;
 frmMain.nx204 := 6+a;
 frmMain.nx205 := 6+a;  //корабль
 frmMain.nx206 := 6+a;  //Подлодка
 frmMain.frmGL.Width:=800;
 a:=0;
 frmMain.nz := 0+b;
  frmMain.nz1 := 0+b;
  frmMain.nz2 := 0+b;
 frmMain.nz3 := 1+b;
 frmMain.nz7 := 0+b;
 frmMain.nz8 := 2+b;
 frmMain.nz9 := 2+b;
  frmMain.nz10 := -2+b;
 frmMain.nz11 := -2+b;
 frmMain.nz12 := -2+b;
 frmMain.nz14 := -3+b;
 frmMain.nz15 := -3+b;
 frmMain.nz16 := -4+b;
 frmMain.nz17 := -4+b;
  frmMain.nz18 := -5+b;
 frmMain.nz19 := -5+b;
 frmMain.nz20 := -6+b;
 frmMain.nz21 := -7+b;
 frmMain.nz22 := -7+b;
  frmMain.nz23 := -8+b;
 frmMain.nz24 := -8+b;
  frmMain.nz25 := -9+b;
 frmMain.nz26 := -9+b;
 frmMain.nz27 := -10+b;
  frmMain.nz28 := -10+b;
  frmMain.nz29 := -11+b;
 frmMain.nz30 := -11+b;

// 1

 frmMain.nz31 := -2+b;
 frmMain.nz32 := -2+b;
 frmMain.nz33 := -3+b;
 frmMain.nz34 := -3+b;
 frmMain.nz35 := -4+b;
 frmMain.nz36 := -4+b;
  frmMain.nz37 := -5+b;
 frmMain.nz38 := -5+b;
 frmMain.nz39 := -6+b;
 frmMain.nz40 := -6+b;
 frmMain.nz41 := -7+b;
 frmMain.nz42 := -7+b;
 frmMain.nz43 := -8+b;
 frmMain.nz44 := -8+b;
 frmMain.nz45 := -9+b;  //////////////


 //////////////////////

 frmMain.nz46 := -9+b;
 frmMain.nz47 := -9+b;
 frmMain.nz48 := -10+b;
 frmMain.nz49 := -11+b;
 frmMain.nz50 := -11+b;
 frmMain.nz51 := -2+b;
 frmMain.nz52 :=-2+b;
 frmMain.nz53 := -3+b;
 frmMain.nz54 :=  3+b;
 frmMain.nz55 := -3+b;
 frmMain.nz56 := -4+b;
 frmMain.nz57 := -5+b;
 frmMain.nz58 := -5+b;
 frmMain.nz59 := -6+b;
 frmMain.nz60 := -6+b;
 frmMain.nz61 := -7+b;
 frmMain.nz62 := -7+b;
 frmMain.nz63 := -8+b;
 frmMain.nz64 := -8+b;
 frmMain.nz65 := -9+b;
 frmMain.nz66 := -9+b;
 frmMain.nz67 := -10+b;
 frmMain.nz68 := -10+b;
 frmMain.nz69 := -11+b;
 frmMain.nz70 := -11+b;


  ///3
 ///
 ///
 frmMain.nz71 := -2+b;
 frmMain.nz72 :=-2+b;
 frmMain.nz73 := -3+b;
 frmMain.nz74 :=  -3+b;
 frmMain.nz75 := -4+b;
 frmMain.nz76 := -4+b;
 frmMain.nz77 := -5+b;
 frmMain.nz78 := -5+b;
 frmMain.nz79 := -6+b;
 frmMain.nz80 := -6+b;
 frmMain.nz81 := -7+b;
 frmMain.nz82 := -7+b;
 frmMain.nz83 := -8+b;
 frmMain.nz84 := -8+b;
 frmMain.nz85 := -9+b;
 frmMain.nz86 := -9+b;
 frmMain.nz87 := -10+b;
 frmMain.nz88 := -10+b;
 frmMain.nz89 := -11+b;
 frmMain.nz90 := -2+b;

frmMain.nz94 :=1+b;
frmMain.nz95 :=1+b;  //цифры
frmMain.nz96 :=1+b;  //цифры
frmMain.nz97 :=1+b;  //цифры
frmMain.nz98 := 1+b;  //цифры
frmMain.nz99 := 1+b;  //цифры
frmMain.nz100 := 1+b;  //цифры
frmMain.nz101 := 1+b;  //цифры
frmMain.nz102 := 1+b;  //цифры
frmMain.nz103 := 1+b;  //цифры

frmMain.nz104 := -0+b;  //буквы
frmMain.nz105 := -2+b;  //буквы
frmMain.nz106 := -4+b;  //буквы
frmMain.nz107 := -6+b;  //буквы
frmMain.nz108 := -8+b;  //буквы
frmMain.nz109 := -10+b;  //буквы
frmMain.nz110 := -12+b;  //буквы
frmMain.nz111 := -14+b;  //буквы
frmMain.nz112 := -16+b;  //буквы
frmMain.nz113 := -18+b;  //буквы

frmMain.nz114 := -4+b;  //корабль
frmMain.nz115 := -18+b;  //цифры
frmMain.nz116 :=-18+b;  //цифры
frmMain.nz117 :=-18+b;  //цифры
frmMain.nz118 :=-18+b;  //цифры
frmMain.nz119 := -18+b;  //цифры
frmMain.nz120 := -18+b;  //цифры
frmMain.nz121 := -18+b;  //цифры
frmMain.nz122 := -18+b;  //цифры
frmMain.nz123 := -18+b;  //цифры
frmMain.nz124 := -18+b;  //цифры
frmMain.nz125 := -16+b;
frmMain.nz126 := -14+b;
frmMain.nz127 := -12+b;
frmMain.nz128 := -16+b;
frmMain.nz129 := -16+b;
frmMain.nz130 := -16+b;
frmMain.nz131 := -16+b;
frmMain.nz132 := -16+b;
frmMain.nz133 := -16+b;
frmMain.nz134 := -16+b;
frmMain.nz135 := -16+b;
frmMain.nz136 := -14+b;
frmMain.nz137 := -14+b;
frmMain.nz138 := -14+b;
frmMain.nz139 := -14+b;
frmMain.nz140 := -14+b;
frmMain.nz141 := -15+b;
frmMain.nz142 := -15+b;
frmMain.nz143 := -15+b;
frmMain.nz144 := -15+b;
frmMain.nz145 := -15+b;
frmMain.nz146 := -15+b;
frmMain.nz147 := -15+b;
frmMain.nz148 := -15+b;
frmMain.nz149 := -14+b;
frmMain.nz150 := -14+b;
frmMain.nz151 := -12+b;
frmMain.nz152 := -12+b;
frmMain.nz153 := -13+b;
frmMain.nz154 := -13+b;
frmMain.nz155 := -13+b;
frmMain.nz156 := -6+b;
frmMain.nz157 := -12+b;
frmMain.nz158 := -12+b;
frmMain.nz159 := -12+b;
frmMain.nz160 := -12+b;
frmMain.nz161 := -10+b;
frmMain.nz162 := -10+b;
frmMain.nz163 := -10+b;
frmMain.nz164 := -10+b;
frmMain.nz165 := -8+b;
frmMain.nz166 := -8+b;
frmMain.nz167 := -8+b;
frmMain.nz168 := -8+b;
frmMain.nz169 := -6+b;
frmMain.nz170 := -6+b;
frmMain.nz171 := -6+b;
frmMain.nz172 := -6+b;
frmMain.nz173 := -4+b;
frmMain.nz174 := -4+b;
frmMain.nz175 := -4+b;
frmMain.nz176 := -4+b;
frmMain.nz177 := -2+b;
frmMain.nz178 := -2+b;
frmMain.nz179 := -2+b;
frmMain.nz180 := -2+b;
 frmMain.nz181 := -3+b;
 frmMain.nz182 := -3+b;
 frmMain.nz183 := -3+b;
 frmMain.nz184 := -3+b;
 frmMain.nz185 := -5+b;
 frmMain.nz186 := -5+b;
 frmMain.nz187 := -5+b;
 frmMain.nz188 := -5+b;
 frmMain.nz189 := -7+b;
 frmMain.nz190 := -7+b;
 frmMain.nz191 := -7+b;
 frmMain.nz192 := -7+b;
 frmMain.nz193 := -9+b;
 frmMain.nz194 := -9+b;
 frmMain.nz195 := -9+b;
 frmMain.nz196 := -9+b;
 frmMain.nz197 := -11+b;
 frmMain.nz198 := -11+b;
 frmMain.nz199 := -11+b;
 frmMain.nz200 := -11+b;
 frmMain.nz201 := -13+b;
 frmMain.nz202 := -13+b;
 frmMain.nz203 := -13+b;
 frmMain.nz204 := -13+b;
 frmMain.nz205 := -4+b;  //корабль
 frmMain.nz206 := -8+b;  //Подлодка
 frmMain.frmGL.Width:=800;
 b:=0;

 end;



if (c=2) and (d=7) then
begin
StringGrid1.Cells[c,d]:='1';
a:=a+5;
b:=b+7;
frmMain.nx := 0+a;
  frmMain.nx1 := 0+a;
  frmMain.nx2 := 0+a;
 frmMain.nx3 := 0+a;
 frmMain.nx7 := -1+a;
 frmMain.nx8 := 1+a;
 frmMain.nx9 := -1+a;
  frmMain.nx10 := -2+a;
 frmMain.nx11 := -1+a;
 frmMain.nx12 := 1+a;
 frmMain.nx14 := 1+a;
 frmMain.nx15 := -1+a;
 frmMain.nx16 := -1+a;
 frmMain.nx17 := 1+a;
  frmMain.nx18 := -1+a;
 frmMain.nx19 := 1+a;
 frmMain.nx20 := -1+a;
 frmMain.nx21 := -1+a;
 frmMain.nx22 := 1+a;
  frmMain.nx23 := -1+a;
 frmMain.nx24 := 1+a;
  frmMain.nx25 := 1+a;
 frmMain.nx26 := -1+a;
 frmMain.nx27 := 1+a;
  frmMain.nx28 := -1+a;
  frmMain.nx29 := 1+a;
 frmMain.nx30 := -1+a;

// 1

 frmMain.nx31 := -2+a;
 frmMain.nx32 := 2+a;
 frmMain.nx33 := -2+a;
 frmMain.nx34 :=  2+a;
 frmMain.nx35 := -2+a;
 frmMain.nx36 := 2+a;
  frmMain.nx37 := -2+a;
 frmMain.nx38 := 2+a;
 frmMain.nx39 := -2+a;
 frmMain.nx40 := 2+a;
 frmMain.nx41 := -2+a;
 frmMain.nx42 := 2+a;
 frmMain.nx43 := -2+a;
 frmMain.nx44 := 2+a;
 frmMain.nx45 := -2+a;  //////////////


 //////////////////////

 frmMain.nx46 := -2+a;
 frmMain.nx47 := -2+a;
 frmMain.nx48 := 2+a;
 frmMain.nx49 := -2+a;
 frmMain.nx50 := 2+a;
 frmMain.nx51 := -3+a;
 frmMain.nx52 :=3+a;
 frmMain.nx53 := -3+a;
 frmMain.nx54 :=  3+a;
 frmMain.nx55 := -3+a;
 frmMain.nx56 := 3+a;
 frmMain.nx57 := -3+a;
 frmMain.nx58 := 3+a;
 frmMain.nx59 := -3+a;
 frmMain.nx60 := 3+a;
 frmMain.nx61 := -3+a;
 frmMain.nx62 := 3+a;
 frmMain.nx63 := -3+a;
 frmMain.nx64 := 3+a;
 frmMain.nx65 := -3+a;
 frmMain.nx66 := 3+a;
 frmMain.nx67 := -3+a;
 frmMain.nx68 := 3+a;
 frmMain.nx69 := -3+a;
 frmMain.nx70 := 3+a;


  ///3
 ///
 ///
 frmMain.nx71 := -4+a;
 frmMain.nx72 :=4+a;
 frmMain.nx73 := -4+a;
 frmMain.nx74 :=  4+a;
 frmMain.nx75 := -4+a;
 frmMain.nx76 := 4+a;
 frmMain.nx77 := -4+a;
 frmMain.nx78 := 4+a;
 frmMain.nx79 := -4+a;
 frmMain.nx80 := 4+a;
 frmMain.nx81 := -4+a;
 frmMain.nx82 := 4+a;
 frmMain.nx83 := -4+a;
 frmMain.nx84 := 4+a;
 frmMain.nx85 := -4+a;
 frmMain.nx86 := 4+a;
 frmMain.nx87 := -4+a;
 frmMain.nx88 := 4+a;
 frmMain.nx89 := -4+a;
 frmMain.nx90 := -2+a;

frmMain.nx94 :=0+a;
frmMain.nx95 :=-2+a;  //цифры
frmMain.nx96 :=-4+a;  //цифры
frmMain.nx97 :=-6+a;  //цифры
frmMain.nx98 := 2+a;  //цифры
frmMain.nx99 := 4+a;  //цифры
frmMain.nx100 := 6+a;  //цифры
frmMain.nx101 := 8+a;  //цифры
frmMain.nx102 := 10+a;  //цифры
frmMain.nx103 := 12+a;  //цифры

frmMain.nx104 := -8+a;  //буквы
frmMain.nx105 := -8+a;  //буквы
frmMain.nx106 := -8+a;  //буквы
frmMain.nx107 := -8+a;  //буквы
frmMain.nx108 := -8+a;  //буквы
frmMain.nx109 := -8+a;  //буквы
frmMain.nx110 := -8+a;  //буквы
frmMain.nx111 := -8+a;  //буквы
frmMain.nx112 := -8+a;  //буквы
frmMain.nx113 := -8+a;  //буквы

frmMain.nx114 := -6+a;  //корабль
frmMain.nx115 := 0+a;  //цифры
frmMain.nx116 :=-2+a;  //цифры
frmMain.nx117 :=-4+a;  //цифры
frmMain.nx118 :=-6+a;  //цифры
frmMain.nx119 := 2+a;  //цифры
frmMain.nx120 := 4+a;  //цифры
frmMain.nx121 := 6+a;  //цифры
frmMain.nx122 := 8+a;  //цифры
frmMain.nx123 := 10+a;  //цифры
frmMain.nx124 := 12+a;  //цифры
frmMain.nx125 := 0+a;
frmMain.nx126 := 0+a;
frmMain.nx127 := 0+a;
frmMain.nx128 := 2+a;
frmMain.nx129 := -2+a;
frmMain.nx130 := -4+a;
frmMain.nx131 := 4+a;
frmMain.nx132 := -6+a;
frmMain.nx133 := 6+a;
frmMain.nx134 := 8+a;
frmMain.nx135 := -8+a;
frmMain.nx136 := -2+a;
frmMain.nx137 := 2+a;
frmMain.nx138 := -4+a;
frmMain.nx139 := 4+a;
frmMain.nx140 := -2+a;
frmMain.nx141 := 2+a;
frmMain.nx142 := 0+a;
frmMain.nx143 := 2+a;
frmMain.nx144 := -2+a;
frmMain.nx145 := -4+a;
frmMain.nx146 := 4+a;
frmMain.nx147 := 6+a;
frmMain.nx148 := -6+a;
frmMain.nx149 := -6+a;
frmMain.nx150 := 6+a;
frmMain.nx151 := 2+a;
frmMain.nx152 := -2+a;
frmMain.nx153 := 2+a;
frmMain.nx154 := -2+a;
frmMain.nx155 := 0+a;
frmMain.nx156 := 0+a;
frmMain.nx157 := 4+a;
frmMain.nx158 := -4+a;
frmMain.nx159 := -6+a;
frmMain.nx160 := 6+a;
frmMain.nx161 := 4+a;
frmMain.nx162 := -4+a;
frmMain.nx163 := -6+a;
frmMain.nx164 := 6+a;
frmMain.nx165 := 4+a;
frmMain.nx166 := -4+a;
frmMain.nx167 := -6+a;
frmMain.nx168 := 6+a;
frmMain.nx169 := 4+a;
frmMain.nx170 := -4+a;
frmMain.nx171 := -6+a;
frmMain.nx172 := 6+a;
frmMain.nx173 := 4+a;
frmMain.nx174 := -4+a;
frmMain.nx175 := -6+a;
frmMain.nx176 := 6+a;
frmMain.nx177 := 4+a;
frmMain.nx178 := -4+a;
frmMain.nx179 := -6+a;
frmMain.nx180 := 6+a;
 frmMain.nx181 := 4+a;
 frmMain.nx182 := -4+a;
 frmMain.nx183 := -6+a;
 frmMain.nx184 := 6+a;
 frmMain.nx185 := 4+a;
 frmMain.nx186 := -4+a;
 frmMain.nx187 := -6+a;
 frmMain.nx188 := 6+a;
 frmMain.nx189 := -4+a;
 frmMain.nx190 := 4+a;
 frmMain.nx191 := -6+a;
 frmMain.nx192 := 6+a;
 frmMain.nx193 := -4+a;
 frmMain.nx194 := 4+a;
 frmMain.nx195 := -6+a;
 frmMain.nx196 := 6+a;
 frmMain.nx197 := -4+a;
 frmMain.nx198 := 4+a;
 frmMain.nx199 := -6+a;
 frmMain.nx200 := 6+a;
 frmMain.nx201 := -4+a;
 frmMain.nx202 := 4+a;
 frmMain.nx203 := -6+a;
 frmMain.nx204 := 6+a;
 frmMain.nx205 := 6+a;  //корабль
 frmMain.nx206 := 6+a;  //Подлодка
 frmMain.frmGL.Width:=800;
 a:=0;
 frmMain.nz := 0+b;
  frmMain.nz1 := 0+b;
  frmMain.nz2 := 0+b;
 frmMain.nz3 := 1+b;
 frmMain.nz7 := 0+b;
 frmMain.nz8 := 2+b;
 frmMain.nz9 := 2+b;
  frmMain.nz10 := -2+b;
 frmMain.nz11 := -2+b;
 frmMain.nz12 := -2+b;
 frmMain.nz14 := -3+b;
 frmMain.nz15 := -3+b;
 frmMain.nz16 := -4+b;
 frmMain.nz17 := -4+b;
  frmMain.nz18 := -5+b;
 frmMain.nz19 := -5+b;
 frmMain.nz20 := -6+b;
 frmMain.nz21 := -7+b;
 frmMain.nz22 := -7+b;
  frmMain.nz23 := -8+b;
 frmMain.nz24 := -8+b;
  frmMain.nz25 := -9+b;
 frmMain.nz26 := -9+b;
 frmMain.nz27 := -10+b;
  frmMain.nz28 := -10+b;
  frmMain.nz29 := -11+b;
 frmMain.nz30 := -11+b;

// 1

 frmMain.nz31 := -2+b;
 frmMain.nz32 := -2+b;
 frmMain.nz33 := -3+b;
 frmMain.nz34 := -3+b;
 frmMain.nz35 := -4+b;
 frmMain.nz36 := -4+b;
  frmMain.nz37 := -5+b;
 frmMain.nz38 := -5+b;
 frmMain.nz39 := -6+b;
 frmMain.nz40 := -6+b;
 frmMain.nz41 := -7+b;
 frmMain.nz42 := -7+b;
 frmMain.nz43 := -8+b;
 frmMain.nz44 := -8+b;
 frmMain.nz45 := -9+b;  //////////////


 //////////////////////

 frmMain.nz46 := -9+b;
 frmMain.nz47 := -9+b;
 frmMain.nz48 := -10+b;
 frmMain.nz49 := -11+b;
 frmMain.nz50 := -11+b;
 frmMain.nz51 := -2+b;
 frmMain.nz52 :=-2+b;
 frmMain.nz53 := -3+b;
 frmMain.nz54 :=  3+b;
 frmMain.nz55 := -3+b;
 frmMain.nz56 := -4+b;
 frmMain.nz57 := -5+b;
 frmMain.nz58 := -5+b;
 frmMain.nz59 := -6+b;
 frmMain.nz60 := -6+b;
 frmMain.nz61 := -7+b;
 frmMain.nz62 := -7+b;
 frmMain.nz63 := -8+b;
 frmMain.nz64 := -8+b;
 frmMain.nz65 := -9+b;
 frmMain.nz66 := -9+b;
 frmMain.nz67 := -10+b;
 frmMain.nz68 := -10+b;
 frmMain.nz69 := -11+b;
 frmMain.nz70 := -11+b;


  ///3
 ///
 ///
 frmMain.nz71 := -2+b;
 frmMain.nz72 :=-2+b;
 frmMain.nz73 := -3+b;
 frmMain.nz74 :=  -3+b;
 frmMain.nz75 := -4+b;
 frmMain.nz76 := -4+b;
 frmMain.nz77 := -5+b;
 frmMain.nz78 := -5+b;
 frmMain.nz79 := -6+b;
 frmMain.nz80 := -6+b;
 frmMain.nz81 := -7+b;
 frmMain.nz82 := -7+b;
 frmMain.nz83 := -8+b;
 frmMain.nz84 := -8+b;
 frmMain.nz85 := -9+b;
 frmMain.nz86 := -9+b;
 frmMain.nz87 := -10+b;
 frmMain.nz88 := -10+b;
 frmMain.nz89 := -11+b;
 frmMain.nz90 := -2+b;

frmMain.nz94 :=1+b;
frmMain.nz95 :=1+b;  //цифры
frmMain.nz96 :=1+b;  //цифры
frmMain.nz97 :=1+b;  //цифры
frmMain.nz98 := 1+b;  //цифры
frmMain.nz99 := 1+b;  //цифры
frmMain.nz100 := 1+b;  //цифры
frmMain.nz101 := 1+b;  //цифры
frmMain.nz102 := 1+b;  //цифры
frmMain.nz103 := 1+b;  //цифры

frmMain.nz104 := -0+b;  //буквы
frmMain.nz105 := -2+b;  //буквы
frmMain.nz106 := -4+b;  //буквы
frmMain.nz107 := -6+b;  //буквы
frmMain.nz108 := -8+b;  //буквы
frmMain.nz109 := -10+b;  //буквы
frmMain.nz110 := -12+b;  //буквы
frmMain.nz111 := -14+b;  //буквы
frmMain.nz112 := -16+b;  //буквы
frmMain.nz113 := -18+b;  //буквы

frmMain.nz114 := -4+b;  //корабль
frmMain.nz115 := -18+b;  //цифры
frmMain.nz116 :=-18+b;  //цифры
frmMain.nz117 :=-18+b;  //цифры
frmMain.nz118 :=-18+b;  //цифры
frmMain.nz119 := -18+b;  //цифры
frmMain.nz120 := -18+b;  //цифры
frmMain.nz121 := -18+b;  //цифры
frmMain.nz122 := -18+b;  //цифры
frmMain.nz123 := -18+b;  //цифры
frmMain.nz124 := -18+b;  //цифры
frmMain.nz125 := -16+b;
frmMain.nz126 := -14+b;
frmMain.nz127 := -12+b;
frmMain.nz128 := -16+b;
frmMain.nz129 := -16+b;
frmMain.nz130 := -16+b;
frmMain.nz131 := -16+b;
frmMain.nz132 := -16+b;
frmMain.nz133 := -16+b;
frmMain.nz134 := -16+b;
frmMain.nz135 := -16+b;
frmMain.nz136 := -14+b;
frmMain.nz137 := -14+b;
frmMain.nz138 := -14+b;
frmMain.nz139 := -14+b;
frmMain.nz140 := -14+b;
frmMain.nz141 := -15+b;
frmMain.nz142 := -15+b;
frmMain.nz143 := -15+b;
frmMain.nz144 := -15+b;
frmMain.nz145 := -15+b;
frmMain.nz146 := -15+b;
frmMain.nz147 := -15+b;
frmMain.nz148 := -15+b;
frmMain.nz149 := -14+b;
frmMain.nz150 := -14+b;
frmMain.nz151 := -12+b;
frmMain.nz152 := -12+b;
frmMain.nz153 := -13+b;
frmMain.nz154 := -13+b;
frmMain.nz155 := -13+b;
frmMain.nz156 := -6+b;
frmMain.nz157 := -12+b;
frmMain.nz158 := -12+b;
frmMain.nz159 := -12+b;
frmMain.nz160 := -12+b;
frmMain.nz161 := -10+b;
frmMain.nz162 := -10+b;
frmMain.nz163 := -10+b;
frmMain.nz164 := -10+b;
frmMain.nz165 := -8+b;
frmMain.nz166 := -8+b;
frmMain.nz167 := -8+b;
frmMain.nz168 := -8+b;
frmMain.nz169 := -6+b;
frmMain.nz170 := -6+b;
frmMain.nz171 := -6+b;
frmMain.nz172 := -6+b;
frmMain.nz173 := -4+b;
frmMain.nz174 := -4+b;
frmMain.nz175 := -4+b;
frmMain.nz176 := -4+b;
frmMain.nz177 := -2+b;
frmMain.nz178 := -2+b;
frmMain.nz179 := -2+b;
frmMain.nz180 := -2+b;
 frmMain.nz181 := -3+b;
 frmMain.nz182 := -3+b;
 frmMain.nz183 := -3+b;
 frmMain.nz184 := -3+b;
 frmMain.nz185 := -5+b;
 frmMain.nz186 := -5+b;
 frmMain.nz187 := -5+b;
 frmMain.nz188 := -5+b;
 frmMain.nz189 := -7+b;
 frmMain.nz190 := -7+b;
 frmMain.nz191 := -7+b;
 frmMain.nz192 := -7+b;
 frmMain.nz193 := -9+b;
 frmMain.nz194 := -9+b;
 frmMain.nz195 := -9+b;
 frmMain.nz196 := -9+b;
 frmMain.nz197 := -11+b;
 frmMain.nz198 := -11+b;
 frmMain.nz199 := -11+b;
 frmMain.nz200 := -11+b;
 frmMain.nz201 := -13+b;
 frmMain.nz202 := -13+b;
 frmMain.nz203 := -13+b;
 frmMain.nz204 := -13+b;
 frmMain.nz205 := -4+b;  //корабль
 frmMain.nz206 := -8+b;  //Подлодка
 frmMain.frmGL.Width:=800;
 b:=0;

 end;




   if (c=2) and (d=8) then
begin
StringGrid1.Cells[c,d]:='1';
c:=1; d:=8;

StringGrid1.Cells[c,d]:='d';
c:=2; d:=8;
a:=a+5;
b:=b+5;
korabley:=korabley+1;
label2.Caption:=inttostr(korabley);
ochkofnabrano:=ochkofnabrano+200;
label6.Caption:=inttostr(ochkofnabrano);
frmMain.nx := 0+a;
  frmMain.nx1 := 0+a;
  frmMain.nx2 := 0+a;
 frmMain.nx3 := 0+a;
 frmMain.nx7 := -1+a;
 frmMain.nx8 := 1+a;
 frmMain.nx9 := -1+a;
  frmMain.nx10 := -2+a;
 frmMain.nx11 := -1+a;
 frmMain.nx12 := 1+a;
 frmMain.nx14 := 1+a;
 frmMain.nx15 := -1+a;
 frmMain.nx16 := -1+a;
 frmMain.nx17 := 1+a;
  frmMain.nx18 := -1+a;
 frmMain.nx19 := 1+a;
 frmMain.nx20 := -1+a;
 frmMain.nx21 := -1+a;
 frmMain.nx22 := 1+a;
  frmMain.nx23 := -1+a;
 frmMain.nx24 := 1+a;
  frmMain.nx25 := 1+a;
 frmMain.nx26 := -1+a;
 frmMain.nx27 := 1+a;
  frmMain.nx28 := -1+a;
  frmMain.nx29 := 1+a;
 frmMain.nx30 := -1+a;

// 1

 frmMain.nx31 := -2+a;
 frmMain.nx32 := 2+a;
 frmMain.nx33 := -2+a;
 frmMain.nx34 :=  2+a;
 frmMain.nx35 := -2+a;
 frmMain.nx36 := 2+a;
  frmMain.nx37 := -2+a;
 frmMain.nx38 := 2+a;
 frmMain.nx39 := -2+a;
 frmMain.nx40 := 2+a;
 frmMain.nx41 := -2+a;
 frmMain.nx42 := 2+a;
 frmMain.nx43 := -2+a;
 frmMain.nx44 := 2+a;
 frmMain.nx45 := -2+a;  //////////////


 //////////////////////

 frmMain.nx46 := -2+a;
 frmMain.nx47 := -2+a;
 frmMain.nx48 := 2+a;
 frmMain.nx49 := -2+a;
 frmMain.nx50 := 2+a;
 frmMain.nx51 := -3+a;
 frmMain.nx52 :=3+a;
 frmMain.nx53 := -3+a;
 frmMain.nx54 :=  3+a;
 frmMain.nx55 := -3+a;
 frmMain.nx56 := 3+a;
 frmMain.nx57 := -3+a;
 frmMain.nx58 := 3+a;
 frmMain.nx59 := -3+a;
 frmMain.nx60 := 3+a;
 frmMain.nx61 := -3+a;
 frmMain.nx62 := 3+a;
 frmMain.nx63 := -3+a;
 frmMain.nx64 := 3+a;
 frmMain.nx65 := -3+a;
 frmMain.nx66 := 3+a;
 frmMain.nx67 := -3+a;
 frmMain.nx68 := 3+a;
 frmMain.nx69 := -3+a;
 frmMain.nx70 := 3+a;


  ///3
 ///
 ///
 frmMain.nx71 := -4+a;
 frmMain.nx72 :=4+a;
 frmMain.nx73 := -4+a;
 frmMain.nx74 :=  4+a;
 frmMain.nx75 := -4+a;
 frmMain.nx76 := 4+a;
 frmMain.nx77 := -4+a;
 frmMain.nx78 := 4+a;
 frmMain.nx79 := -4+a;
 frmMain.nx80 := 4+a;
 frmMain.nx81 := -4+a;
 frmMain.nx82 := 4+a;
 frmMain.nx83 := -4+a;
 frmMain.nx84 := 4+a;
 frmMain.nx85 := -4+a;
 frmMain.nx86 := 4+a;
 frmMain.nx87 := -4+a;
 frmMain.nx88 := 4+a;
 frmMain.nx89 := -4+a;
 frmMain.nx90 := -2+a;

frmMain.nx94 :=0+a;
frmMain.nx95 :=-2+a;  //цифры
frmMain.nx96 :=-4+a;  //цифры
frmMain.nx97 :=-6+a;  //цифры
frmMain.nx98 := 2+a;  //цифры
frmMain.nx99 := 4+a;  //цифры
frmMain.nx100 := 6+a;  //цифры
frmMain.nx101 := 8+a;  //цифры
frmMain.nx102 := 10+a;  //цифры
frmMain.nx103 := 12+a;  //цифры

frmMain.nx104 := -8+a;  //буквы
frmMain.nx105 := -8+a;  //буквы
frmMain.nx106 := -8+a;  //буквы
frmMain.nx107 := -8+a;  //буквы
frmMain.nx108 := -8+a;  //буквы
frmMain.nx109 := -8+a;  //буквы
frmMain.nx110 := -8+a;  //буквы
frmMain.nx111 := -8+a;  //буквы
frmMain.nx112 := -8+a;  //буквы
frmMain.nx113 := -8+a;  //буквы

frmMain.nx114 := -6+a;  //корабль
frmMain.nx115 := 0+a;  //цифры
frmMain.nx116 :=-2+a;  //цифры
frmMain.nx117 :=-4+a;  //цифры
frmMain.nx118 :=-6+a;  //цифры
frmMain.nx119 := 2+a;  //цифры
frmMain.nx120 := 4+a;  //цифры
frmMain.nx121 := 6+a;  //цифры
frmMain.nx122 := 8+a;  //цифры
frmMain.nx123 := 10+a;  //цифры
frmMain.nx124 := 12+a;  //цифры
frmMain.nx125 := 0+a;
frmMain.nx126 := 0+a;
frmMain.nx127 := 0+a;
frmMain.nx128 := 2+a;
frmMain.nx129 := -2+a;
frmMain.nx130 := -4+a;
frmMain.nx131 := 4+a;
frmMain.nx132 := -6+a;
frmMain.nx133 := 6+a;
frmMain.nx134 := 8+a;
frmMain.nx135 := -8+a;
frmMain.nx136 := -2+a;
frmMain.nx137 := 2+a;
frmMain.nx138 := -4+a;
frmMain.nx139 := 4+a;
frmMain.nx140 := -2+a;
frmMain.nx141 := 2+a;
frmMain.nx142 := 0+a;
frmMain.nx143 := 2+a;
frmMain.nx144 := -2+a;
frmMain.nx145 := -4+a;
frmMain.nx146 := 4+a;
frmMain.nx147 := 6+a;
frmMain.nx148 := -6+a;
frmMain.nx149 := -6+a;
frmMain.nx150 := 6+a;
frmMain.nx151 := 2+a;
frmMain.nx152 := -2+a;
frmMain.nx153 := 2+a;
frmMain.nx154 := -2+a;
frmMain.nx155 := 0+a;
frmMain.nx156 := 0+a;
frmMain.nx157 := 4+a;
frmMain.nx158 := -4+a;
frmMain.nx159 := -6+a;
frmMain.nx160 := 6+a;
frmMain.nx161 := 4+a;
frmMain.nx162 := -4+a;
frmMain.nx163 := -6+a;
frmMain.nx164 := 6+a;
frmMain.nx165 := 4+a;
frmMain.nx166 := -4+a;
frmMain.nx167 := -6+a;
frmMain.nx168 := 6+a;
frmMain.nx169 := 4+a;
frmMain.nx170 := -4+a;
frmMain.nx171 := -6+a;
frmMain.nx172 := 6+a;
frmMain.nx173 := 4+a;
frmMain.nx174 := -4+a;
frmMain.nx175 := -6+a;
frmMain.nx176 := 6+a;
frmMain.nx177 := 4+a;
frmMain.nx178 := -4+a;
frmMain.nx179 := -6+a;
frmMain.nx180 := 6+a;
 frmMain.nx181 := 4+a;
 frmMain.nx182 := -4+a;
 frmMain.nx183 := -6+a;
 frmMain.nx184 := 6+a;
 frmMain.nx185 := 4+a;
 frmMain.nx186 := -4+a;
 frmMain.nx187 := -6+a;
 frmMain.nx188 := 6+a;
 frmMain.nx189 := -4+a;
 frmMain.nx190 := 4+a;
 frmMain.nx191 := -6+a;
 frmMain.nx192 := 6+a;
 frmMain.nx193 := -4+a;
 frmMain.nx194 := 4+a;
 frmMain.nx195 := -6+a;
 frmMain.nx196 := 6+a;
 frmMain.nx197 := -4+a;
 frmMain.nx198 := 4+a;
 frmMain.nx199 := -6+a;
 frmMain.nx200 := 6+a;
 frmMain.nx201 := -4+a;
 frmMain.nx202 := 4+a;
 frmMain.nx203 := -6+a;
 frmMain.nx204 := 6+a;
 frmMain.nx205 := 6+a;  //корабль
 frmMain.nx206 := 6+a;  //Подлодка
 frmMain.frmGL.Width:=800;
 a:=0;
 frmMain.nz := 0+b;
  frmMain.nz1 := 0+b;
  frmMain.nz2 := 0+b;
 frmMain.nz3 := 1+b;
 frmMain.nz7 := 0+b;
 frmMain.nz8 := 2+b;
 frmMain.nz9 := 2+b;
  frmMain.nz10 := -2+b;
 frmMain.nz11 := -2+b;
 frmMain.nz12 := -2+b;
 frmMain.nz14 := -3+b;
 frmMain.nz15 := -3+b;
 frmMain.nz16 := -4+b;
 frmMain.nz17 := -4+b;
  frmMain.nz18 := -5+b;
 frmMain.nz19 := -5+b;
 frmMain.nz20 := -6+b;
 frmMain.nz21 := -7+b;
 frmMain.nz22 := -7+b;
  frmMain.nz23 := -8+b;
 frmMain.nz24 := -8+b;
  frmMain.nz25 := -9+b;
 frmMain.nz26 := -9+b;
 frmMain.nz27 := -10+b;
  frmMain.nz28 := -10+b;
  frmMain.nz29 := -11+b;
 frmMain.nz30 := -11+b;

// 1

 frmMain.nz31 := -2+b;
 frmMain.nz32 := -2+b;
 frmMain.nz33 := -3+b;
 frmMain.nz34 := -3+b;
 frmMain.nz35 := -4+b;
 frmMain.nz36 := -4+b;
  frmMain.nz37 := -5+b;
 frmMain.nz38 := -5+b;
 frmMain.nz39 := -6+b;
 frmMain.nz40 := -6+b;
 frmMain.nz41 := -7+b;
 frmMain.nz42 := -7+b;
 frmMain.nz43 := -8+b;
 frmMain.nz44 := -8+b;
 frmMain.nz45 := -9+b;  //////////////


 //////////////////////

 frmMain.nz46 := -9+b;
 frmMain.nz47 := -9+b;
 frmMain.nz48 := -10+b;
 frmMain.nz49 := -11+b;
 frmMain.nz50 := -11+b;
 frmMain.nz51 := -2+b;
 frmMain.nz52 :=-2+b;
 frmMain.nz53 := -3+b;
 frmMain.nz54 :=  3+b;
 frmMain.nz55 := -3+b;
 frmMain.nz56 := -4+b;
 frmMain.nz57 := -5+b;
 frmMain.nz58 := -5+b;
 frmMain.nz59 := -6+b;
 frmMain.nz60 := -6+b;
 frmMain.nz61 := -7+b;
 frmMain.nz62 := -7+b;
 frmMain.nz63 := -8+b;
 frmMain.nz64 := -8+b;
 frmMain.nz65 := -9+b;
 frmMain.nz66 := -9+b;
 frmMain.nz67 := -10+b;
 frmMain.nz68 := -10+b;
 frmMain.nz69 := -11+b;
 frmMain.nz70 := -11+b;


  ///3
 ///
 ///
 frmMain.nz71 := -2+b;
 frmMain.nz72 :=-2+b;
 frmMain.nz73 := -3+b;
 frmMain.nz74 :=  -3+b;
 frmMain.nz75 := -4+b;
 frmMain.nz76 := -4+b;
 frmMain.nz77 := -5+b;
 frmMain.nz78 := -5+b;
 frmMain.nz79 := -6+b;
 frmMain.nz80 := -6+b;
 frmMain.nz81 := -7+b;
 frmMain.nz82 := -7+b;
 frmMain.nz83 := -8+b;
 frmMain.nz84 := -8+b;
 frmMain.nz85 := -9+b;
 frmMain.nz86 := -9+b;
 frmMain.nz87 := -10+b;
 frmMain.nz88 := -10+b;
 frmMain.nz89 := -11+b;
 frmMain.nz90 := -2+b;

frmMain.nz94 :=1+b;
frmMain.nz95 :=1+b;  //цифры
frmMain.nz96 :=1+b;  //цифры
frmMain.nz97 :=1+b;  //цифры
frmMain.nz98 := 1+b;  //цифры
frmMain.nz99 := 1+b;  //цифры
frmMain.nz100 := 1+b;  //цифры
frmMain.nz101 := 1+b;  //цифры
frmMain.nz102 := 1+b;  //цифры
frmMain.nz103 := 1+b;  //цифры

frmMain.nz104 := -0+b;  //буквы
frmMain.nz105 := -2+b;  //буквы
frmMain.nz106 := -4+b;  //буквы
frmMain.nz107 := -6+b;  //буквы
frmMain.nz108 := -8+b;  //буквы
frmMain.nz109 := -10+b;  //буквы
frmMain.nz110 := -12+b;  //буквы
frmMain.nz111 := -14+b;  //буквы
frmMain.nz112 := -16+b;  //буквы
frmMain.nz113 := -18+b;  //буквы

frmMain.nz114 := -4+b;  //корабль
frmMain.nz115 := -18+b;  //цифры
frmMain.nz116 :=-18+b;  //цифры
frmMain.nz117 :=-18+b;  //цифры
frmMain.nz118 :=-18+b;  //цифры
frmMain.nz119 := -18+b;  //цифры
frmMain.nz120 := -18+b;  //цифры
frmMain.nz121 := -18+b;  //цифры
frmMain.nz122 := -18+b;  //цифры
frmMain.nz123 := -18+b;  //цифры
frmMain.nz124 := -18+b;  //цифры
frmMain.nz125 := -16+b;
frmMain.nz126 := -14+b;
frmMain.nz127 := -12+b;
frmMain.nz128 := -16+b;
frmMain.nz129 := -16+b;
frmMain.nz130 := -16+b;
frmMain.nz131 := -16+b;
frmMain.nz132 := -16+b;
frmMain.nz133 := -16+b;
frmMain.nz134 := -16+b;
frmMain.nz135 := -16+b;
frmMain.nz136 := -14+b;
frmMain.nz137 := -14+b;
frmMain.nz138 := -14+b;
frmMain.nz139 := -14+b;
frmMain.nz140 := -14+b;
frmMain.nz141 := -15+b;
frmMain.nz142 := -15+b;
frmMain.nz143 := -15+b;
frmMain.nz144 := -15+b;
frmMain.nz145 := -15+b;
frmMain.nz146 := -15+b;
frmMain.nz147 := -15+b;
frmMain.nz148 := -15+b;
frmMain.nz149 := -14+b;
frmMain.nz150 := -14+b;
frmMain.nz151 := -12+b;
frmMain.nz152 := -12+b;
frmMain.nz153 := -13+b;
frmMain.nz154 := -13+b;
frmMain.nz155 := -13+b;
frmMain.nz156 := -6+b;
frmMain.nz157 := -12+b;
frmMain.nz158 := -12+b;
frmMain.nz159 := -12+b;
frmMain.nz160 := -12+b;
frmMain.nz161 := -10+b;
frmMain.nz162 := -10+b;
frmMain.nz163 := -10+b;
frmMain.nz164 := -10+b;
frmMain.nz165 := -8+b;
frmMain.nz166 := -8+b;
frmMain.nz167 := -8+b;
frmMain.nz168 := -8+b;
frmMain.nz169 := -6+b;
frmMain.nz170 := -6+b;
frmMain.nz171 := -6+b;
frmMain.nz172 := -6+b;
frmMain.nz173 := -4+b;
frmMain.nz174 := -4+b;
frmMain.nz175 := -4+b;
frmMain.nz176 := -4+b;
frmMain.nz177 := -2+b;
frmMain.nz178 := -2+b;
frmMain.nz179 := -2+b;
frmMain.nz180 := -2+b;
 frmMain.nz181 := -3+b;
 frmMain.nz182 := -3+b;
 frmMain.nz183 := -3+b;
 frmMain.nz184 := -3+b;
 frmMain.nz185 := -5+b;
 frmMain.nz186 := -5+b;
 frmMain.nz187 := -5+b;
 frmMain.nz188 := -5+b;
 frmMain.nz189 := -7+b;
 frmMain.nz190 := -7+b;
 frmMain.nz191 := -7+b;
 frmMain.nz192 := -7+b;
 frmMain.nz193 := -9+b;
 frmMain.nz194 := -9+b;
 frmMain.nz195 := -9+b;
 frmMain.nz196 := -9+b;
 frmMain.nz197 := -11+b;
 frmMain.nz198 := -11+b;
 frmMain.nz199 := -11+b;
 frmMain.nz200 := -11+b;
 frmMain.nz201 := -13+b;
 frmMain.nz202 := -13+b;
 frmMain.nz203 := -13+b;
 frmMain.nz204 := -13+b;
 frmMain.nz205 := -4+b;  //корабль
 frmMain.nz206 := -8+b;  //Подлодка
 frmMain.frmGL.Width:=800;
 b:=0;

 end;




 if (c=2) and (d=9) then
begin
StringGrid1.Cells[c,d]:='1';
a:=a+5;
b:=b+3;
frmMain.nx := 0+a;
  frmMain.nx1 := 0+a;
  frmMain.nx2 := 0+a;
 frmMain.nx3 := 0+a;
 frmMain.nx7 := -1+a;
 frmMain.nx8 := 1+a;
 frmMain.nx9 := -1+a;
  frmMain.nx10 := -2+a;
 frmMain.nx11 := -1+a;
 frmMain.nx12 := 1+a;
 frmMain.nx14 := 1+a;
 frmMain.nx15 := -1+a;
 frmMain.nx16 := -1+a;
 frmMain.nx17 := 1+a;
  frmMain.nx18 := -1+a;
 frmMain.nx19 := 1+a;
 frmMain.nx20 := -1+a;
 frmMain.nx21 := -1+a;
 frmMain.nx22 := 1+a;
  frmMain.nx23 := -1+a;
 frmMain.nx24 := 1+a;
  frmMain.nx25 := 1+a;
 frmMain.nx26 := -1+a;
 frmMain.nx27 := 1+a;
  frmMain.nx28 := -1+a;
  frmMain.nx29 := 1+a;
 frmMain.nx30 := -1+a;

// 1

 frmMain.nx31 := -2+a;
 frmMain.nx32 := 2+a;
 frmMain.nx33 := -2+a;
 frmMain.nx34 :=  2+a;
 frmMain.nx35 := -2+a;
 frmMain.nx36 := 2+a;
  frmMain.nx37 := -2+a;
 frmMain.nx38 := 2+a;
 frmMain.nx39 := -2+a;
 frmMain.nx40 := 2+a;
 frmMain.nx41 := -2+a;
 frmMain.nx42 := 2+a;
 frmMain.nx43 := -2+a;
 frmMain.nx44 := 2+a;
 frmMain.nx45 := -2+a;  //////////////


 //////////////////////

 frmMain.nx46 := -2+a;
 frmMain.nx47 := -2+a;
 frmMain.nx48 := 2+a;
 frmMain.nx49 := -2+a;
 frmMain.nx50 := 2+a;
 frmMain.nx51 := -3+a;
 frmMain.nx52 :=3+a;
 frmMain.nx53 := -3+a;
 frmMain.nx54 :=  3+a;
 frmMain.nx55 := -3+a;
 frmMain.nx56 := 3+a;
 frmMain.nx57 := -3+a;
 frmMain.nx58 := 3+a;
 frmMain.nx59 := -3+a;
 frmMain.nx60 := 3+a;
 frmMain.nx61 := -3+a;
 frmMain.nx62 := 3+a;
 frmMain.nx63 := -3+a;
 frmMain.nx64 := 3+a;
 frmMain.nx65 := -3+a;
 frmMain.nx66 := 3+a;
 frmMain.nx67 := -3+a;
 frmMain.nx68 := 3+a;
 frmMain.nx69 := -3+a;
 frmMain.nx70 := 3+a;


  ///3
 ///
 ///
 frmMain.nx71 := -4+a;
 frmMain.nx72 :=4+a;
 frmMain.nx73 := -4+a;
 frmMain.nx74 :=  4+a;
 frmMain.nx75 := -4+a;
 frmMain.nx76 := 4+a;
 frmMain.nx77 := -4+a;
 frmMain.nx78 := 4+a;
 frmMain.nx79 := -4+a;
 frmMain.nx80 := 4+a;
 frmMain.nx81 := -4+a;
 frmMain.nx82 := 4+a;
 frmMain.nx83 := -4+a;
 frmMain.nx84 := 4+a;
 frmMain.nx85 := -4+a;
 frmMain.nx86 := 4+a;
 frmMain.nx87 := -4+a;
 frmMain.nx88 := 4+a;
 frmMain.nx89 := -4+a;
 frmMain.nx90 := -2+a;

frmMain.nx94 :=0+a;
frmMain.nx95 :=-2+a;  //цифры
frmMain.nx96 :=-4+a;  //цифры
frmMain.nx97 :=-6+a;  //цифры
frmMain.nx98 := 2+a;  //цифры
frmMain.nx99 := 4+a;  //цифры
frmMain.nx100 := 6+a;  //цифры
frmMain.nx101 := 8+a;  //цифры
frmMain.nx102 := 10+a;  //цифры
frmMain.nx103 := 12+a;  //цифры

frmMain.nx104 := -8+a;  //буквы
frmMain.nx105 := -8+a;  //буквы
frmMain.nx106 := -8+a;  //буквы
frmMain.nx107 := -8+a;  //буквы
frmMain.nx108 := -8+a;  //буквы
frmMain.nx109 := -8+a;  //буквы
frmMain.nx110 := -8+a;  //буквы
frmMain.nx111 := -8+a;  //буквы
frmMain.nx112 := -8+a;  //буквы
frmMain.nx113 := -8+a;  //буквы

frmMain.nx114 := -6+a;  //корабль
frmMain.nx115 := 0+a;  //цифры
frmMain.nx116 :=-2+a;  //цифры
frmMain.nx117 :=-4+a;  //цифры
frmMain.nx118 :=-6+a;  //цифры
frmMain.nx119 := 2+a;  //цифры
frmMain.nx120 := 4+a;  //цифры
frmMain.nx121 := 6+a;  //цифры
frmMain.nx122 := 8+a;  //цифры
frmMain.nx123 := 10+a;  //цифры
frmMain.nx124 := 12+a;  //цифры
frmMain.nx125 := 0+a;
frmMain.nx126 := 0+a;
frmMain.nx127 := 0+a;
frmMain.nx128 := 2+a;
frmMain.nx129 := -2+a;
frmMain.nx130 := -4+a;
frmMain.nx131 := 4+a;
frmMain.nx132 := -6+a;
frmMain.nx133 := 6+a;
frmMain.nx134 := 8+a;
frmMain.nx135 := -8+a;
frmMain.nx136 := -2+a;
frmMain.nx137 := 2+a;
frmMain.nx138 := -4+a;
frmMain.nx139 := 4+a;
frmMain.nx140 := -2+a;
frmMain.nx141 := 2+a;
frmMain.nx142 := 0+a;
frmMain.nx143 := 2+a;
frmMain.nx144 := -2+a;
frmMain.nx145 := -4+a;
frmMain.nx146 := 4+a;
frmMain.nx147 := 6+a;
frmMain.nx148 := -6+a;
frmMain.nx149 := -6+a;
frmMain.nx150 := 6+a;
frmMain.nx151 := 2+a;
frmMain.nx152 := -2+a;
frmMain.nx153 := 2+a;
frmMain.nx154 := -2+a;
frmMain.nx155 := 0+a;
frmMain.nx156 := 0+a;
frmMain.nx157 := 4+a;
frmMain.nx158 := -4+a;
frmMain.nx159 := -6+a;
frmMain.nx160 := 6+a;
frmMain.nx161 := 4+a;
frmMain.nx162 := -4+a;
frmMain.nx163 := -6+a;
frmMain.nx164 := 6+a;
frmMain.nx165 := 4+a;
frmMain.nx166 := -4+a;
frmMain.nx167 := -6+a;
frmMain.nx168 := 6+a;
frmMain.nx169 := 4+a;
frmMain.nx170 := -4+a;
frmMain.nx171 := -6+a;
frmMain.nx172 := 6+a;
frmMain.nx173 := 4+a;
frmMain.nx174 := -4+a;
frmMain.nx175 := -6+a;
frmMain.nx176 := 6+a;
frmMain.nx177 := 4+a;
frmMain.nx178 := -4+a;
frmMain.nx179 := -6+a;
frmMain.nx180 := 6+a;
 frmMain.nx181 := 4+a;
 frmMain.nx182 := -4+a;
 frmMain.nx183 := -6+a;
 frmMain.nx184 := 6+a;
 frmMain.nx185 := 4+a;
 frmMain.nx186 := -4+a;
 frmMain.nx187 := -6+a;
 frmMain.nx188 := 6+a;
 frmMain.nx189 := -4+a;
 frmMain.nx190 := 4+a;
 frmMain.nx191 := -6+a;
 frmMain.nx192 := 6+a;
 frmMain.nx193 := -4+a;
 frmMain.nx194 := 4+a;
 frmMain.nx195 := -6+a;
 frmMain.nx196 := 6+a;
 frmMain.nx197 := -4+a;
 frmMain.nx198 := 4+a;
 frmMain.nx199 := -6+a;
 frmMain.nx200 := 6+a;
 frmMain.nx201 := -4+a;
 frmMain.nx202 := 4+a;
 frmMain.nx203 := -6+a;
 frmMain.nx204 := 6+a;
 frmMain.nx205 := 6+a;  //корабль
 frmMain.nx206 := 6+a;  //Подлодка
 frmMain.frmGL.Width:=800;
 a:=0;
 frmMain.nz := 0+b;
  frmMain.nz1 := 0+b;
  frmMain.nz2 := 0+b;
 frmMain.nz3 := 1+b;
 frmMain.nz7 := 0+b;
 frmMain.nz8 := 2+b;
 frmMain.nz9 := 2+b;
  frmMain.nz10 := -2+b;
 frmMain.nz11 := -2+b;
 frmMain.nz12 := -2+b;
 frmMain.nz14 := -3+b;
 frmMain.nz15 := -3+b;
 frmMain.nz16 := -4+b;
 frmMain.nz17 := -4+b;
  frmMain.nz18 := -5+b;
 frmMain.nz19 := -5+b;
 frmMain.nz20 := -6+b;
 frmMain.nz21 := -7+b;
 frmMain.nz22 := -7+b;
  frmMain.nz23 := -8+b;
 frmMain.nz24 := -8+b;
  frmMain.nz25 := -9+b;
 frmMain.nz26 := -9+b;
 frmMain.nz27 := -10+b;
  frmMain.nz28 := -10+b;
  frmMain.nz29 := -11+b;
 frmMain.nz30 := -11+b;

// 1

 frmMain.nz31 := -2+b;
 frmMain.nz32 := -2+b;
 frmMain.nz33 := -3+b;
 frmMain.nz34 := -3+b;
 frmMain.nz35 := -4+b;
 frmMain.nz36 := -4+b;
  frmMain.nz37 := -5+b;
 frmMain.nz38 := -5+b;
 frmMain.nz39 := -6+b;
 frmMain.nz40 := -6+b;
 frmMain.nz41 := -7+b;
 frmMain.nz42 := -7+b;
 frmMain.nz43 := -8+b;
 frmMain.nz44 := -8+b;
 frmMain.nz45 := -9+b;  //////////////


 //////////////////////

 frmMain.nz46 := -9+b;
 frmMain.nz47 := -9+b;
 frmMain.nz48 := -10+b;
 frmMain.nz49 := -11+b;
 frmMain.nz50 := -11+b;
 frmMain.nz51 := -2+b;
 frmMain.nz52 :=-2+b;
 frmMain.nz53 := -3+b;
 frmMain.nz54 :=  3+b;
 frmMain.nz55 := -3+b;
 frmMain.nz56 := -4+b;
 frmMain.nz57 := -5+b;
 frmMain.nz58 := -5+b;
 frmMain.nz59 := -6+b;
 frmMain.nz60 := -6+b;
 frmMain.nz61 := -7+b;
 frmMain.nz62 := -7+b;
 frmMain.nz63 := -8+b;
 frmMain.nz64 := -8+b;
 frmMain.nz65 := -9+b;
 frmMain.nz66 := -9+b;
 frmMain.nz67 := -10+b;
 frmMain.nz68 := -10+b;
 frmMain.nz69 := -11+b;
 frmMain.nz70 := -11+b;


  ///3
 ///
 ///
 frmMain.nz71 := -2+b;
 frmMain.nz72 :=-2+b;
 frmMain.nz73 := -3+b;
 frmMain.nz74 :=  -3+b;
 frmMain.nz75 := -4+b;
 frmMain.nz76 := -4+b;
 frmMain.nz77 := -5+b;
 frmMain.nz78 := -5+b;
 frmMain.nz79 := -6+b;
 frmMain.nz80 := -6+b;
 frmMain.nz81 := -7+b;
 frmMain.nz82 := -7+b;
 frmMain.nz83 := -8+b;
 frmMain.nz84 := -8+b;
 frmMain.nz85 := -9+b;
 frmMain.nz86 := -9+b;
 frmMain.nz87 := -10+b;
 frmMain.nz88 := -10+b;
 frmMain.nz89 := -11+b;
 frmMain.nz90 := -2+b;

frmMain.nz94 :=1+b;
frmMain.nz95 :=1+b;  //цифры
frmMain.nz96 :=1+b;  //цифры
frmMain.nz97 :=1+b;  //цифры
frmMain.nz98 := 1+b;  //цифры
frmMain.nz99 := 1+b;  //цифры
frmMain.nz100 := 1+b;  //цифры
frmMain.nz101 := 1+b;  //цифры
frmMain.nz102 := 1+b;  //цифры
frmMain.nz103 := 1+b;  //цифры

frmMain.nz104 := -0+b;  //буквы
frmMain.nz105 := -2+b;  //буквы
frmMain.nz106 := -4+b;  //буквы
frmMain.nz107 := -6+b;  //буквы
frmMain.nz108 := -8+b;  //буквы
frmMain.nz109 := -10+b;  //буквы
frmMain.nz110 := -12+b;  //буквы
frmMain.nz111 := -14+b;  //буквы
frmMain.nz112 := -16+b;  //буквы
frmMain.nz113 := -18+b;  //буквы

frmMain.nz114 := -4+b;  //корабль
frmMain.nz115 := -18+b;  //цифры
frmMain.nz116 :=-18+b;  //цифры
frmMain.nz117 :=-18+b;  //цифры
frmMain.nz118 :=-18+b;  //цифры
frmMain.nz119 := -18+b;  //цифры
frmMain.nz120 := -18+b;  //цифры
frmMain.nz121 := -18+b;  //цифры
frmMain.nz122 := -18+b;  //цифры
frmMain.nz123 := -18+b;  //цифры
frmMain.nz124 := -18+b;  //цифры
frmMain.nz125 := -16+b;
frmMain.nz126 := -14+b;
frmMain.nz127 := -12+b;
frmMain.nz128 := -16+b;
frmMain.nz129 := -16+b;
frmMain.nz130 := -16+b;
frmMain.nz131 := -16+b;
frmMain.nz132 := -16+b;
frmMain.nz133 := -16+b;
frmMain.nz134 := -16+b;
frmMain.nz135 := -16+b;
frmMain.nz136 := -14+b;
frmMain.nz137 := -14+b;
frmMain.nz138 := -14+b;
frmMain.nz139 := -14+b;
frmMain.nz140 := -14+b;
frmMain.nz141 := -15+b;
frmMain.nz142 := -15+b;
frmMain.nz143 := -15+b;
frmMain.nz144 := -15+b;
frmMain.nz145 := -15+b;
frmMain.nz146 := -15+b;
frmMain.nz147 := -15+b;
frmMain.nz148 := -15+b;
frmMain.nz149 := -14+b;
frmMain.nz150 := -14+b;
frmMain.nz151 := -12+b;
frmMain.nz152 := -12+b;
frmMain.nz153 := -13+b;
frmMain.nz154 := -13+b;
frmMain.nz155 := -13+b;
frmMain.nz156 := -6+b;
frmMain.nz157 := -12+b;
frmMain.nz158 := -12+b;
frmMain.nz159 := -12+b;
frmMain.nz160 := -12+b;
frmMain.nz161 := -10+b;
frmMain.nz162 := -10+b;
frmMain.nz163 := -10+b;
frmMain.nz164 := -10+b;
frmMain.nz165 := -8+b;
frmMain.nz166 := -8+b;
frmMain.nz167 := -8+b;
frmMain.nz168 := -8+b;
frmMain.nz169 := -6+b;
frmMain.nz170 := -6+b;
frmMain.nz171 := -6+b;
frmMain.nz172 := -6+b;
frmMain.nz173 := -4+b;
frmMain.nz174 := -4+b;
frmMain.nz175 := -4+b;
frmMain.nz176 := -4+b;
frmMain.nz177 := -2+b;
frmMain.nz178 := -2+b;
frmMain.nz179 := -2+b;
frmMain.nz180 := -2+b;
 frmMain.nz181 := -3+b;
 frmMain.nz182 := -3+b;
 frmMain.nz183 := -3+b;
 frmMain.nz184 := -3+b;
 frmMain.nz185 := -5+b;
 frmMain.nz186 := -5+b;
 frmMain.nz187 := -5+b;
 frmMain.nz188 := -5+b;
 frmMain.nz189 := -7+b;
 frmMain.nz190 := -7+b;
 frmMain.nz191 := -7+b;
 frmMain.nz192 := -7+b;
 frmMain.nz193 := -9+b;
 frmMain.nz194 := -9+b;
 frmMain.nz195 := -9+b;
 frmMain.nz196 := -9+b;
 frmMain.nz197 := -11+b;
 frmMain.nz198 := -11+b;
 frmMain.nz199 := -11+b;
 frmMain.nz200 := -11+b;
 frmMain.nz201 := -13+b;
 frmMain.nz202 := -13+b;
 frmMain.nz203 := -13+b;
 frmMain.nz204 := -13+b;
 frmMain.nz205 := -4+b;  //корабль
 frmMain.nz206 := -8+b;  //Подлодка
 frmMain.frmGL.Width:=800;
 b:=0;

 end;



 if (c=2) and (d=10) then
begin
StringGrid1.Cells[c,d]:='1';
a:=a+5;
b:=b+1;
frmMain.nx := 0+a;
  frmMain.nx1 := 0+a;
  frmMain.nx2 := 0+a;
 frmMain.nx3 := 0+a;
 frmMain.nx7 := -1+a;
 frmMain.nx8 := 1+a;
 frmMain.nx9 := -1+a;
  frmMain.nx10 := -2+a;
 frmMain.nx11 := -1+a;
 frmMain.nx12 := 1+a;
 frmMain.nx14 := 1+a;
 frmMain.nx15 := -1+a;
 frmMain.nx16 := -1+a;
 frmMain.nx17 := 1+a;
  frmMain.nx18 := -1+a;
 frmMain.nx19 := 1+a;
 frmMain.nx20 := -1+a;
 frmMain.nx21 := -1+a;
 frmMain.nx22 := 1+a;
  frmMain.nx23 := -1+a;
 frmMain.nx24 := 1+a;
  frmMain.nx25 := 1+a;
 frmMain.nx26 := -1+a;
 frmMain.nx27 := 1+a;
  frmMain.nx28 := -1+a;
  frmMain.nx29 := 1+a;
 frmMain.nx30 := -1+a;

// 1

 frmMain.nx31 := -2+a;
 frmMain.nx32 := 2+a;
 frmMain.nx33 := -2+a;
 frmMain.nx34 :=  2+a;
 frmMain.nx35 := -2+a;
 frmMain.nx36 := 2+a;
  frmMain.nx37 := -2+a;
 frmMain.nx38 := 2+a;
 frmMain.nx39 := -2+a;
 frmMain.nx40 := 2+a;
 frmMain.nx41 := -2+a;
 frmMain.nx42 := 2+a;
 frmMain.nx43 := -2+a;
 frmMain.nx44 := 2+a;
 frmMain.nx45 := -2+a;  //////////////


 //////////////////////

 frmMain.nx46 := -2+a;
 frmMain.nx47 := -2+a;
 frmMain.nx48 := 2+a;
 frmMain.nx49 := -2+a;
 frmMain.nx50 := 2+a;
 frmMain.nx51 := -3+a;
 frmMain.nx52 :=3+a;
 frmMain.nx53 := -3+a;
 frmMain.nx54 :=  3+a;
 frmMain.nx55 := -3+a;
 frmMain.nx56 := 3+a;
 frmMain.nx57 := -3+a;
 frmMain.nx58 := 3+a;
 frmMain.nx59 := -3+a;
 frmMain.nx60 := 3+a;
 frmMain.nx61 := -3+a;
 frmMain.nx62 := 3+a;
 frmMain.nx63 := -3+a;
 frmMain.nx64 := 3+a;
 frmMain.nx65 := -3+a;
 frmMain.nx66 := 3+a;
 frmMain.nx67 := -3+a;
 frmMain.nx68 := 3+a;
 frmMain.nx69 := -3+a;
 frmMain.nx70 := 3+a;


  ///3
 ///
 ///
 frmMain.nx71 := -4+a;
 frmMain.nx72 :=4+a;
 frmMain.nx73 := -4+a;
 frmMain.nx74 :=  4+a;
 frmMain.nx75 := -4+a;
 frmMain.nx76 := 4+a;
 frmMain.nx77 := -4+a;
 frmMain.nx78 := 4+a;
 frmMain.nx79 := -4+a;
 frmMain.nx80 := 4+a;
 frmMain.nx81 := -4+a;
 frmMain.nx82 := 4+a;
 frmMain.nx83 := -4+a;
 frmMain.nx84 := 4+a;
 frmMain.nx85 := -4+a;
 frmMain.nx86 := 4+a;
 frmMain.nx87 := -4+a;
 frmMain.nx88 := 4+a;
 frmMain.nx89 := -4+a;
 frmMain.nx90 := -2+a;

frmMain.nx94 :=0+a;
frmMain.nx95 :=-2+a;  //цифры
frmMain.nx96 :=-4+a;  //цифры
frmMain.nx97 :=-6+a;  //цифры
frmMain.nx98 := 2+a;  //цифры
frmMain.nx99 := 4+a;  //цифры
frmMain.nx100 := 6+a;  //цифры
frmMain.nx101 := 8+a;  //цифры
frmMain.nx102 := 10+a;  //цифры
frmMain.nx103 := 12+a;  //цифры

frmMain.nx104 := -8+a;  //буквы
frmMain.nx105 := -8+a;  //буквы
frmMain.nx106 := -8+a;  //буквы
frmMain.nx107 := -8+a;  //буквы
frmMain.nx108 := -8+a;  //буквы
frmMain.nx109 := -8+a;  //буквы
frmMain.nx110 := -8+a;  //буквы
frmMain.nx111 := -8+a;  //буквы
frmMain.nx112 := -8+a;  //буквы
frmMain.nx113 := -8+a;  //буквы

frmMain.nx114 := -6+a;  //корабль
frmMain.nx115 := 0+a;  //цифры
frmMain.nx116 :=-2+a;  //цифры
frmMain.nx117 :=-4+a;  //цифры
frmMain.nx118 :=-6+a;  //цифры
frmMain.nx119 := 2+a;  //цифры
frmMain.nx120 := 4+a;  //цифры
frmMain.nx121 := 6+a;  //цифры
frmMain.nx122 := 8+a;  //цифры
frmMain.nx123 := 10+a;  //цифры
frmMain.nx124 := 12+a;  //цифры
frmMain.nx125 := 0+a;
frmMain.nx126 := 0+a;
frmMain.nx127 := 0+a;
frmMain.nx128 := 2+a;
frmMain.nx129 := -2+a;
frmMain.nx130 := -4+a;
frmMain.nx131 := 4+a;
frmMain.nx132 := -6+a;
frmMain.nx133 := 6+a;
frmMain.nx134 := 8+a;
frmMain.nx135 := -8+a;
frmMain.nx136 := -2+a;
frmMain.nx137 := 2+a;
frmMain.nx138 := -4+a;
frmMain.nx139 := 4+a;
frmMain.nx140 := -2+a;
frmMain.nx141 := 2+a;
frmMain.nx142 := 0+a;
frmMain.nx143 := 2+a;
frmMain.nx144 := -2+a;
frmMain.nx145 := -4+a;
frmMain.nx146 := 4+a;
frmMain.nx147 := 6+a;
frmMain.nx148 := -6+a;
frmMain.nx149 := -6+a;
frmMain.nx150 := 6+a;
frmMain.nx151 := 2+a;
frmMain.nx152 := -2+a;
frmMain.nx153 := 2+a;
frmMain.nx154 := -2+a;
frmMain.nx155 := 0+a;
frmMain.nx156 := 0+a;
frmMain.nx157 := 4+a;
frmMain.nx158 := -4+a;
frmMain.nx159 := -6+a;
frmMain.nx160 := 6+a;
frmMain.nx161 := 4+a;
frmMain.nx162 := -4+a;
frmMain.nx163 := -6+a;
frmMain.nx164 := 6+a;
frmMain.nx165 := 4+a;
frmMain.nx166 := -4+a;
frmMain.nx167 := -6+a;
frmMain.nx168 := 6+a;
frmMain.nx169 := 4+a;
frmMain.nx170 := -4+a;
frmMain.nx171 := -6+a;
frmMain.nx172 := 6+a;
frmMain.nx173 := 4+a;
frmMain.nx174 := -4+a;
frmMain.nx175 := -6+a;
frmMain.nx176 := 6+a;
frmMain.nx177 := 4+a;
frmMain.nx178 := -4+a;
frmMain.nx179 := -6+a;
frmMain.nx180 := 6+a;
 frmMain.nx181 := 4+a;
 frmMain.nx182 := -4+a;
 frmMain.nx183 := -6+a;
 frmMain.nx184 := 6+a;
 frmMain.nx185 := 4+a;
 frmMain.nx186 := -4+a;
 frmMain.nx187 := -6+a;
 frmMain.nx188 := 6+a;
 frmMain.nx189 := -4+a;
 frmMain.nx190 := 4+a;
 frmMain.nx191 := -6+a;
 frmMain.nx192 := 6+a;
 frmMain.nx193 := -4+a;
 frmMain.nx194 := 4+a;
 frmMain.nx195 := -6+a;
 frmMain.nx196 := 6+a;
 frmMain.nx197 := -4+a;
 frmMain.nx198 := 4+a;
 frmMain.nx199 := -6+a;
 frmMain.nx200 := 6+a;
 frmMain.nx201 := -4+a;
 frmMain.nx202 := 4+a;
 frmMain.nx203 := -6+a;
 frmMain.nx204 := 6+a;
 frmMain.nx205 := 6+a;  //корабль
 frmMain.nx206 := 6+a;  //Подлодка
 frmMain.frmGL.Width:=800;
 a:=0;
 frmMain.nz := 0+b;
  frmMain.nz1 := 0+b;
  frmMain.nz2 := 0+b;
 frmMain.nz3 := 1+b;
 frmMain.nz7 := 0+b;
 frmMain.nz8 := 2+b;
 frmMain.nz9 := 2+b;
  frmMain.nz10 := -2+b;
 frmMain.nz11 := -2+b;
 frmMain.nz12 := -2+b;
 frmMain.nz14 := -3+b;
 frmMain.nz15 := -3+b;
 frmMain.nz16 := -4+b;
 frmMain.nz17 := -4+b;
  frmMain.nz18 := -5+b;
 frmMain.nz19 := -5+b;
 frmMain.nz20 := -6+b;
 frmMain.nz21 := -7+b;
 frmMain.nz22 := -7+b;
  frmMain.nz23 := -8+b;
 frmMain.nz24 := -8+b;
  frmMain.nz25 := -9+b;
 frmMain.nz26 := -9+b;
 frmMain.nz27 := -10+b;
  frmMain.nz28 := -10+b;
  frmMain.nz29 := -11+b;
 frmMain.nz30 := -11+b;

// 1

 frmMain.nz31 := -2+b;
 frmMain.nz32 := -2+b;
 frmMain.nz33 := -3+b;
 frmMain.nz34 := -3+b;
 frmMain.nz35 := -4+b;
 frmMain.nz36 := -4+b;
  frmMain.nz37 := -5+b;
 frmMain.nz38 := -5+b;
 frmMain.nz39 := -6+b;
 frmMain.nz40 := -6+b;
 frmMain.nz41 := -7+b;
 frmMain.nz42 := -7+b;
 frmMain.nz43 := -8+b;
 frmMain.nz44 := -8+b;
 frmMain.nz45 := -9+b;  //////////////


 //////////////////////

 frmMain.nz46 := -9+b;
 frmMain.nz47 := -9+b;
 frmMain.nz48 := -10+b;
 frmMain.nz49 := -11+b;
 frmMain.nz50 := -11+b;
 frmMain.nz51 := -2+b;
 frmMain.nz52 :=-2+b;
 frmMain.nz53 := -3+b;
 frmMain.nz54 :=  3+b;
 frmMain.nz55 := -3+b;
 frmMain.nz56 := -4+b;
 frmMain.nz57 := -5+b;
 frmMain.nz58 := -5+b;
 frmMain.nz59 := -6+b;
 frmMain.nz60 := -6+b;
 frmMain.nz61 := -7+b;
 frmMain.nz62 := -7+b;
 frmMain.nz63 := -8+b;
 frmMain.nz64 := -8+b;
 frmMain.nz65 := -9+b;
 frmMain.nz66 := -9+b;
 frmMain.nz67 := -10+b;
 frmMain.nz68 := -10+b;
 frmMain.nz69 := -11+b;
 frmMain.nz70 := -11+b;


  ///3
 ///
 ///
 frmMain.nz71 := -2+b;
 frmMain.nz72 :=-2+b;
 frmMain.nz73 := -3+b;
 frmMain.nz74 :=  -3+b;
 frmMain.nz75 := -4+b;
 frmMain.nz76 := -4+b;
 frmMain.nz77 := -5+b;
 frmMain.nz78 := -5+b;
 frmMain.nz79 := -6+b;
 frmMain.nz80 := -6+b;
 frmMain.nz81 := -7+b;
 frmMain.nz82 := -7+b;
 frmMain.nz83 := -8+b;
 frmMain.nz84 := -8+b;
 frmMain.nz85 := -9+b;
 frmMain.nz86 := -9+b;
 frmMain.nz87 := -10+b;
 frmMain.nz88 := -10+b;
 frmMain.nz89 := -11+b;
 frmMain.nz90 := -2+b;

frmMain.nz94 :=1+b;
frmMain.nz95 :=1+b;  //цифры
frmMain.nz96 :=1+b;  //цифры
frmMain.nz97 :=1+b;  //цифры
frmMain.nz98 := 1+b;  //цифры
frmMain.nz99 := 1+b;  //цифры
frmMain.nz100 := 1+b;  //цифры
frmMain.nz101 := 1+b;  //цифры
frmMain.nz102 := 1+b;  //цифры
frmMain.nz103 := 1+b;  //цифры

frmMain.nz104 := -0+b;  //буквы
frmMain.nz105 := -2+b;  //буквы
frmMain.nz106 := -4+b;  //буквы
frmMain.nz107 := -6+b;  //буквы
frmMain.nz108 := -8+b;  //буквы
frmMain.nz109 := -10+b;  //буквы
frmMain.nz110 := -12+b;  //буквы
frmMain.nz111 := -14+b;  //буквы
frmMain.nz112 := -16+b;  //буквы
frmMain.nz113 := -18+b;  //буквы

frmMain.nz114 := -4+b;  //корабль
frmMain.nz115 := -18+b;  //цифры
frmMain.nz116 :=-18+b;  //цифры
frmMain.nz117 :=-18+b;  //цифры
frmMain.nz118 :=-18+b;  //цифры
frmMain.nz119 := -18+b;  //цифры
frmMain.nz120 := -18+b;  //цифры
frmMain.nz121 := -18+b;  //цифры
frmMain.nz122 := -18+b;  //цифры
frmMain.nz123 := -18+b;  //цифры
frmMain.nz124 := -18+b;  //цифры
frmMain.nz125 := -16+b;
frmMain.nz126 := -14+b;
frmMain.nz127 := -12+b;
frmMain.nz128 := -16+b;
frmMain.nz129 := -16+b;
frmMain.nz130 := -16+b;
frmMain.nz131 := -16+b;
frmMain.nz132 := -16+b;
frmMain.nz133 := -16+b;
frmMain.nz134 := -16+b;
frmMain.nz135 := -16+b;
frmMain.nz136 := -14+b;
frmMain.nz137 := -14+b;
frmMain.nz138 := -14+b;
frmMain.nz139 := -14+b;
frmMain.nz140 := -14+b;
frmMain.nz141 := -15+b;
frmMain.nz142 := -15+b;
frmMain.nz143 := -15+b;
frmMain.nz144 := -15+b;
frmMain.nz145 := -15+b;
frmMain.nz146 := -15+b;
frmMain.nz147 := -15+b;
frmMain.nz148 := -15+b;
frmMain.nz149 := -14+b;
frmMain.nz150 := -14+b;
frmMain.nz151 := -12+b;
frmMain.nz152 := -12+b;
frmMain.nz153 := -13+b;
frmMain.nz154 := -13+b;
frmMain.nz155 := -13+b;
frmMain.nz156 := -6+b;
frmMain.nz157 := -12+b;
frmMain.nz158 := -12+b;
frmMain.nz159 := -12+b;
frmMain.nz160 := -12+b;
frmMain.nz161 := -10+b;
frmMain.nz162 := -10+b;
frmMain.nz163 := -10+b;
frmMain.nz164 := -10+b;
frmMain.nz165 := -8+b;
frmMain.nz166 := -8+b;
frmMain.nz167 := -8+b;
frmMain.nz168 := -8+b;
frmMain.nz169 := -6+b;
frmMain.nz170 := -6+b;
frmMain.nz171 := -6+b;
frmMain.nz172 := -6+b;
frmMain.nz173 := -4+b;
frmMain.nz174 := -4+b;
frmMain.nz175 := -4+b;
frmMain.nz176 := -4+b;
frmMain.nz177 := -2+b;
frmMain.nz178 := -2+b;
frmMain.nz179 := -2+b;
frmMain.nz180 := -2+b;
 frmMain.nz181 := -3+b;
 frmMain.nz182 := -3+b;
 frmMain.nz183 := -3+b;
 frmMain.nz184 := -3+b;
 frmMain.nz185 := -5+b;
 frmMain.nz186 := -5+b;
 frmMain.nz187 := -5+b;
 frmMain.nz188 := -5+b;
 frmMain.nz189 := -7+b;
 frmMain.nz190 := -7+b;
 frmMain.nz191 := -7+b;
 frmMain.nz192 := -7+b;
 frmMain.nz193 := -9+b;
 frmMain.nz194 := -9+b;
 frmMain.nz195 := -9+b;
 frmMain.nz196 := -9+b;
 frmMain.nz197 := -11+b;
 frmMain.nz198 := -11+b;
 frmMain.nz199 := -11+b;
 frmMain.nz200 := -11+b;
 frmMain.nz201 := -13+b;
 frmMain.nz202 := -13+b;
 frmMain.nz203 := -13+b;
 frmMain.nz204 := -13+b;
 frmMain.nz205 := -4+b;  //корабль
 frmMain.nz206 := -8+b;  //Подлодка
 frmMain.frmGL.Width:=800;
 b:=0;

 end;


 if (c=3) and (d=8) then
begin
StringGrid1.Cells[c,d]:='1';
a:=a+3;
b:=b+5;
frmMain.nx := 0+a;
  frmMain.nx1 := 0+a;
  frmMain.nx2 := 0+a;
 frmMain.nx3 := 0+a;
 frmMain.nx7 := -1+a;
 frmMain.nx8 := 1+a;
 frmMain.nx9 := -1+a;
  frmMain.nx10 := -2+a;
 frmMain.nx11 := -1+a;
 frmMain.nx12 := 1+a;
 frmMain.nx14 := 1+a;
 frmMain.nx15 := -1+a;
 frmMain.nx16 := -1+a;
 frmMain.nx17 := 1+a;
  frmMain.nx18 := -1+a;
 frmMain.nx19 := 1+a;
 frmMain.nx20 := -1+a;
 frmMain.nx21 := -1+a;
 frmMain.nx22 := 1+a;
  frmMain.nx23 := -1+a;
 frmMain.nx24 := 1+a;
  frmMain.nx25 := 1+a;
 frmMain.nx26 := -1+a;
 frmMain.nx27 := 1+a;
  frmMain.nx28 := -1+a;
  frmMain.nx29 := 1+a;
 frmMain.nx30 := -1+a;

// 1

 frmMain.nx31 := -2+a;
 frmMain.nx32 := 2+a;
 frmMain.nx33 := -2+a;
 frmMain.nx34 :=  2+a;
 frmMain.nx35 := -2+a;
 frmMain.nx36 := 2+a;
  frmMain.nx37 := -2+a;
 frmMain.nx38 := 2+a;
 frmMain.nx39 := -2+a;
 frmMain.nx40 := 2+a;
 frmMain.nx41 := -2+a;
 frmMain.nx42 := 2+a;
 frmMain.nx43 := -2+a;
 frmMain.nx44 := 2+a;
 frmMain.nx45 := -2+a;  //////////////


 //////////////////////

 frmMain.nx46 := -2+a;
 frmMain.nx47 := -2+a;
 frmMain.nx48 := 2+a;
 frmMain.nx49 := -2+a;
 frmMain.nx50 := 2+a;
 frmMain.nx51 := -3+a;
 frmMain.nx52 :=3+a;
 frmMain.nx53 := -3+a;
 frmMain.nx54 :=  3+a;
 frmMain.nx55 := -3+a;
 frmMain.nx56 := 3+a;
 frmMain.nx57 := -3+a;
 frmMain.nx58 := 3+a;
 frmMain.nx59 := -3+a;
 frmMain.nx60 := 3+a;
 frmMain.nx61 := -3+a;
 frmMain.nx62 := 3+a;
 frmMain.nx63 := -3+a;
 frmMain.nx64 := 3+a;
 frmMain.nx65 := -3+a;
 frmMain.nx66 := 3+a;
 frmMain.nx67 := -3+a;
 frmMain.nx68 := 3+a;
 frmMain.nx69 := -3+a;
 frmMain.nx70 := 3+a;


  ///3
 ///
 ///
 frmMain.nx71 := -4+a;
 frmMain.nx72 :=4+a;
 frmMain.nx73 := -4+a;
 frmMain.nx74 :=  4+a;
 frmMain.nx75 := -4+a;
 frmMain.nx76 := 4+a;
 frmMain.nx77 := -4+a;
 frmMain.nx78 := 4+a;
 frmMain.nx79 := -4+a;
 frmMain.nx80 := 4+a;
 frmMain.nx81 := -4+a;
 frmMain.nx82 := 4+a;
 frmMain.nx83 := -4+a;
 frmMain.nx84 := 4+a;
 frmMain.nx85 := -4+a;
 frmMain.nx86 := 4+a;
 frmMain.nx87 := -4+a;
 frmMain.nx88 := 4+a;
 frmMain.nx89 := -4+a;
 frmMain.nx90 := -2+a;

frmMain.nx94 :=0+a;
frmMain.nx95 :=-2+a;  //цифры
frmMain.nx96 :=-4+a;  //цифры
frmMain.nx97 :=-6+a;  //цифры
frmMain.nx98 := 2+a;  //цифры
frmMain.nx99 := 4+a;  //цифры
frmMain.nx100 := 6+a;  //цифры
frmMain.nx101 := 8+a;  //цифры
frmMain.nx102 := 10+a;  //цифры
frmMain.nx103 := 12+a;  //цифры

frmMain.nx104 := -8+a;  //буквы
frmMain.nx105 := -8+a;  //буквы
frmMain.nx106 := -8+a;  //буквы
frmMain.nx107 := -8+a;  //буквы
frmMain.nx108 := -8+a;  //буквы
frmMain.nx109 := -8+a;  //буквы
frmMain.nx110 := -8+a;  //буквы
frmMain.nx111 := -8+a;  //буквы
frmMain.nx112 := -8+a;  //буквы
frmMain.nx113 := -8+a;  //буквы

frmMain.nx114 := -6+a;  //корабль
frmMain.nx115 := 0+a;  //цифры
frmMain.nx116 :=-2+a;  //цифры
frmMain.nx117 :=-4+a;  //цифры
frmMain.nx118 :=-6+a;  //цифры
frmMain.nx119 := 2+a;  //цифры
frmMain.nx120 := 4+a;  //цифры
frmMain.nx121 := 6+a;  //цифры
frmMain.nx122 := 8+a;  //цифры
frmMain.nx123 := 10+a;  //цифры
frmMain.nx124 := 12+a;  //цифры
frmMain.nx125 := 0+a;
frmMain.nx126 := 0+a;
frmMain.nx127 := 0+a;
frmMain.nx128 := 2+a;
frmMain.nx129 := -2+a;
frmMain.nx130 := -4+a;
frmMain.nx131 := 4+a;
frmMain.nx132 := -6+a;
frmMain.nx133 := 6+a;
frmMain.nx134 := 8+a;
frmMain.nx135 := -8+a;
frmMain.nx136 := -2+a;
frmMain.nx137 := 2+a;
frmMain.nx138 := -4+a;
frmMain.nx139 := 4+a;
frmMain.nx140 := -2+a;
frmMain.nx141 := 2+a;
frmMain.nx142 := 0+a;
frmMain.nx143 := 2+a;
frmMain.nx144 := -2+a;
frmMain.nx145 := -4+a;
frmMain.nx146 := 4+a;
frmMain.nx147 := 6+a;
frmMain.nx148 := -6+a;
frmMain.nx149 := -6+a;
frmMain.nx150 := 6+a;
frmMain.nx151 := 2+a;
frmMain.nx152 := -2+a;
frmMain.nx153 := 2+a;
frmMain.nx154 := -2+a;
frmMain.nx155 := 0+a;
frmMain.nx156 := 0+a;
frmMain.nx157 := 4+a;
frmMain.nx158 := -4+a;
frmMain.nx159 := -6+a;
frmMain.nx160 := 6+a;
frmMain.nx161 := 4+a;
frmMain.nx162 := -4+a;
frmMain.nx163 := -6+a;
frmMain.nx164 := 6+a;
frmMain.nx165 := 4+a;
frmMain.nx166 := -4+a;
frmMain.nx167 := -6+a;
frmMain.nx168 := 6+a;
frmMain.nx169 := 4+a;
frmMain.nx170 := -4+a;
frmMain.nx171 := -6+a;
frmMain.nx172 := 6+a;
frmMain.nx173 := 4+a;
frmMain.nx174 := -4+a;
frmMain.nx175 := -6+a;
frmMain.nx176 := 6+a;
frmMain.nx177 := 4+a;
frmMain.nx178 := -4+a;
frmMain.nx179 := -6+a;
frmMain.nx180 := 6+a;
 frmMain.nx181 := 4+a;
 frmMain.nx182 := -4+a;
 frmMain.nx183 := -6+a;
 frmMain.nx184 := 6+a;
 frmMain.nx185 := 4+a;
 frmMain.nx186 := -4+a;
 frmMain.nx187 := -6+a;
 frmMain.nx188 := 6+a;
 frmMain.nx189 := -4+a;
 frmMain.nx190 := 4+a;
 frmMain.nx191 := -6+a;
 frmMain.nx192 := 6+a;
 frmMain.nx193 := -4+a;
 frmMain.nx194 := 4+a;
 frmMain.nx195 := -6+a;
 frmMain.nx196 := 6+a;
 frmMain.nx197 := -4+a;
 frmMain.nx198 := 4+a;
 frmMain.nx199 := -6+a;
 frmMain.nx200 := 6+a;
 frmMain.nx201 := -4+a;
 frmMain.nx202 := 4+a;
 frmMain.nx203 := -6+a;
 frmMain.nx204 := 6+a;
 frmMain.nx205 := 6+a;  //корабль
 frmMain.nx206 := 6+a;  //Подлодка
 frmMain.nx215 := -6+a;
 frmMain.frmGL.Width:=800;
 a:=0;
 frmMain.nz := 0+b;
  frmMain.nz1 := 0+b;
  frmMain.nz2 := 0+b;
 frmMain.nz3 := 1+b;
 frmMain.nz7 := 0+b;
 frmMain.nz8 := 2+b;
 frmMain.nz9 := 2+b;
  frmMain.nz10 := -2+b;
 frmMain.nz11 := -2+b;
 frmMain.nz12 := -2+b;
 frmMain.nz14 := -3+b;
 frmMain.nz15 := -3+b;
 frmMain.nz16 := -4+b;
 frmMain.nz17 := -4+b;
  frmMain.nz18 := -5+b;
 frmMain.nz19 := -5+b;
 frmMain.nz20 := -6+b;
 frmMain.nz21 := -7+b;
 frmMain.nz22 := -7+b;
  frmMain.nz23 := -8+b;
 frmMain.nz24 := -8+b;
  frmMain.nz25 := -9+b;
 frmMain.nz26 := -9+b;
 frmMain.nz27 := -10+b;
  frmMain.nz28 := -10+b;
  frmMain.nz29 := -11+b;
 frmMain.nz30 := -11+b;

// 1

 frmMain.nz31 := -2+b;
 frmMain.nz32 := -2+b;
 frmMain.nz33 := -3+b;
 frmMain.nz34 := -3+b;
 frmMain.nz35 := -4+b;
 frmMain.nz36 := -4+b;
  frmMain.nz37 := -5+b;
 frmMain.nz38 := -5+b;
 frmMain.nz39 := -6+b;
 frmMain.nz40 := -6+b;
 frmMain.nz41 := -7+b;
 frmMain.nz42 := -7+b;
 frmMain.nz43 := -8+b;
 frmMain.nz44 := -8+b;
 frmMain.nz45 := -9+b;  //////////////


 //////////////////////

 frmMain.nz46 := -9+b;
 frmMain.nz47 := -9+b;
 frmMain.nz48 := -10+b;
 frmMain.nz49 := -11+b;
 frmMain.nz50 := -11+b;
 frmMain.nz51 := -2+b;
 frmMain.nz52 :=-2+b;
 frmMain.nz53 := -3+b;
 frmMain.nz54 :=  3+b;
 frmMain.nz55 := -3+b;
 frmMain.nz56 := -4+b;
 frmMain.nz57 := -5+b;
 frmMain.nz58 := -5+b;
 frmMain.nz59 := -6+b;
 frmMain.nz60 := -6+b;
 frmMain.nz61 := -7+b;
 frmMain.nz62 := -7+b;
 frmMain.nz63 := -8+b;
 frmMain.nz64 := -8+b;
 frmMain.nz65 := -9+b;
 frmMain.nz66 := -9+b;
 frmMain.nz67 := -10+b;
 frmMain.nz68 := -10+b;
 frmMain.nz69 := -11+b;
 frmMain.nz70 := -11+b;


  ///3
 ///
 ///
 frmMain.nz71 := -2+b;
 frmMain.nz72 :=-2+b;
 frmMain.nz73 := -3+b;
 frmMain.nz74 :=  -3+b;
 frmMain.nz75 := -4+b;
 frmMain.nz76 := -4+b;
 frmMain.nz77 := -5+b;
 frmMain.nz78 := -5+b;
 frmMain.nz79 := -6+b;
 frmMain.nz80 := -6+b;
 frmMain.nz81 := -7+b;
 frmMain.nz82 := -7+b;
 frmMain.nz83 := -8+b;
 frmMain.nz84 := -8+b;
 frmMain.nz85 := -9+b;
 frmMain.nz86 := -9+b;
 frmMain.nz87 := -10+b;
 frmMain.nz88 := -10+b;
 frmMain.nz89 := -11+b;
 frmMain.nz90 := -2+b;

frmMain.nz94 :=1+b;
frmMain.nz95 :=1+b;  //цифры
frmMain.nz96 :=1+b;  //цифры
frmMain.nz97 :=1+b;  //цифры
frmMain.nz98 := 1+b;  //цифры
frmMain.nz99 := 1+b;  //цифры
frmMain.nz100 := 1+b;  //цифры
frmMain.nz101 := 1+b;  //цифры
frmMain.nz102 := 1+b;  //цифры
frmMain.nz103 := 1+b;  //цифры

frmMain.nz104 := -0+b;  //буквы
frmMain.nz105 := -2+b;  //буквы
frmMain.nz106 := -4+b;  //буквы
frmMain.nz107 := -6+b;  //буквы
frmMain.nz108 := -8+b;  //буквы
frmMain.nz109 := -10+b;  //буквы
frmMain.nz110 := -12+b;  //буквы
frmMain.nz111 := -14+b;  //буквы
frmMain.nz112 := -16+b;  //буквы
frmMain.nz113 := -18+b;  //буквы

frmMain.nz114 := -4+b;  //корабль
frmMain.nz115 := -18+b;  //цифры
frmMain.nz116 :=-18+b;  //цифры
frmMain.nz117 :=-18+b;  //цифры
frmMain.nz118 :=-18+b;  //цифры
frmMain.nz119 := -18+b;  //цифры
frmMain.nz120 := -18+b;  //цифры
frmMain.nz121 := -18+b;  //цифры
frmMain.nz122 := -18+b;  //цифры
frmMain.nz123 := -18+b;  //цифры
frmMain.nz124 := -18+b;  //цифры
frmMain.nz125 := -16+b;
frmMain.nz126 := -14+b;
frmMain.nz127 := -12+b;
frmMain.nz128 := -16+b;
frmMain.nz129 := -16+b;
frmMain.nz130 := -16+b;
frmMain.nz131 := -16+b;
frmMain.nz132 := -16+b;
frmMain.nz133 := -16+b;
frmMain.nz134 := -16+b;
frmMain.nz135 := -16+b;
frmMain.nz136 := -14+b;
frmMain.nz137 := -14+b;
frmMain.nz138 := -14+b;
frmMain.nz139 := -14+b;
frmMain.nz140 := -14+b;
frmMain.nz141 := -15+b;
frmMain.nz142 := -15+b;
frmMain.nz143 := -15+b;
frmMain.nz144 := -15+b;
frmMain.nz145 := -15+b;
frmMain.nz146 := -15+b;
frmMain.nz147 := -15+b;
frmMain.nz148 := -15+b;
frmMain.nz149 := -14+b;
frmMain.nz150 := -14+b;
frmMain.nz151 := -12+b;
frmMain.nz152 := -12+b;
frmMain.nz153 := -13+b;
frmMain.nz154 := -13+b;
frmMain.nz155 := -13+b;
frmMain.nz156 := -6+b;
frmMain.nz157 := -12+b;
frmMain.nz158 := -12+b;
frmMain.nz159 := -12+b;
frmMain.nz160 := -12+b;
frmMain.nz161 := -10+b;
frmMain.nz162 := -10+b;
frmMain.nz163 := -10+b;
frmMain.nz164 := -10+b;
frmMain.nz165 := -8+b;
frmMain.nz166 := -8+b;
frmMain.nz167 := -8+b;
frmMain.nz168 := -8+b;
frmMain.nz169 := -6+b;
frmMain.nz170 := -6+b;
frmMain.nz171 := -6+b;
frmMain.nz172 := -6+b;
frmMain.nz173 := -4+b;
frmMain.nz174 := -4+b;
frmMain.nz175 := -4+b;
frmMain.nz176 := -4+b;
frmMain.nz177 := -2+b;
frmMain.nz178 := -2+b;
frmMain.nz179 := -2+b;
frmMain.nz180 := -2+b;
 frmMain.nz181 := -3+b;
 frmMain.nz182 := -3+b;
 frmMain.nz183 := -3+b;
 frmMain.nz184 := -3+b;
 frmMain.nz185 := -5+b;
 frmMain.nz186 := -5+b;
 frmMain.nz187 := -5+b;
 frmMain.nz188 := -5+b;
 frmMain.nz189 := -7+b;
 frmMain.nz190 := -7+b;
 frmMain.nz191 := -7+b;
 frmMain.nz192 := -7+b;
 frmMain.nz193 := -9+b;
 frmMain.nz194 := -9+b;
 frmMain.nz195 := -9+b;
 frmMain.nz196 := -9+b;
 frmMain.nz197 := -11+b;
 frmMain.nz198 := -11+b;
 frmMain.nz199 := -11+b;
 frmMain.nz200 := -11+b;
 frmMain.nz201 := -13+b;
 frmMain.nz202 := -13+b;
 frmMain.nz203 := -13+b;
 frmMain.nz204 := -13+b;
 frmMain.nz205 := -4+b;  //корабль
 frmMain.nz206 := -8+b;  //Подлодка
 frmMain.nz215 := -12+b;
 frmMain.frmGL.Width:=800;
 b:=0;

 end;



 if (c=3) and (d=7) then
begin
StringGrid1.Cells[c,d]:='1';
a:=a+3;
b:=b+7;
frmMain.nx := 0+a;
  frmMain.nx1 := 0+a;
  frmMain.nx2 := 0+a;
 frmMain.nx3 := 0+a;
 frmMain.nx7 := -1+a;
 frmMain.nx8 := 1+a;
 frmMain.nx9 := -1+a;
  frmMain.nx10 := -2+a;
 frmMain.nx11 := -1+a;
 frmMain.nx12 := 1+a;
 frmMain.nx14 := 1+a;
 frmMain.nx15 := -1+a;
 frmMain.nx16 := -1+a;
 frmMain.nx17 := 1+a;
  frmMain.nx18 := -1+a;
 frmMain.nx19 := 1+a;
 frmMain.nx20 := -1+a;
 frmMain.nx21 := -1+a;
 frmMain.nx22 := 1+a;
  frmMain.nx23 := -1+a;
 frmMain.nx24 := 1+a;
  frmMain.nx25 := 1+a;
 frmMain.nx26 := -1+a;
 frmMain.nx27 := 1+a;
  frmMain.nx28 := -1+a;
  frmMain.nx29 := 1+a;
 frmMain.nx30 := -1+a;

// 1

 frmMain.nx31 := -2+a;
 frmMain.nx32 := 2+a;
 frmMain.nx33 := -2+a;
 frmMain.nx34 :=  2+a;
 frmMain.nx35 := -2+a;
 frmMain.nx36 := 2+a;
  frmMain.nx37 := -2+a;
 frmMain.nx38 := 2+a;
 frmMain.nx39 := -2+a;
 frmMain.nx40 := 2+a;
 frmMain.nx41 := -2+a;
 frmMain.nx42 := 2+a;
 frmMain.nx43 := -2+a;
 frmMain.nx44 := 2+a;
 frmMain.nx45 := -2+a;  //////////////


 //////////////////////

 frmMain.nx46 := -2+a;
 frmMain.nx47 := -2+a;
 frmMain.nx48 := 2+a;
 frmMain.nx49 := -2+a;
 frmMain.nx50 := 2+a;
 frmMain.nx51 := -3+a;
 frmMain.nx52 :=3+a;
 frmMain.nx53 := -3+a;
 frmMain.nx54 :=  3+a;
 frmMain.nx55 := -3+a;
 frmMain.nx56 := 3+a;
 frmMain.nx57 := -3+a;
 frmMain.nx58 := 3+a;
 frmMain.nx59 := -3+a;
 frmMain.nx60 := 3+a;
 frmMain.nx61 := -3+a;
 frmMain.nx62 := 3+a;
 frmMain.nx63 := -3+a;
 frmMain.nx64 := 3+a;
 frmMain.nx65 := -3+a;
 frmMain.nx66 := 3+a;
 frmMain.nx67 := -3+a;
 frmMain.nx68 := 3+a;
 frmMain.nx69 := -3+a;
 frmMain.nx70 := 3+a;


  ///3
 ///
 ///
 frmMain.nx71 := -4+a;
 frmMain.nx72 :=4+a;
 frmMain.nx73 := -4+a;
 frmMain.nx74 :=  4+a;
 frmMain.nx75 := -4+a;
 frmMain.nx76 := 4+a;
 frmMain.nx77 := -4+a;
 frmMain.nx78 := 4+a;
 frmMain.nx79 := -4+a;
 frmMain.nx80 := 4+a;
 frmMain.nx81 := -4+a;
 frmMain.nx82 := 4+a;
 frmMain.nx83 := -4+a;
 frmMain.nx84 := 4+a;
 frmMain.nx85 := -4+a;
 frmMain.nx86 := 4+a;
 frmMain.nx87 := -4+a;
 frmMain.nx88 := 4+a;
 frmMain.nx89 := -4+a;
 frmMain.nx90 := -2+a;

frmMain.nx94 :=0+a;
frmMain.nx95 :=-2+a;  //цифры
frmMain.nx96 :=-4+a;  //цифры
frmMain.nx97 :=-6+a;  //цифры
frmMain.nx98 := 2+a;  //цифры
frmMain.nx99 := 4+a;  //цифры
frmMain.nx100 := 6+a;  //цифры
frmMain.nx101 := 8+a;  //цифры
frmMain.nx102 := 10+a;  //цифры
frmMain.nx103 := 12+a;  //цифры

frmMain.nx104 := -8+a;  //буквы
frmMain.nx105 := -8+a;  //буквы
frmMain.nx106 := -8+a;  //буквы
frmMain.nx107 := -8+a;  //буквы
frmMain.nx108 := -8+a;  //буквы
frmMain.nx109 := -8+a;  //буквы
frmMain.nx110 := -8+a;  //буквы
frmMain.nx111 := -8+a;  //буквы
frmMain.nx112 := -8+a;  //буквы
frmMain.nx113 := -8+a;  //буквы

frmMain.nx114 := -6+a;  //корабль
frmMain.nx115 := 0+a;  //цифры
frmMain.nx116 :=-2+a;  //цифры
frmMain.nx117 :=-4+a;  //цифры
frmMain.nx118 :=-6+a;  //цифры
frmMain.nx119 := 2+a;  //цифры
frmMain.nx120 := 4+a;  //цифры
frmMain.nx121 := 6+a;  //цифры
frmMain.nx122 := 8+a;  //цифры
frmMain.nx123 := 10+a;  //цифры
frmMain.nx124 := 12+a;  //цифры
frmMain.nx125 := 0+a;
frmMain.nx126 := 0+a;
frmMain.nx127 := 0+a;
frmMain.nx128 := 2+a;
frmMain.nx129 := -2+a;
frmMain.nx130 := -4+a;
frmMain.nx131 := 4+a;
frmMain.nx132 := -6+a;
frmMain.nx133 := 6+a;
frmMain.nx134 := 8+a;
frmMain.nx135 := -8+a;
frmMain.nx136 := -2+a;
frmMain.nx137 := 2+a;
frmMain.nx138 := -4+a;
frmMain.nx139 := 4+a;
frmMain.nx140 := -2+a;
frmMain.nx141 := 2+a;
frmMain.nx142 := 0+a;
frmMain.nx143 := 2+a;
frmMain.nx144 := -2+a;
frmMain.nx145 := -4+a;
frmMain.nx146 := 4+a;
frmMain.nx147 := 6+a;
frmMain.nx148 := -6+a;
frmMain.nx149 := -6+a;
frmMain.nx150 := 6+a;
frmMain.nx151 := 2+a;
frmMain.nx152 := -2+a;
frmMain.nx153 := 2+a;
frmMain.nx154 := -2+a;
frmMain.nx155 := 0+a;
frmMain.nx156 := 0+a;
frmMain.nx157 := 4+a;
frmMain.nx158 := -4+a;
frmMain.nx159 := -6+a;
frmMain.nx160 := 6+a;
frmMain.nx161 := 4+a;
frmMain.nx162 := -4+a;
frmMain.nx163 := -6+a;
frmMain.nx164 := 6+a;
frmMain.nx165 := 4+a;
frmMain.nx166 := -4+a;
frmMain.nx167 := -6+a;
frmMain.nx168 := 6+a;
frmMain.nx169 := 4+a;
frmMain.nx170 := -4+a;
frmMain.nx171 := -6+a;
frmMain.nx172 := 6+a;
frmMain.nx173 := 4+a;
frmMain.nx174 := -4+a;
frmMain.nx175 := -6+a;
frmMain.nx176 := 6+a;
frmMain.nx177 := 4+a;
frmMain.nx178 := -4+a;
frmMain.nx179 := -6+a;
frmMain.nx180 := 6+a;
 frmMain.nx181 := 4+a;
 frmMain.nx182 := -4+a;
 frmMain.nx183 := -6+a;
 frmMain.nx184 := 6+a;
 frmMain.nx185 := 4+a;
 frmMain.nx186 := -4+a;
 frmMain.nx187 := -6+a;
 frmMain.nx188 := 6+a;
 frmMain.nx189 := -4+a;
 frmMain.nx190 := 4+a;
 frmMain.nx191 := -6+a;
 frmMain.nx192 := 6+a;
 frmMain.nx193 := -4+a;
 frmMain.nx194 := 4+a;
 frmMain.nx195 := -6+a;
 frmMain.nx196 := 6+a;
 frmMain.nx197 := -4+a;
 frmMain.nx198 := 4+a;
 frmMain.nx199 := -6+a;
 frmMain.nx200 := 6+a;
 frmMain.nx201 := -4+a;
 frmMain.nx202 := 4+a;
 frmMain.nx203 := -6+a;
 frmMain.nx204 := 6+a;
 frmMain.nx205 := 6+a;  //корабль
 frmMain.nx206 := 6+a;  //Подлодка
 frmMain.nx215 := -6+a;
 frmMain.frmGL.Width:=800;
 a:=0;
 frmMain.nz := 0+b;
  frmMain.nz1 := 0+b;
  frmMain.nz2 := 0+b;
 frmMain.nz3 := 1+b;
 frmMain.nz7 := 0+b;
 frmMain.nz8 := 2+b;
 frmMain.nz9 := 2+b;
  frmMain.nz10 := -2+b;
 frmMain.nz11 := -2+b;
 frmMain.nz12 := -2+b;
 frmMain.nz14 := -3+b;
 frmMain.nz15 := -3+b;
 frmMain.nz16 := -4+b;
 frmMain.nz17 := -4+b;
  frmMain.nz18 := -5+b;
 frmMain.nz19 := -5+b;
 frmMain.nz20 := -6+b;
 frmMain.nz21 := -7+b;
 frmMain.nz22 := -7+b;
  frmMain.nz23 := -8+b;
 frmMain.nz24 := -8+b;
  frmMain.nz25 := -9+b;
 frmMain.nz26 := -9+b;
 frmMain.nz27 := -10+b;
  frmMain.nz28 := -10+b;
  frmMain.nz29 := -11+b;
 frmMain.nz30 := -11+b;

// 1

 frmMain.nz31 := -2+b;
 frmMain.nz32 := -2+b;
 frmMain.nz33 := -3+b;
 frmMain.nz34 := -3+b;
 frmMain.nz35 := -4+b;
 frmMain.nz36 := -4+b;
  frmMain.nz37 := -5+b;
 frmMain.nz38 := -5+b;
 frmMain.nz39 := -6+b;
 frmMain.nz40 := -6+b;
 frmMain.nz41 := -7+b;
 frmMain.nz42 := -7+b;
 frmMain.nz43 := -8+b;
 frmMain.nz44 := -8+b;
 frmMain.nz45 := -9+b;  //////////////


 //////////////////////

 frmMain.nz46 := -9+b;
 frmMain.nz47 := -9+b;
 frmMain.nz48 := -10+b;
 frmMain.nz49 := -11+b;
 frmMain.nz50 := -11+b;
 frmMain.nz51 := -2+b;
 frmMain.nz52 :=-2+b;
 frmMain.nz53 := -3+b;
 frmMain.nz54 :=  3+b;
 frmMain.nz55 := -3+b;
 frmMain.nz56 := -4+b;
 frmMain.nz57 := -5+b;
 frmMain.nz58 := -5+b;
 frmMain.nz59 := -6+b;
 frmMain.nz60 := -6+b;
 frmMain.nz61 := -7+b;
 frmMain.nz62 := -7+b;
 frmMain.nz63 := -8+b;
 frmMain.nz64 := -8+b;
 frmMain.nz65 := -9+b;
 frmMain.nz66 := -9+b;
 frmMain.nz67 := -10+b;
 frmMain.nz68 := -10+b;
 frmMain.nz69 := -11+b;
 frmMain.nz70 := -11+b;


  ///3
 ///
 ///
 frmMain.nz71 := -2+b;
 frmMain.nz72 :=-2+b;
 frmMain.nz73 := -3+b;
 frmMain.nz74 :=  -3+b;
 frmMain.nz75 := -4+b;
 frmMain.nz76 := -4+b;
 frmMain.nz77 := -5+b;
 frmMain.nz78 := -5+b;
 frmMain.nz79 := -6+b;
 frmMain.nz80 := -6+b;
 frmMain.nz81 := -7+b;
 frmMain.nz82 := -7+b;
 frmMain.nz83 := -8+b;
 frmMain.nz84 := -8+b;
 frmMain.nz85 := -9+b;
 frmMain.nz86 := -9+b;
 frmMain.nz87 := -10+b;
 frmMain.nz88 := -10+b;
 frmMain.nz89 := -11+b;
 frmMain.nz90 := -2+b;

frmMain.nz94 :=1+b;
frmMain.nz95 :=1+b;  //цифры
frmMain.nz96 :=1+b;  //цифры
frmMain.nz97 :=1+b;  //цифры
frmMain.nz98 := 1+b;  //цифры
frmMain.nz99 := 1+b;  //цифры
frmMain.nz100 := 1+b;  //цифры
frmMain.nz101 := 1+b;  //цифры
frmMain.nz102 := 1+b;  //цифры
frmMain.nz103 := 1+b;  //цифры

frmMain.nz104 := -0+b;  //буквы
frmMain.nz105 := -2+b;  //буквы
frmMain.nz106 := -4+b;  //буквы
frmMain.nz107 := -6+b;  //буквы
frmMain.nz108 := -8+b;  //буквы
frmMain.nz109 := -10+b;  //буквы
frmMain.nz110 := -12+b;  //буквы
frmMain.nz111 := -14+b;  //буквы
frmMain.nz112 := -16+b;  //буквы
frmMain.nz113 := -18+b;  //буквы

frmMain.nz114 := -4+b;  //корабль
frmMain.nz115 := -18+b;  //цифры
frmMain.nz116 :=-18+b;  //цифры
frmMain.nz117 :=-18+b;  //цифры
frmMain.nz118 :=-18+b;  //цифры
frmMain.nz119 := -18+b;  //цифры
frmMain.nz120 := -18+b;  //цифры
frmMain.nz121 := -18+b;  //цифры
frmMain.nz122 := -18+b;  //цифры
frmMain.nz123 := -18+b;  //цифры
frmMain.nz124 := -18+b;  //цифры
frmMain.nz125 := -16+b;
frmMain.nz126 := -14+b;
frmMain.nz127 := -12+b;
frmMain.nz128 := -16+b;
frmMain.nz129 := -16+b;
frmMain.nz130 := -16+b;
frmMain.nz131 := -16+b;
frmMain.nz132 := -16+b;
frmMain.nz133 := -16+b;
frmMain.nz134 := -16+b;
frmMain.nz135 := -16+b;
frmMain.nz136 := -14+b;
frmMain.nz137 := -14+b;
frmMain.nz138 := -14+b;
frmMain.nz139 := -14+b;
frmMain.nz140 := -14+b;
frmMain.nz141 := -15+b;
frmMain.nz142 := -15+b;
frmMain.nz143 := -15+b;
frmMain.nz144 := -15+b;
frmMain.nz145 := -15+b;
frmMain.nz146 := -15+b;
frmMain.nz147 := -15+b;
frmMain.nz148 := -15+b;
frmMain.nz149 := -14+b;
frmMain.nz150 := -14+b;
frmMain.nz151 := -12+b;
frmMain.nz152 := -12+b;
frmMain.nz153 := -13+b;
frmMain.nz154 := -13+b;
frmMain.nz155 := -13+b;
frmMain.nz156 := -6+b;
frmMain.nz157 := -12+b;
frmMain.nz158 := -12+b;
frmMain.nz159 := -12+b;
frmMain.nz160 := -12+b;
frmMain.nz161 := -10+b;
frmMain.nz162 := -10+b;
frmMain.nz163 := -10+b;
frmMain.nz164 := -10+b;
frmMain.nz165 := -8+b;
frmMain.nz166 := -8+b;
frmMain.nz167 := -8+b;
frmMain.nz168 := -8+b;
frmMain.nz169 := -6+b;
frmMain.nz170 := -6+b;
frmMain.nz171 := -6+b;
frmMain.nz172 := -6+b;
frmMain.nz173 := -4+b;
frmMain.nz174 := -4+b;
frmMain.nz175 := -4+b;
frmMain.nz176 := -4+b;
frmMain.nz177 := -2+b;
frmMain.nz178 := -2+b;
frmMain.nz179 := -2+b;
frmMain.nz180 := -2+b;
 frmMain.nz181 := -3+b;
 frmMain.nz182 := -3+b;
 frmMain.nz183 := -3+b;
 frmMain.nz184 := -3+b;
 frmMain.nz185 := -5+b;
 frmMain.nz186 := -5+b;
 frmMain.nz187 := -5+b;
 frmMain.nz188 := -5+b;
 frmMain.nz189 := -7+b;
 frmMain.nz190 := -7+b;
 frmMain.nz191 := -7+b;
 frmMain.nz192 := -7+b;
 frmMain.nz193 := -9+b;
 frmMain.nz194 := -9+b;
 frmMain.nz195 := -9+b;
 frmMain.nz196 := -9+b;
 frmMain.nz197 := -11+b;
 frmMain.nz198 := -11+b;
 frmMain.nz199 := -11+b;
 frmMain.nz200 := -11+b;
 frmMain.nz201 := -13+b;
 frmMain.nz202 := -13+b;
 frmMain.nz203 := -13+b;
 frmMain.nz204 := -13+b;
 frmMain.nz205 := -4+b;  //корабль
 frmMain.nz206 := -8+b;  //Подлодка
 frmMain.nz215 := -12+b;
 frmMain.frmGL.Width:=800;
 b:=0;

 end;










 if (c=3) and (d=6) then
begin
StringGrid1.Cells[c,d]:='1';
a:=a+3;
b:=b+9;
frmMain.nx := 0+a;
  frmMain.nx1 := 0+a;
  frmMain.nx2 := 0+a;
 frmMain.nx3 := 0+a;
 frmMain.nx7 := -1+a;
 frmMain.nx8 := 1+a;
 frmMain.nx9 := -1+a;
  frmMain.nx10 := -2+a;
 frmMain.nx11 := -1+a;
 frmMain.nx12 := 1+a;
 frmMain.nx14 := 1+a;
 frmMain.nx15 := -1+a;
 frmMain.nx16 := -1+a;
 frmMain.nx17 := 1+a;
  frmMain.nx18 := -1+a;
 frmMain.nx19 := 1+a;
 frmMain.nx20 := -1+a;
 frmMain.nx21 := -1+a;
 frmMain.nx22 := 1+a;
  frmMain.nx23 := -1+a;
 frmMain.nx24 := 1+a;
  frmMain.nx25 := 1+a;
 frmMain.nx26 := -1+a;
 frmMain.nx27 := 1+a;
  frmMain.nx28 := -1+a;
  frmMain.nx29 := 1+a;
 frmMain.nx30 := -1+a;

// 1

 frmMain.nx31 := -2+a;
 frmMain.nx32 := 2+a;
 frmMain.nx33 := -2+a;
 frmMain.nx34 :=  2+a;
 frmMain.nx35 := -2+a;
 frmMain.nx36 := 2+a;
  frmMain.nx37 := -2+a;
 frmMain.nx38 := 2+a;
 frmMain.nx39 := -2+a;
 frmMain.nx40 := 2+a;
 frmMain.nx41 := -2+a;
 frmMain.nx42 := 2+a;
 frmMain.nx43 := -2+a;
 frmMain.nx44 := 2+a;
 frmMain.nx45 := -2+a;  //////////////


 //////////////////////

 frmMain.nx46 := -2+a;
 frmMain.nx47 := -2+a;
 frmMain.nx48 := 2+a;
 frmMain.nx49 := -2+a;
 frmMain.nx50 := 2+a;
 frmMain.nx51 := -3+a;
 frmMain.nx52 :=3+a;
 frmMain.nx53 := -3+a;
 frmMain.nx54 :=  3+a;
 frmMain.nx55 := -3+a;
 frmMain.nx56 := 3+a;
 frmMain.nx57 := -3+a;
 frmMain.nx58 := 3+a;
 frmMain.nx59 := -3+a;
 frmMain.nx60 := 3+a;
 frmMain.nx61 := -3+a;
 frmMain.nx62 := 3+a;
 frmMain.nx63 := -3+a;
 frmMain.nx64 := 3+a;
 frmMain.nx65 := -3+a;
 frmMain.nx66 := 3+a;
 frmMain.nx67 := -3+a;
 frmMain.nx68 := 3+a;
 frmMain.nx69 := -3+a;
 frmMain.nx70 := 3+a;


  ///3
 ///
 ///
 frmMain.nx71 := -4+a;
 frmMain.nx72 :=4+a;
 frmMain.nx73 := -4+a;
 frmMain.nx74 :=  4+a;
 frmMain.nx75 := -4+a;
 frmMain.nx76 := 4+a;
 frmMain.nx77 := -4+a;
 frmMain.nx78 := 4+a;
 frmMain.nx79 := -4+a;
 frmMain.nx80 := 4+a;
 frmMain.nx81 := -4+a;
 frmMain.nx82 := 4+a;
 frmMain.nx83 := -4+a;
 frmMain.nx84 := 4+a;
 frmMain.nx85 := -4+a;
 frmMain.nx86 := 4+a;
 frmMain.nx87 := -4+a;
 frmMain.nx88 := 4+a;
 frmMain.nx89 := -4+a;
 frmMain.nx90 := -2+a;

frmMain.nx94 :=0+a;
frmMain.nx95 :=-2+a;  //цифры
frmMain.nx96 :=-4+a;  //цифры
frmMain.nx97 :=-6+a;  //цифры
frmMain.nx98 := 2+a;  //цифры
frmMain.nx99 := 4+a;  //цифры
frmMain.nx100 := 6+a;  //цифры
frmMain.nx101 := 8+a;  //цифры
frmMain.nx102 := 10+a;  //цифры
frmMain.nx103 := 12+a;  //цифры

frmMain.nx104 := -8+a;  //буквы
frmMain.nx105 := -8+a;  //буквы
frmMain.nx106 := -8+a;  //буквы
frmMain.nx107 := -8+a;  //буквы
frmMain.nx108 := -8+a;  //буквы
frmMain.nx109 := -8+a;  //буквы
frmMain.nx110 := -8+a;  //буквы
frmMain.nx111 := -8+a;  //буквы
frmMain.nx112 := -8+a;  //буквы
frmMain.nx113 := -8+a;  //буквы

frmMain.nx114 := -6+a;  //корабль
frmMain.nx115 := 0+a;  //цифры
frmMain.nx116 :=-2+a;  //цифры
frmMain.nx117 :=-4+a;  //цифры
frmMain.nx118 :=-6+a;  //цифры
frmMain.nx119 := 2+a;  //цифры
frmMain.nx120 := 4+a;  //цифры
frmMain.nx121 := 6+a;  //цифры
frmMain.nx122 := 8+a;  //цифры
frmMain.nx123 := 10+a;  //цифры
frmMain.nx124 := 12+a;  //цифры
frmMain.nx125 := 0+a;
frmMain.nx126 := 0+a;
frmMain.nx127 := 0+a;
frmMain.nx128 := 2+a;
frmMain.nx129 := -2+a;
frmMain.nx130 := -4+a;
frmMain.nx131 := 4+a;
frmMain.nx132 := -6+a;
frmMain.nx133 := 6+a;
frmMain.nx134 := 8+a;
frmMain.nx135 := -8+a;
frmMain.nx136 := -2+a;
frmMain.nx137 := 2+a;
frmMain.nx138 := -4+a;
frmMain.nx139 := 4+a;
frmMain.nx140 := -2+a;
frmMain.nx141 := 2+a;
frmMain.nx142 := 0+a;
frmMain.nx143 := 2+a;
frmMain.nx144 := -2+a;
frmMain.nx145 := -4+a;
frmMain.nx146 := 4+a;
frmMain.nx147 := 6+a;
frmMain.nx148 := -6+a;
frmMain.nx149 := -6+a;
frmMain.nx150 := 6+a;
frmMain.nx151 := 2+a;
frmMain.nx152 := -2+a;
frmMain.nx153 := 2+a;
frmMain.nx154 := -2+a;
frmMain.nx155 := 0+a;
frmMain.nx156 := 0+a;
frmMain.nx157 := 4+a;
frmMain.nx158 := -4+a;
frmMain.nx159 := -6+a;
frmMain.nx160 := 6+a;
frmMain.nx161 := 4+a;
frmMain.nx162 := -4+a;
frmMain.nx163 := -6+a;
frmMain.nx164 := 6+a;
frmMain.nx165 := 4+a;
frmMain.nx166 := -4+a;
frmMain.nx167 := -6+a;
frmMain.nx168 := 6+a;
frmMain.nx169 := 4+a;
frmMain.nx170 := -4+a;
frmMain.nx171 := -6+a;
frmMain.nx172 := 6+a;
frmMain.nx173 := 4+a;
frmMain.nx174 := -4+a;
frmMain.nx175 := -6+a;
frmMain.nx176 := 6+a;
frmMain.nx177 := 4+a;
frmMain.nx178 := -4+a;
frmMain.nx179 := -6+a;
frmMain.nx180 := 6+a;
 frmMain.nx181 := 4+a;
 frmMain.nx182 := -4+a;
 frmMain.nx183 := -6+a;
 frmMain.nx184 := 6+a;
 frmMain.nx185 := 4+a;
 frmMain.nx186 := -4+a;
 frmMain.nx187 := -6+a;
 frmMain.nx188 := 6+a;
 frmMain.nx189 := -4+a;
 frmMain.nx190 := 4+a;
 frmMain.nx191 := -6+a;
 frmMain.nx192 := 6+a;
 frmMain.nx193 := -4+a;
 frmMain.nx194 := 4+a;
 frmMain.nx195 := -6+a;
 frmMain.nx196 := 6+a;
 frmMain.nx197 := -4+a;
 frmMain.nx198 := 4+a;
 frmMain.nx199 := -6+a;
 frmMain.nx200 := 6+a;
 frmMain.nx201 := -4+a;
 frmMain.nx202 := 4+a;
 frmMain.nx203 := -6+a;
 frmMain.nx204 := 6+a;
 frmMain.nx205 := 6+a;  //корабль
 frmMain.nx206 := 6+a;  //Подлодка
 frmMain.nx215 := -6+a;
 frmMain.frmGL.Width:=800;
 a:=0;
 frmMain.nz := 0+b;
  frmMain.nz1 := 0+b;
  frmMain.nz2 := 0+b;
 frmMain.nz3 := 1+b;
 frmMain.nz7 := 0+b;
 frmMain.nz8 := 2+b;
 frmMain.nz9 := 2+b;
  frmMain.nz10 := -2+b;
 frmMain.nz11 := -2+b;
 frmMain.nz12 := -2+b;
 frmMain.nz14 := -3+b;
 frmMain.nz15 := -3+b;
 frmMain.nz16 := -4+b;
 frmMain.nz17 := -4+b;
  frmMain.nz18 := -5+b;
 frmMain.nz19 := -5+b;
 frmMain.nz20 := -6+b;
 frmMain.nz21 := -7+b;
 frmMain.nz22 := -7+b;
  frmMain.nz23 := -8+b;
 frmMain.nz24 := -8+b;
  frmMain.nz25 := -9+b;
 frmMain.nz26 := -9+b;
 frmMain.nz27 := -10+b;
  frmMain.nz28 := -10+b;
  frmMain.nz29 := -11+b;
 frmMain.nz30 := -11+b;

// 1

 frmMain.nz31 := -2+b;
 frmMain.nz32 := -2+b;
 frmMain.nz33 := -3+b;
 frmMain.nz34 := -3+b;
 frmMain.nz35 := -4+b;
 frmMain.nz36 := -4+b;
  frmMain.nz37 := -5+b;
 frmMain.nz38 := -5+b;
 frmMain.nz39 := -6+b;
 frmMain.nz40 := -6+b;
 frmMain.nz41 := -7+b;
 frmMain.nz42 := -7+b;
 frmMain.nz43 := -8+b;
 frmMain.nz44 := -8+b;
 frmMain.nz45 := -9+b;  //////////////


 //////////////////////

 frmMain.nz46 := -9+b;
 frmMain.nz47 := -9+b;
 frmMain.nz48 := -10+b;
 frmMain.nz49 := -11+b;
 frmMain.nz50 := -11+b;
 frmMain.nz51 := -2+b;
 frmMain.nz52 :=-2+b;
 frmMain.nz53 := -3+b;
 frmMain.nz54 :=  3+b;
 frmMain.nz55 := -3+b;
 frmMain.nz56 := -4+b;
 frmMain.nz57 := -5+b;
 frmMain.nz58 := -5+b;
 frmMain.nz59 := -6+b;
 frmMain.nz60 := -6+b;
 frmMain.nz61 := -7+b;
 frmMain.nz62 := -7+b;
 frmMain.nz63 := -8+b;
 frmMain.nz64 := -8+b;
 frmMain.nz65 := -9+b;
 frmMain.nz66 := -9+b;
 frmMain.nz67 := -10+b;
 frmMain.nz68 := -10+b;
 frmMain.nz69 := -11+b;
 frmMain.nz70 := -11+b;


  ///3
 ///
 ///
 frmMain.nz71 := -2+b;
 frmMain.nz72 :=-2+b;
 frmMain.nz73 := -3+b;
 frmMain.nz74 :=  -3+b;
 frmMain.nz75 := -4+b;
 frmMain.nz76 := -4+b;
 frmMain.nz77 := -5+b;
 frmMain.nz78 := -5+b;
 frmMain.nz79 := -6+b;
 frmMain.nz80 := -6+b;
 frmMain.nz81 := -7+b;
 frmMain.nz82 := -7+b;
 frmMain.nz83 := -8+b;
 frmMain.nz84 := -8+b;
 frmMain.nz85 := -9+b;
 frmMain.nz86 := -9+b;
 frmMain.nz87 := -10+b;
 frmMain.nz88 := -10+b;
 frmMain.nz89 := -11+b;
 frmMain.nz90 := -2+b;

frmMain.nz94 :=1+b;
frmMain.nz95 :=1+b;  //цифры
frmMain.nz96 :=1+b;  //цифры
frmMain.nz97 :=1+b;  //цифры
frmMain.nz98 := 1+b;  //цифры
frmMain.nz99 := 1+b;  //цифры
frmMain.nz100 := 1+b;  //цифры
frmMain.nz101 := 1+b;  //цифры
frmMain.nz102 := 1+b;  //цифры
frmMain.nz103 := 1+b;  //цифры

frmMain.nz104 := -0+b;  //буквы
frmMain.nz105 := -2+b;  //буквы
frmMain.nz106 := -4+b;  //буквы
frmMain.nz107 := -6+b;  //буквы
frmMain.nz108 := -8+b;  //буквы
frmMain.nz109 := -10+b;  //буквы
frmMain.nz110 := -12+b;  //буквы
frmMain.nz111 := -14+b;  //буквы
frmMain.nz112 := -16+b;  //буквы
frmMain.nz113 := -18+b;  //буквы

frmMain.nz114 := -4+b;  //корабль
frmMain.nz115 := -18+b;  //цифры
frmMain.nz116 :=-18+b;  //цифры
frmMain.nz117 :=-18+b;  //цифры
frmMain.nz118 :=-18+b;  //цифры
frmMain.nz119 := -18+b;  //цифры
frmMain.nz120 := -18+b;  //цифры
frmMain.nz121 := -18+b;  //цифры
frmMain.nz122 := -18+b;  //цифры
frmMain.nz123 := -18+b;  //цифры
frmMain.nz124 := -18+b;  //цифры
frmMain.nz125 := -16+b;
frmMain.nz126 := -14+b;
frmMain.nz127 := -12+b;
frmMain.nz128 := -16+b;
frmMain.nz129 := -16+b;
frmMain.nz130 := -16+b;
frmMain.nz131 := -16+b;
frmMain.nz132 := -16+b;
frmMain.nz133 := -16+b;
frmMain.nz134 := -16+b;
frmMain.nz135 := -16+b;
frmMain.nz136 := -14+b;
frmMain.nz137 := -14+b;
frmMain.nz138 := -14+b;
frmMain.nz139 := -14+b;
frmMain.nz140 := -14+b;
frmMain.nz141 := -15+b;
frmMain.nz142 := -15+b;
frmMain.nz143 := -15+b;
frmMain.nz144 := -15+b;
frmMain.nz145 := -15+b;
frmMain.nz146 := -15+b;
frmMain.nz147 := -15+b;
frmMain.nz148 := -15+b;
frmMain.nz149 := -14+b;
frmMain.nz150 := -14+b;
frmMain.nz151 := -12+b;
frmMain.nz152 := -12+b;
frmMain.nz153 := -13+b;
frmMain.nz154 := -13+b;
frmMain.nz155 := -13+b;
frmMain.nz156 := -6+b;
frmMain.nz157 := -12+b;
frmMain.nz158 := -12+b;
frmMain.nz159 := -12+b;
frmMain.nz160 := -12+b;
frmMain.nz161 := -10+b;
frmMain.nz162 := -10+b;
frmMain.nz163 := -10+b;
frmMain.nz164 := -10+b;
frmMain.nz165 := -8+b;
frmMain.nz166 := -8+b;
frmMain.nz167 := -8+b;
frmMain.nz168 := -8+b;
frmMain.nz169 := -6+b;
frmMain.nz170 := -6+b;
frmMain.nz171 := -6+b;
frmMain.nz172 := -6+b;
frmMain.nz173 := -4+b;
frmMain.nz174 := -4+b;
frmMain.nz175 := -4+b;
frmMain.nz176 := -4+b;
frmMain.nz177 := -2+b;
frmMain.nz178 := -2+b;
frmMain.nz179 := -2+b;
frmMain.nz180 := -2+b;
 frmMain.nz181 := -3+b;
 frmMain.nz182 := -3+b;
 frmMain.nz183 := -3+b;
 frmMain.nz184 := -3+b;
 frmMain.nz185 := -5+b;
 frmMain.nz186 := -5+b;
 frmMain.nz187 := -5+b;
 frmMain.nz188 := -5+b;
 frmMain.nz189 := -7+b;
 frmMain.nz190 := -7+b;
 frmMain.nz191 := -7+b;
 frmMain.nz192 := -7+b;
 frmMain.nz193 := -9+b;
 frmMain.nz194 := -9+b;
 frmMain.nz195 := -9+b;
 frmMain.nz196 := -9+b;
 frmMain.nz197 := -11+b;
 frmMain.nz198 := -11+b;
 frmMain.nz199 := -11+b;
 frmMain.nz200 := -11+b;
 frmMain.nz201 := -13+b;
 frmMain.nz202 := -13+b;
 frmMain.nz203 := -13+b;
 frmMain.nz204 := -13+b;
 frmMain.nz205 := -4+b;  //корабль
 frmMain.nz206 := -8+b;  //Подлодка
 frmMain.nz215 := -12+b;
 frmMain.frmGL.Width:=800;
 b:=0;

 end;











 if (c=3) and (d=5) then
begin
StringGrid1.Cells[c,d]:='1';
a:=a+3;
b:=b+11;
frmMain.nx := 0+a;
  frmMain.nx1 := 0+a;
  frmMain.nx2 := 0+a;
 frmMain.nx3 := 0+a;
 frmMain.nx7 := -1+a;
 frmMain.nx8 := 1+a;
 frmMain.nx9 := -1+a;
  frmMain.nx10 := -2+a;
 frmMain.nx11 := -1+a;
 frmMain.nx12 := 1+a;
 frmMain.nx14 := 1+a;
 frmMain.nx15 := -1+a;
 frmMain.nx16 := -1+a;
 frmMain.nx17 := 1+a;
  frmMain.nx18 := -1+a;
 frmMain.nx19 := 1+a;
 frmMain.nx20 := -1+a;
 frmMain.nx21 := -1+a;
 frmMain.nx22 := 1+a;
  frmMain.nx23 := -1+a;
 frmMain.nx24 := 1+a;
  frmMain.nx25 := 1+a;
 frmMain.nx26 := -1+a;
 frmMain.nx27 := 1+a;
  frmMain.nx28 := -1+a;
  frmMain.nx29 := 1+a;
 frmMain.nx30 := -1+a;

// 1

 frmMain.nx31 := -2+a;
 frmMain.nx32 := 2+a;
 frmMain.nx33 := -2+a;
 frmMain.nx34 :=  2+a;
 frmMain.nx35 := -2+a;
 frmMain.nx36 := 2+a;
  frmMain.nx37 := -2+a;
 frmMain.nx38 := 2+a;
 frmMain.nx39 := -2+a;
 frmMain.nx40 := 2+a;
 frmMain.nx41 := -2+a;
 frmMain.nx42 := 2+a;
 frmMain.nx43 := -2+a;
 frmMain.nx44 := 2+a;
 frmMain.nx45 := -2+a;  //////////////


 //////////////////////

 frmMain.nx46 := -2+a;
 frmMain.nx47 := -2+a;
 frmMain.nx48 := 2+a;
 frmMain.nx49 := -2+a;
 frmMain.nx50 := 2+a;
 frmMain.nx51 := -3+a;
 frmMain.nx52 :=3+a;
 frmMain.nx53 := -3+a;
 frmMain.nx54 :=  3+a;
 frmMain.nx55 := -3+a;
 frmMain.nx56 := 3+a;
 frmMain.nx57 := -3+a;
 frmMain.nx58 := 3+a;
 frmMain.nx59 := -3+a;
 frmMain.nx60 := 3+a;
 frmMain.nx61 := -3+a;
 frmMain.nx62 := 3+a;
 frmMain.nx63 := -3+a;
 frmMain.nx64 := 3+a;
 frmMain.nx65 := -3+a;
 frmMain.nx66 := 3+a;
 frmMain.nx67 := -3+a;
 frmMain.nx68 := 3+a;
 frmMain.nx69 := -3+a;
 frmMain.nx70 := 3+a;


  ///3
 ///
 ///
 frmMain.nx71 := -4+a;
 frmMain.nx72 :=4+a;
 frmMain.nx73 := -4+a;
 frmMain.nx74 :=  4+a;
 frmMain.nx75 := -4+a;
 frmMain.nx76 := 4+a;
 frmMain.nx77 := -4+a;
 frmMain.nx78 := 4+a;
 frmMain.nx79 := -4+a;
 frmMain.nx80 := 4+a;
 frmMain.nx81 := -4+a;
 frmMain.nx82 := 4+a;
 frmMain.nx83 := -4+a;
 frmMain.nx84 := 4+a;
 frmMain.nx85 := -4+a;
 frmMain.nx86 := 4+a;
 frmMain.nx87 := -4+a;
 frmMain.nx88 := 4+a;
 frmMain.nx89 := -4+a;
 frmMain.nx90 := -2+a;

frmMain.nx94 :=0+a;
frmMain.nx95 :=-2+a;  //цифры
frmMain.nx96 :=-4+a;  //цифры
frmMain.nx97 :=-6+a;  //цифры
frmMain.nx98 := 2+a;  //цифры
frmMain.nx99 := 4+a;  //цифры
frmMain.nx100 := 6+a;  //цифры
frmMain.nx101 := 8+a;  //цифры
frmMain.nx102 := 10+a;  //цифры
frmMain.nx103 := 12+a;  //цифры

frmMain.nx104 := -8+a;  //буквы
frmMain.nx105 := -8+a;  //буквы
frmMain.nx106 := -8+a;  //буквы
frmMain.nx107 := -8+a;  //буквы
frmMain.nx108 := -8+a;  //буквы
frmMain.nx109 := -8+a;  //буквы
frmMain.nx110 := -8+a;  //буквы
frmMain.nx111 := -8+a;  //буквы
frmMain.nx112 := -8+a;  //буквы
frmMain.nx113 := -8+a;  //буквы

frmMain.nx114 := -6+a;  //корабль
frmMain.nx115 := 0+a;  //цифры
frmMain.nx116 :=-2+a;  //цифры
frmMain.nx117 :=-4+a;  //цифры
frmMain.nx118 :=-6+a;  //цифры
frmMain.nx119 := 2+a;  //цифры
frmMain.nx120 := 4+a;  //цифры
frmMain.nx121 := 6+a;  //цифры
frmMain.nx122 := 8+a;  //цифры
frmMain.nx123 := 10+a;  //цифры
frmMain.nx124 := 12+a;  //цифры
frmMain.nx125 := 0+a;
frmMain.nx126 := 0+a;
frmMain.nx127 := 0+a;
frmMain.nx128 := 2+a;
frmMain.nx129 := -2+a;
frmMain.nx130 := -4+a;
frmMain.nx131 := 4+a;
frmMain.nx132 := -6+a;
frmMain.nx133 := 6+a;
frmMain.nx134 := 8+a;
frmMain.nx135 := -8+a;
frmMain.nx136 := -2+a;
frmMain.nx137 := 2+a;
frmMain.nx138 := -4+a;
frmMain.nx139 := 4+a;
frmMain.nx140 := -2+a;
frmMain.nx141 := 2+a;
frmMain.nx142 := 0+a;
frmMain.nx143 := 2+a;
frmMain.nx144 := -2+a;
frmMain.nx145 := -4+a;
frmMain.nx146 := 4+a;
frmMain.nx147 := 6+a;
frmMain.nx148 := -6+a;
frmMain.nx149 := -6+a;
frmMain.nx150 := 6+a;
frmMain.nx151 := 2+a;
frmMain.nx152 := -2+a;
frmMain.nx153 := 2+a;
frmMain.nx154 := -2+a;
frmMain.nx155 := 0+a;
frmMain.nx156 := 0+a;
frmMain.nx157 := 4+a;
frmMain.nx158 := -4+a;
frmMain.nx159 := -6+a;
frmMain.nx160 := 6+a;
frmMain.nx161 := 4+a;
frmMain.nx162 := -4+a;
frmMain.nx163 := -6+a;
frmMain.nx164 := 6+a;
frmMain.nx165 := 4+a;
frmMain.nx166 := -4+a;
frmMain.nx167 := -6+a;
frmMain.nx168 := 6+a;
frmMain.nx169 := 4+a;
frmMain.nx170 := -4+a;
frmMain.nx171 := -6+a;
frmMain.nx172 := 6+a;
frmMain.nx173 := 4+a;
frmMain.nx174 := -4+a;
frmMain.nx175 := -6+a;
frmMain.nx176 := 6+a;
frmMain.nx177 := 4+a;
frmMain.nx178 := -4+a;
frmMain.nx179 := -6+a;
frmMain.nx180 := 6+a;
 frmMain.nx181 := 4+a;
 frmMain.nx182 := -4+a;
 frmMain.nx183 := -6+a;
 frmMain.nx184 := 6+a;
 frmMain.nx185 := 4+a;
 frmMain.nx186 := -4+a;
 frmMain.nx187 := -6+a;
 frmMain.nx188 := 6+a;
 frmMain.nx189 := -4+a;
 frmMain.nx190 := 4+a;
 frmMain.nx191 := -6+a;
 frmMain.nx192 := 6+a;
 frmMain.nx193 := -4+a;
 frmMain.nx194 := 4+a;
 frmMain.nx195 := -6+a;
 frmMain.nx196 := 6+a;
 frmMain.nx197 := -4+a;
 frmMain.nx198 := 4+a;
 frmMain.nx199 := -6+a;
 frmMain.nx200 := 6+a;
 frmMain.nx201 := -4+a;
 frmMain.nx202 := 4+a;
 frmMain.nx203 := -6+a;
 frmMain.nx204 := 6+a;
 frmMain.nx205 := 6+a;  //корабль
 frmMain.nx206 := 6+a;  //Подлодка
 frmMain.nx215 := -6+a;
 frmMain.frmGL.Width:=800;
 a:=0;
 frmMain.nz := 0+b;
  frmMain.nz1 := 0+b;
  frmMain.nz2 := 0+b;
 frmMain.nz3 := 1+b;
 frmMain.nz7 := 0+b;
 frmMain.nz8 := 2+b;
 frmMain.nz9 := 2+b;
  frmMain.nz10 := -2+b;
 frmMain.nz11 := -2+b;
 frmMain.nz12 := -2+b;
 frmMain.nz14 := -3+b;
 frmMain.nz15 := -3+b;
 frmMain.nz16 := -4+b;
 frmMain.nz17 := -4+b;
  frmMain.nz18 := -5+b;
 frmMain.nz19 := -5+b;
 frmMain.nz20 := -6+b;
 frmMain.nz21 := -7+b;
 frmMain.nz22 := -7+b;
  frmMain.nz23 := -8+b;
 frmMain.nz24 := -8+b;
  frmMain.nz25 := -9+b;
 frmMain.nz26 := -9+b;
 frmMain.nz27 := -10+b;
  frmMain.nz28 := -10+b;
  frmMain.nz29 := -11+b;
 frmMain.nz30 := -11+b;

// 1

 frmMain.nz31 := -2+b;
 frmMain.nz32 := -2+b;
 frmMain.nz33 := -3+b;
 frmMain.nz34 := -3+b;
 frmMain.nz35 := -4+b;
 frmMain.nz36 := -4+b;
  frmMain.nz37 := -5+b;
 frmMain.nz38 := -5+b;
 frmMain.nz39 := -6+b;
 frmMain.nz40 := -6+b;
 frmMain.nz41 := -7+b;
 frmMain.nz42 := -7+b;
 frmMain.nz43 := -8+b;
 frmMain.nz44 := -8+b;
 frmMain.nz45 := -9+b;  //////////////


 //////////////////////

 frmMain.nz46 := -9+b;
 frmMain.nz47 := -9+b;
 frmMain.nz48 := -10+b;
 frmMain.nz49 := -11+b;
 frmMain.nz50 := -11+b;
 frmMain.nz51 := -2+b;
 frmMain.nz52 :=-2+b;
 frmMain.nz53 := -3+b;
 frmMain.nz54 :=  3+b;
 frmMain.nz55 := -3+b;
 frmMain.nz56 := -4+b;
 frmMain.nz57 := -5+b;
 frmMain.nz58 := -5+b;
 frmMain.nz59 := -6+b;
 frmMain.nz60 := -6+b;
 frmMain.nz61 := -7+b;
 frmMain.nz62 := -7+b;
 frmMain.nz63 := -8+b;
 frmMain.nz64 := -8+b;
 frmMain.nz65 := -9+b;
 frmMain.nz66 := -9+b;
 frmMain.nz67 := -10+b;
 frmMain.nz68 := -10+b;
 frmMain.nz69 := -11+b;
 frmMain.nz70 := -11+b;


  ///3
 ///
 ///
 frmMain.nz71 := -2+b;
 frmMain.nz72 :=-2+b;
 frmMain.nz73 := -3+b;
 frmMain.nz74 :=  -3+b;
 frmMain.nz75 := -4+b;
 frmMain.nz76 := -4+b;
 frmMain.nz77 := -5+b;
 frmMain.nz78 := -5+b;
 frmMain.nz79 := -6+b;
 frmMain.nz80 := -6+b;
 frmMain.nz81 := -7+b;
 frmMain.nz82 := -7+b;
 frmMain.nz83 := -8+b;
 frmMain.nz84 := -8+b;
 frmMain.nz85 := -9+b;
 frmMain.nz86 := -9+b;
 frmMain.nz87 := -10+b;
 frmMain.nz88 := -10+b;
 frmMain.nz89 := -11+b;
 frmMain.nz90 := -2+b;

frmMain.nz94 :=1+b;
frmMain.nz95 :=1+b;  //цифры
frmMain.nz96 :=1+b;  //цифры
frmMain.nz97 :=1+b;  //цифры
frmMain.nz98 := 1+b;  //цифры
frmMain.nz99 := 1+b;  //цифры
frmMain.nz100 := 1+b;  //цифры
frmMain.nz101 := 1+b;  //цифры
frmMain.nz102 := 1+b;  //цифры
frmMain.nz103 := 1+b;  //цифры

frmMain.nz104 := -0+b;  //буквы
frmMain.nz105 := -2+b;  //буквы
frmMain.nz106 := -4+b;  //буквы
frmMain.nz107 := -6+b;  //буквы
frmMain.nz108 := -8+b;  //буквы
frmMain.nz109 := -10+b;  //буквы
frmMain.nz110 := -12+b;  //буквы
frmMain.nz111 := -14+b;  //буквы
frmMain.nz112 := -16+b;  //буквы
frmMain.nz113 := -18+b;  //буквы

frmMain.nz114 := -4+b;  //корабль
frmMain.nz115 := -18+b;  //цифры
frmMain.nz116 :=-18+b;  //цифры
frmMain.nz117 :=-18+b;  //цифры
frmMain.nz118 :=-18+b;  //цифры
frmMain.nz119 := -18+b;  //цифры
frmMain.nz120 := -18+b;  //цифры
frmMain.nz121 := -18+b;  //цифры
frmMain.nz122 := -18+b;  //цифры
frmMain.nz123 := -18+b;  //цифры
frmMain.nz124 := -18+b;  //цифры
frmMain.nz125 := -16+b;
frmMain.nz126 := -14+b;
frmMain.nz127 := -12+b;
frmMain.nz128 := -16+b;
frmMain.nz129 := -16+b;
frmMain.nz130 := -16+b;
frmMain.nz131 := -16+b;
frmMain.nz132 := -16+b;
frmMain.nz133 := -16+b;
frmMain.nz134 := -16+b;
frmMain.nz135 := -16+b;
frmMain.nz136 := -14+b;
frmMain.nz137 := -14+b;
frmMain.nz138 := -14+b;
frmMain.nz139 := -14+b;
frmMain.nz140 := -14+b;
frmMain.nz141 := -15+b;
frmMain.nz142 := -15+b;
frmMain.nz143 := -15+b;
frmMain.nz144 := -15+b;
frmMain.nz145 := -15+b;
frmMain.nz146 := -15+b;
frmMain.nz147 := -15+b;
frmMain.nz148 := -15+b;
frmMain.nz149 := -14+b;
frmMain.nz150 := -14+b;
frmMain.nz151 := -12+b;
frmMain.nz152 := -12+b;
frmMain.nz153 := -13+b;
frmMain.nz154 := -13+b;
frmMain.nz155 := -13+b;
frmMain.nz156 := -6+b;
frmMain.nz157 := -12+b;
frmMain.nz158 := -12+b;
frmMain.nz159 := -12+b;
frmMain.nz160 := -12+b;
frmMain.nz161 := -10+b;
frmMain.nz162 := -10+b;
frmMain.nz163 := -10+b;
frmMain.nz164 := -10+b;
frmMain.nz165 := -8+b;
frmMain.nz166 := -8+b;
frmMain.nz167 := -8+b;
frmMain.nz168 := -8+b;
frmMain.nz169 := -6+b;
frmMain.nz170 := -6+b;
frmMain.nz171 := -6+b;
frmMain.nz172 := -6+b;
frmMain.nz173 := -4+b;
frmMain.nz174 := -4+b;
frmMain.nz175 := -4+b;
frmMain.nz176 := -4+b;
frmMain.nz177 := -2+b;
frmMain.nz178 := -2+b;
frmMain.nz179 := -2+b;
frmMain.nz180 := -2+b;
 frmMain.nz181 := -3+b;
 frmMain.nz182 := -3+b;
 frmMain.nz183 := -3+b;
 frmMain.nz184 := -3+b;
 frmMain.nz185 := -5+b;
 frmMain.nz186 := -5+b;
 frmMain.nz187 := -5+b;
 frmMain.nz188 := -5+b;
 frmMain.nz189 := -7+b;
 frmMain.nz190 := -7+b;
 frmMain.nz191 := -7+b;
 frmMain.nz192 := -7+b;
 frmMain.nz193 := -9+b;
 frmMain.nz194 := -9+b;
 frmMain.nz195 := -9+b;
 frmMain.nz196 := -9+b;
 frmMain.nz197 := -11+b;
 frmMain.nz198 := -11+b;
 frmMain.nz199 := -11+b;
 frmMain.nz200 := -11+b;
 frmMain.nz201 := -13+b;
 frmMain.nz202 := -13+b;
 frmMain.nz203 := -13+b;
 frmMain.nz204 := -13+b;
 frmMain.nz205 := -4+b;  //корабль
 frmMain.nz206 := -8+b;  //Подлодка
 frmMain.nz215 := -12+b;
 frmMain.frmGL.Width:=800;
 b:=0;

 end;









 if (c=3) and (d=4) then
begin
StringGrid1.Cells[c,d]:='1';
a:=a+3;
b:=b+13;
frmMain.nx := 0+a;
  frmMain.nx1 := 0+a;
  frmMain.nx2 := 0+a;
 frmMain.nx3 := 0+a;
 frmMain.nx7 := -1+a;
 frmMain.nx8 := 1+a;
 frmMain.nx9 := -1+a;
  frmMain.nx10 := -2+a;
 frmMain.nx11 := -1+a;
 frmMain.nx12 := 1+a;
 frmMain.nx14 := 1+a;
 frmMain.nx15 := -1+a;
 frmMain.nx16 := -1+a;
 frmMain.nx17 := 1+a;
  frmMain.nx18 := -1+a;
 frmMain.nx19 := 1+a;
 frmMain.nx20 := -1+a;
 frmMain.nx21 := -1+a;
 frmMain.nx22 := 1+a;
  frmMain.nx23 := -1+a;
 frmMain.nx24 := 1+a;
  frmMain.nx25 := 1+a;
 frmMain.nx26 := -1+a;
 frmMain.nx27 := 1+a;
  frmMain.nx28 := -1+a;
  frmMain.nx29 := 1+a;
 frmMain.nx30 := -1+a;

// 1

 frmMain.nx31 := -2+a;
 frmMain.nx32 := 2+a;
 frmMain.nx33 := -2+a;
 frmMain.nx34 :=  2+a;
 frmMain.nx35 := -2+a;
 frmMain.nx36 := 2+a;
  frmMain.nx37 := -2+a;
 frmMain.nx38 := 2+a;
 frmMain.nx39 := -2+a;
 frmMain.nx40 := 2+a;
 frmMain.nx41 := -2+a;
 frmMain.nx42 := 2+a;
 frmMain.nx43 := -2+a;
 frmMain.nx44 := 2+a;
 frmMain.nx45 := -2+a;  //////////////


 //////////////////////

 frmMain.nx46 := -2+a;
 frmMain.nx47 := -2+a;
 frmMain.nx48 := 2+a;
 frmMain.nx49 := -2+a;
 frmMain.nx50 := 2+a;
 frmMain.nx51 := -3+a;
 frmMain.nx52 :=3+a;
 frmMain.nx53 := -3+a;
 frmMain.nx54 :=  3+a;
 frmMain.nx55 := -3+a;
 frmMain.nx56 := 3+a;
 frmMain.nx57 := -3+a;
 frmMain.nx58 := 3+a;
 frmMain.nx59 := -3+a;
 frmMain.nx60 := 3+a;
 frmMain.nx61 := -3+a;
 frmMain.nx62 := 3+a;
 frmMain.nx63 := -3+a;
 frmMain.nx64 := 3+a;
 frmMain.nx65 := -3+a;
 frmMain.nx66 := 3+a;
 frmMain.nx67 := -3+a;
 frmMain.nx68 := 3+a;
 frmMain.nx69 := -3+a;
 frmMain.nx70 := 3+a;


  ///3
 ///
 ///
 frmMain.nx71 := -4+a;
 frmMain.nx72 :=4+a;
 frmMain.nx73 := -4+a;
 frmMain.nx74 :=  4+a;
 frmMain.nx75 := -4+a;
 frmMain.nx76 := 4+a;
 frmMain.nx77 := -4+a;
 frmMain.nx78 := 4+a;
 frmMain.nx79 := -4+a;
 frmMain.nx80 := 4+a;
 frmMain.nx81 := -4+a;
 frmMain.nx82 := 4+a;
 frmMain.nx83 := -4+a;
 frmMain.nx84 := 4+a;
 frmMain.nx85 := -4+a;
 frmMain.nx86 := 4+a;
 frmMain.nx87 := -4+a;
 frmMain.nx88 := 4+a;
 frmMain.nx89 := -4+a;
 frmMain.nx90 := -2+a;

frmMain.nx94 :=0+a;
frmMain.nx95 :=-2+a;  //цифры
frmMain.nx96 :=-4+a;  //цифры
frmMain.nx97 :=-6+a;  //цифры
frmMain.nx98 := 2+a;  //цифры
frmMain.nx99 := 4+a;  //цифры
frmMain.nx100 := 6+a;  //цифры
frmMain.nx101 := 8+a;  //цифры
frmMain.nx102 := 10+a;  //цифры
frmMain.nx103 := 12+a;  //цифры

frmMain.nx104 := -8+a;  //буквы
frmMain.nx105 := -8+a;  //буквы
frmMain.nx106 := -8+a;  //буквы
frmMain.nx107 := -8+a;  //буквы
frmMain.nx108 := -8+a;  //буквы
frmMain.nx109 := -8+a;  //буквы
frmMain.nx110 := -8+a;  //буквы
frmMain.nx111 := -8+a;  //буквы
frmMain.nx112 := -8+a;  //буквы
frmMain.nx113 := -8+a;  //буквы

frmMain.nx114 := -6+a;  //корабль
frmMain.nx115 := 0+a;  //цифры
frmMain.nx116 :=-2+a;  //цифры
frmMain.nx117 :=-4+a;  //цифры
frmMain.nx118 :=-6+a;  //цифры
frmMain.nx119 := 2+a;  //цифры
frmMain.nx120 := 4+a;  //цифры
frmMain.nx121 := 6+a;  //цифры
frmMain.nx122 := 8+a;  //цифры
frmMain.nx123 := 10+a;  //цифры
frmMain.nx124 := 12+a;  //цифры
frmMain.nx125 := 0+a;
frmMain.nx126 := 0+a;
frmMain.nx127 := 0+a;
frmMain.nx128 := 2+a;
frmMain.nx129 := -2+a;
frmMain.nx130 := -4+a;
frmMain.nx131 := 4+a;
frmMain.nx132 := -6+a;
frmMain.nx133 := 6+a;
frmMain.nx134 := 8+a;
frmMain.nx135 := -8+a;
frmMain.nx136 := -2+a;
frmMain.nx137 := 2+a;
frmMain.nx138 := -4+a;
frmMain.nx139 := 4+a;
frmMain.nx140 := -2+a;
frmMain.nx141 := 2+a;
frmMain.nx142 := 0+a;
frmMain.nx143 := 2+a;
frmMain.nx144 := -2+a;
frmMain.nx145 := -4+a;
frmMain.nx146 := 4+a;
frmMain.nx147 := 6+a;
frmMain.nx148 := -6+a;
frmMain.nx149 := -6+a;
frmMain.nx150 := 6+a;
frmMain.nx151 := 2+a;
frmMain.nx152 := -2+a;
frmMain.nx153 := 2+a;
frmMain.nx154 := -2+a;
frmMain.nx155 := 0+a;
frmMain.nx156 := 0+a;
frmMain.nx157 := 4+a;
frmMain.nx158 := -4+a;
frmMain.nx159 := -6+a;
frmMain.nx160 := 6+a;
frmMain.nx161 := 4+a;
frmMain.nx162 := -4+a;
frmMain.nx163 := -6+a;
frmMain.nx164 := 6+a;
frmMain.nx165 := 4+a;
frmMain.nx166 := -4+a;
frmMain.nx167 := -6+a;
frmMain.nx168 := 6+a;
frmMain.nx169 := 4+a;
frmMain.nx170 := -4+a;
frmMain.nx171 := -6+a;
frmMain.nx172 := 6+a;
frmMain.nx173 := 4+a;
frmMain.nx174 := -4+a;
frmMain.nx175 := -6+a;
frmMain.nx176 := 6+a;
frmMain.nx177 := 4+a;
frmMain.nx178 := -4+a;
frmMain.nx179 := -6+a;
frmMain.nx180 := 6+a;
 frmMain.nx181 := 4+a;
 frmMain.nx182 := -4+a;
 frmMain.nx183 := -6+a;
 frmMain.nx184 := 6+a;
 frmMain.nx185 := 4+a;
 frmMain.nx186 := -4+a;
 frmMain.nx187 := -6+a;
 frmMain.nx188 := 6+a;
 frmMain.nx189 := -4+a;
 frmMain.nx190 := 4+a;
 frmMain.nx191 := -6+a;
 frmMain.nx192 := 6+a;
 frmMain.nx193 := -4+a;
 frmMain.nx194 := 4+a;
 frmMain.nx195 := -6+a;
 frmMain.nx196 := 6+a;
 frmMain.nx197 := -4+a;
 frmMain.nx198 := 4+a;
 frmMain.nx199 := -6+a;
 frmMain.nx200 := 6+a;
 frmMain.nx201 := -4+a;
 frmMain.nx202 := 4+a;
 frmMain.nx203 := -6+a;
 frmMain.nx204 := 6+a;
 frmMain.nx205 := 6+a;  //корабль
 frmMain.nx206 := 6+a;  //Подлодка
 frmMain.nx215 := -6+a;
 frmMain.frmGL.Width:=800;
 a:=0;
 frmMain.nz := 0+b;
  frmMain.nz1 := 0+b;
  frmMain.nz2 := 0+b;
 frmMain.nz3 := 1+b;
 frmMain.nz7 := 0+b;
 frmMain.nz8 := 2+b;
 frmMain.nz9 := 2+b;
  frmMain.nz10 := -2+b;
 frmMain.nz11 := -2+b;
 frmMain.nz12 := -2+b;
 frmMain.nz14 := -3+b;
 frmMain.nz15 := -3+b;
 frmMain.nz16 := -4+b;
 frmMain.nz17 := -4+b;
  frmMain.nz18 := -5+b;
 frmMain.nz19 := -5+b;
 frmMain.nz20 := -6+b;
 frmMain.nz21 := -7+b;
 frmMain.nz22 := -7+b;
  frmMain.nz23 := -8+b;
 frmMain.nz24 := -8+b;
  frmMain.nz25 := -9+b;
 frmMain.nz26 := -9+b;
 frmMain.nz27 := -10+b;
  frmMain.nz28 := -10+b;
  frmMain.nz29 := -11+b;
 frmMain.nz30 := -11+b;

// 1

 frmMain.nz31 := -2+b;
 frmMain.nz32 := -2+b;
 frmMain.nz33 := -3+b;
 frmMain.nz34 := -3+b;
 frmMain.nz35 := -4+b;
 frmMain.nz36 := -4+b;
  frmMain.nz37 := -5+b;
 frmMain.nz38 := -5+b;
 frmMain.nz39 := -6+b;
 frmMain.nz40 := -6+b;
 frmMain.nz41 := -7+b;
 frmMain.nz42 := -7+b;
 frmMain.nz43 := -8+b;
 frmMain.nz44 := -8+b;
 frmMain.nz45 := -9+b;  //////////////


 //////////////////////

 frmMain.nz46 := -9+b;
 frmMain.nz47 := -9+b;
 frmMain.nz48 := -10+b;
 frmMain.nz49 := -11+b;
 frmMain.nz50 := -11+b;
 frmMain.nz51 := -2+b;
 frmMain.nz52 :=-2+b;
 frmMain.nz53 := -3+b;
 frmMain.nz54 :=  3+b;
 frmMain.nz55 := -3+b;
 frmMain.nz56 := -4+b;
 frmMain.nz57 := -5+b;
 frmMain.nz58 := -5+b;
 frmMain.nz59 := -6+b;
 frmMain.nz60 := -6+b;
 frmMain.nz61 := -7+b;
 frmMain.nz62 := -7+b;
 frmMain.nz63 := -8+b;
 frmMain.nz64 := -8+b;
 frmMain.nz65 := -9+b;
 frmMain.nz66 := -9+b;
 frmMain.nz67 := -10+b;
 frmMain.nz68 := -10+b;
 frmMain.nz69 := -11+b;
 frmMain.nz70 := -11+b;


  ///3
 ///
 ///
 frmMain.nz71 := -2+b;
 frmMain.nz72 :=-2+b;
 frmMain.nz73 := -3+b;
 frmMain.nz74 :=  -3+b;
 frmMain.nz75 := -4+b;
 frmMain.nz76 := -4+b;
 frmMain.nz77 := -5+b;
 frmMain.nz78 := -5+b;
 frmMain.nz79 := -6+b;
 frmMain.nz80 := -6+b;
 frmMain.nz81 := -7+b;
 frmMain.nz82 := -7+b;
 frmMain.nz83 := -8+b;
 frmMain.nz84 := -8+b;
 frmMain.nz85 := -9+b;
 frmMain.nz86 := -9+b;
 frmMain.nz87 := -10+b;
 frmMain.nz88 := -10+b;
 frmMain.nz89 := -11+b;
 frmMain.nz90 := -2+b;

frmMain.nz94 :=1+b;
frmMain.nz95 :=1+b;  //цифры
frmMain.nz96 :=1+b;  //цифры
frmMain.nz97 :=1+b;  //цифры
frmMain.nz98 := 1+b;  //цифры
frmMain.nz99 := 1+b;  //цифры
frmMain.nz100 := 1+b;  //цифры
frmMain.nz101 := 1+b;  //цифры
frmMain.nz102 := 1+b;  //цифры
frmMain.nz103 := 1+b;  //цифры

frmMain.nz104 := -0+b;  //буквы
frmMain.nz105 := -2+b;  //буквы
frmMain.nz106 := -4+b;  //буквы
frmMain.nz107 := -6+b;  //буквы
frmMain.nz108 := -8+b;  //буквы
frmMain.nz109 := -10+b;  //буквы
frmMain.nz110 := -12+b;  //буквы
frmMain.nz111 := -14+b;  //буквы
frmMain.nz112 := -16+b;  //буквы
frmMain.nz113 := -18+b;  //буквы

frmMain.nz114 := -4+b;  //корабль
frmMain.nz115 := -18+b;  //цифры
frmMain.nz116 :=-18+b;  //цифры
frmMain.nz117 :=-18+b;  //цифры
frmMain.nz118 :=-18+b;  //цифры
frmMain.nz119 := -18+b;  //цифры
frmMain.nz120 := -18+b;  //цифры
frmMain.nz121 := -18+b;  //цифры
frmMain.nz122 := -18+b;  //цифры
frmMain.nz123 := -18+b;  //цифры
frmMain.nz124 := -18+b;  //цифры
frmMain.nz125 := -16+b;
frmMain.nz126 := -14+b;
frmMain.nz127 := -12+b;
frmMain.nz128 := -16+b;
frmMain.nz129 := -16+b;
frmMain.nz130 := -16+b;
frmMain.nz131 := -16+b;
frmMain.nz132 := -16+b;
frmMain.nz133 := -16+b;
frmMain.nz134 := -16+b;
frmMain.nz135 := -16+b;
frmMain.nz136 := -14+b;
frmMain.nz137 := -14+b;
frmMain.nz138 := -14+b;
frmMain.nz139 := -14+b;
frmMain.nz140 := -14+b;
frmMain.nz141 := -15+b;
frmMain.nz142 := -15+b;
frmMain.nz143 := -15+b;
frmMain.nz144 := -15+b;
frmMain.nz145 := -15+b;
frmMain.nz146 := -15+b;
frmMain.nz147 := -15+b;
frmMain.nz148 := -15+b;
frmMain.nz149 := -14+b;
frmMain.nz150 := -14+b;
frmMain.nz151 := -12+b;
frmMain.nz152 := -12+b;
frmMain.nz153 := -13+b;
frmMain.nz154 := -13+b;
frmMain.nz155 := -13+b;
frmMain.nz156 := -6+b;
frmMain.nz157 := -12+b;
frmMain.nz158 := -12+b;
frmMain.nz159 := -12+b;
frmMain.nz160 := -12+b;
frmMain.nz161 := -10+b;
frmMain.nz162 := -10+b;
frmMain.nz163 := -10+b;
frmMain.nz164 := -10+b;
frmMain.nz165 := -8+b;
frmMain.nz166 := -8+b;
frmMain.nz167 := -8+b;
frmMain.nz168 := -8+b;
frmMain.nz169 := -6+b;
frmMain.nz170 := -6+b;
frmMain.nz171 := -6+b;
frmMain.nz172 := -6+b;
frmMain.nz173 := -4+b;
frmMain.nz174 := -4+b;
frmMain.nz175 := -4+b;
frmMain.nz176 := -4+b;
frmMain.nz177 := -2+b;
frmMain.nz178 := -2+b;
frmMain.nz179 := -2+b;
frmMain.nz180 := -2+b;
 frmMain.nz181 := -3+b;
 frmMain.nz182 := -3+b;
 frmMain.nz183 := -3+b;
 frmMain.nz184 := -3+b;
 frmMain.nz185 := -5+b;
 frmMain.nz186 := -5+b;
 frmMain.nz187 := -5+b;
 frmMain.nz188 := -5+b;
 frmMain.nz189 := -7+b;
 frmMain.nz190 := -7+b;
 frmMain.nz191 := -7+b;
 frmMain.nz192 := -7+b;
 frmMain.nz193 := -9+b;
 frmMain.nz194 := -9+b;
 frmMain.nz195 := -9+b;
 frmMain.nz196 := -9+b;
 frmMain.nz197 := -11+b;
 frmMain.nz198 := -11+b;
 frmMain.nz199 := -11+b;
 frmMain.nz200 := -11+b;
 frmMain.nz201 := -13+b;
 frmMain.nz202 := -13+b;
 frmMain.nz203 := -13+b;
 frmMain.nz204 := -13+b;
 frmMain.nz205 := -4+b;  //корабль
 frmMain.nz206 := -8+b;  //Подлодка
 frmMain.nz215 := -12+b;
 frmMain.frmGL.Width:=800;
 b:=0;

 end;





 if (c=3) and (d=3) then
begin
StringGrid1.Cells[c,d]:='1';
a:=a+3;
b:=b+15;
frmMain.nx := 0+a;
  frmMain.nx1 := 0+a;
  frmMain.nx2 := 0+a;
 frmMain.nx3 := 0+a;
 frmMain.nx7 := -1+a;
 frmMain.nx8 := 1+a;
 frmMain.nx9 := -1+a;
  frmMain.nx10 := -2+a;
 frmMain.nx11 := -1+a;
 frmMain.nx12 := 1+a;
 frmMain.nx14 := 1+a;
 frmMain.nx15 := -1+a;
 frmMain.nx16 := -1+a;
 frmMain.nx17 := 1+a;
  frmMain.nx18 := -1+a;
 frmMain.nx19 := 1+a;
 frmMain.nx20 := -1+a;
 frmMain.nx21 := -1+a;
 frmMain.nx22 := 1+a;
  frmMain.nx23 := -1+a;
 frmMain.nx24 := 1+a;
  frmMain.nx25 := 1+a;
 frmMain.nx26 := -1+a;
 frmMain.nx27 := 1+a;
  frmMain.nx28 := -1+a;
  frmMain.nx29 := 1+a;
 frmMain.nx30 := -1+a;

// 1

 frmMain.nx31 := -2+a;
 frmMain.nx32 := 2+a;
 frmMain.nx33 := -2+a;
 frmMain.nx34 :=  2+a;
 frmMain.nx35 := -2+a;
 frmMain.nx36 := 2+a;
  frmMain.nx37 := -2+a;
 frmMain.nx38 := 2+a;
 frmMain.nx39 := -2+a;
 frmMain.nx40 := 2+a;
 frmMain.nx41 := -2+a;
 frmMain.nx42 := 2+a;
 frmMain.nx43 := -2+a;
 frmMain.nx44 := 2+a;
 frmMain.nx45 := -2+a;  //////////////


 //////////////////////

 frmMain.nx46 := -2+a;
 frmMain.nx47 := -2+a;
 frmMain.nx48 := 2+a;
 frmMain.nx49 := -2+a;
 frmMain.nx50 := 2+a;
 frmMain.nx51 := -3+a;
 frmMain.nx52 :=3+a;
 frmMain.nx53 := -3+a;
 frmMain.nx54 :=  3+a;
 frmMain.nx55 := -3+a;
 frmMain.nx56 := 3+a;
 frmMain.nx57 := -3+a;
 frmMain.nx58 := 3+a;
 frmMain.nx59 := -3+a;
 frmMain.nx60 := 3+a;
 frmMain.nx61 := -3+a;
 frmMain.nx62 := 3+a;
 frmMain.nx63 := -3+a;
 frmMain.nx64 := 3+a;
 frmMain.nx65 := -3+a;
 frmMain.nx66 := 3+a;
 frmMain.nx67 := -3+a;
 frmMain.nx68 := 3+a;
 frmMain.nx69 := -3+a;
 frmMain.nx70 := 3+a;


  ///3
 ///
 ///
 frmMain.nx71 := -4+a;
 frmMain.nx72 :=4+a;
 frmMain.nx73 := -4+a;
 frmMain.nx74 :=  4+a;
 frmMain.nx75 := -4+a;
 frmMain.nx76 := 4+a;
 frmMain.nx77 := -4+a;
 frmMain.nx78 := 4+a;
 frmMain.nx79 := -4+a;
 frmMain.nx80 := 4+a;
 frmMain.nx81 := -4+a;
 frmMain.nx82 := 4+a;
 frmMain.nx83 := -4+a;
 frmMain.nx84 := 4+a;
 frmMain.nx85 := -4+a;
 frmMain.nx86 := 4+a;
 frmMain.nx87 := -4+a;
 frmMain.nx88 := 4+a;
 frmMain.nx89 := -4+a;
 frmMain.nx90 := -2+a;

frmMain.nx94 :=0+a;
frmMain.nx95 :=-2+a;  //цифры
frmMain.nx96 :=-4+a;  //цифры
frmMain.nx97 :=-6+a;  //цифры
frmMain.nx98 := 2+a;  //цифры
frmMain.nx99 := 4+a;  //цифры
frmMain.nx100 := 6+a;  //цифры
frmMain.nx101 := 8+a;  //цифры
frmMain.nx102 := 10+a;  //цифры
frmMain.nx103 := 12+a;  //цифры

frmMain.nx104 := -8+a;  //буквы
frmMain.nx105 := -8+a;  //буквы
frmMain.nx106 := -8+a;  //буквы
frmMain.nx107 := -8+a;  //буквы
frmMain.nx108 := -8+a;  //буквы
frmMain.nx109 := -8+a;  //буквы
frmMain.nx110 := -8+a;  //буквы
frmMain.nx111 := -8+a;  //буквы
frmMain.nx112 := -8+a;  //буквы
frmMain.nx113 := -8+a;  //буквы

frmMain.nx114 := -6+a;  //корабль
frmMain.nx115 := 0+a;  //цифры
frmMain.nx116 :=-2+a;  //цифры
frmMain.nx117 :=-4+a;  //цифры
frmMain.nx118 :=-6+a;  //цифры
frmMain.nx119 := 2+a;  //цифры
frmMain.nx120 := 4+a;  //цифры
frmMain.nx121 := 6+a;  //цифры
frmMain.nx122 := 8+a;  //цифры
frmMain.nx123 := 10+a;  //цифры
frmMain.nx124 := 12+a;  //цифры
frmMain.nx125 := 0+a;
frmMain.nx126 := 0+a;
frmMain.nx127 := 0+a;
frmMain.nx128 := 2+a;
frmMain.nx129 := -2+a;
frmMain.nx130 := -4+a;
frmMain.nx131 := 4+a;
frmMain.nx132 := -6+a;
frmMain.nx133 := 6+a;
frmMain.nx134 := 8+a;
frmMain.nx135 := -8+a;
frmMain.nx136 := -2+a;
frmMain.nx137 := 2+a;
frmMain.nx138 := -4+a;
frmMain.nx139 := 4+a;
frmMain.nx140 := -2+a;
frmMain.nx141 := 2+a;
frmMain.nx142 := 0+a;
frmMain.nx143 := 2+a;
frmMain.nx144 := -2+a;
frmMain.nx145 := -4+a;
frmMain.nx146 := 4+a;
frmMain.nx147 := 6+a;
frmMain.nx148 := -6+a;
frmMain.nx149 := -6+a;
frmMain.nx150 := 6+a;
frmMain.nx151 := 2+a;
frmMain.nx152 := -2+a;
frmMain.nx153 := 2+a;
frmMain.nx154 := -2+a;
frmMain.nx155 := 0+a;
frmMain.nx156 := 0+a;
frmMain.nx157 := 4+a;
frmMain.nx158 := -4+a;
frmMain.nx159 := -6+a;
frmMain.nx160 := 6+a;
frmMain.nx161 := 4+a;
frmMain.nx162 := -4+a;
frmMain.nx163 := -6+a;
frmMain.nx164 := 6+a;
frmMain.nx165 := 4+a;
frmMain.nx166 := -4+a;
frmMain.nx167 := -6+a;
frmMain.nx168 := 6+a;
frmMain.nx169 := 4+a;
frmMain.nx170 := -4+a;
frmMain.nx171 := -6+a;
frmMain.nx172 := 6+a;
frmMain.nx173 := 4+a;
frmMain.nx174 := -4+a;
frmMain.nx175 := -6+a;
frmMain.nx176 := 6+a;
frmMain.nx177 := 4+a;
frmMain.nx178 := -4+a;
frmMain.nx179 := -6+a;
frmMain.nx180 := 6+a;
 frmMain.nx181 := 4+a;
 frmMain.nx182 := -4+a;
 frmMain.nx183 := -6+a;
 frmMain.nx184 := 6+a;
 frmMain.nx185 := 4+a;
 frmMain.nx186 := -4+a;
 frmMain.nx187 := -6+a;
 frmMain.nx188 := 6+a;
 frmMain.nx189 := -4+a;
 frmMain.nx190 := 4+a;
 frmMain.nx191 := -6+a;
 frmMain.nx192 := 6+a;
 frmMain.nx193 := -4+a;
 frmMain.nx194 := 4+a;
 frmMain.nx195 := -6+a;
 frmMain.nx196 := 6+a;
 frmMain.nx197 := -4+a;
 frmMain.nx198 := 4+a;
 frmMain.nx199 := -6+a;
 frmMain.nx200 := 6+a;
 frmMain.nx201 := -4+a;
 frmMain.nx202 := 4+a;
 frmMain.nx203 := -6+a;
 frmMain.nx204 := 6+a;
 frmMain.nx205 := 6+a;  //корабль
 frmMain.nx206 := 6+a;  //Подлодка
 frmMain.nx215 := -6+a;
 frmMain.frmGL.Width:=800;
 a:=0;
 frmMain.nz := 0+b;
  frmMain.nz1 := 0+b;
  frmMain.nz2 := 0+b;
 frmMain.nz3 := 1+b;
 frmMain.nz7 := 0+b;
 frmMain.nz8 := 2+b;
 frmMain.nz9 := 2+b;
  frmMain.nz10 := -2+b;
 frmMain.nz11 := -2+b;
 frmMain.nz12 := -2+b;
 frmMain.nz14 := -3+b;
 frmMain.nz15 := -3+b;
 frmMain.nz16 := -4+b;
 frmMain.nz17 := -4+b;
  frmMain.nz18 := -5+b;
 frmMain.nz19 := -5+b;
 frmMain.nz20 := -6+b;
 frmMain.nz21 := -7+b;
 frmMain.nz22 := -7+b;
  frmMain.nz23 := -8+b;
 frmMain.nz24 := -8+b;
  frmMain.nz25 := -9+b;
 frmMain.nz26 := -9+b;
 frmMain.nz27 := -10+b;
  frmMain.nz28 := -10+b;
  frmMain.nz29 := -11+b;
 frmMain.nz30 := -11+b;

// 1

 frmMain.nz31 := -2+b;
 frmMain.nz32 := -2+b;
 frmMain.nz33 := -3+b;
 frmMain.nz34 := -3+b;
 frmMain.nz35 := -4+b;
 frmMain.nz36 := -4+b;
  frmMain.nz37 := -5+b;
 frmMain.nz38 := -5+b;
 frmMain.nz39 := -6+b;
 frmMain.nz40 := -6+b;
 frmMain.nz41 := -7+b;
 frmMain.nz42 := -7+b;
 frmMain.nz43 := -8+b;
 frmMain.nz44 := -8+b;
 frmMain.nz45 := -9+b;  //////////////


 //////////////////////

 frmMain.nz46 := -9+b;
 frmMain.nz47 := -9+b;
 frmMain.nz48 := -10+b;
 frmMain.nz49 := -11+b;
 frmMain.nz50 := -11+b;
 frmMain.nz51 := -2+b;
 frmMain.nz52 :=-2+b;
 frmMain.nz53 := -3+b;
 frmMain.nz54 :=  3+b;
 frmMain.nz55 := -3+b;
 frmMain.nz56 := -4+b;
 frmMain.nz57 := -5+b;
 frmMain.nz58 := -5+b;
 frmMain.nz59 := -6+b;
 frmMain.nz60 := -6+b;
 frmMain.nz61 := -7+b;
 frmMain.nz62 := -7+b;
 frmMain.nz63 := -8+b;
 frmMain.nz64 := -8+b;
 frmMain.nz65 := -9+b;
 frmMain.nz66 := -9+b;
 frmMain.nz67 := -10+b;
 frmMain.nz68 := -10+b;
 frmMain.nz69 := -11+b;
 frmMain.nz70 := -11+b;


  ///3
 ///
 ///
 frmMain.nz71 := -2+b;
 frmMain.nz72 :=-2+b;
 frmMain.nz73 := -3+b;
 frmMain.nz74 :=  -3+b;
 frmMain.nz75 := -4+b;
 frmMain.nz76 := -4+b;
 frmMain.nz77 := -5+b;
 frmMain.nz78 := -5+b;
 frmMain.nz79 := -6+b;
 frmMain.nz80 := -6+b;
 frmMain.nz81 := -7+b;
 frmMain.nz82 := -7+b;
 frmMain.nz83 := -8+b;
 frmMain.nz84 := -8+b;
 frmMain.nz85 := -9+b;
 frmMain.nz86 := -9+b;
 frmMain.nz87 := -10+b;
 frmMain.nz88 := -10+b;
 frmMain.nz89 := -11+b;
 frmMain.nz90 := -2+b;

frmMain.nz94 :=1+b;
frmMain.nz95 :=1+b;  //цифры
frmMain.nz96 :=1+b;  //цифры
frmMain.nz97 :=1+b;  //цифры
frmMain.nz98 := 1+b;  //цифры
frmMain.nz99 := 1+b;  //цифры
frmMain.nz100 := 1+b;  //цифры
frmMain.nz101 := 1+b;  //цифры
frmMain.nz102 := 1+b;  //цифры
frmMain.nz103 := 1+b;  //цифры

frmMain.nz104 := -0+b;  //буквы
frmMain.nz105 := -2+b;  //буквы
frmMain.nz106 := -4+b;  //буквы
frmMain.nz107 := -6+b;  //буквы
frmMain.nz108 := -8+b;  //буквы
frmMain.nz109 := -10+b;  //буквы
frmMain.nz110 := -12+b;  //буквы
frmMain.nz111 := -14+b;  //буквы
frmMain.nz112 := -16+b;  //буквы
frmMain.nz113 := -18+b;  //буквы

frmMain.nz114 := -4+b;  //корабль
frmMain.nz115 := -18+b;  //цифры
frmMain.nz116 :=-18+b;  //цифры
frmMain.nz117 :=-18+b;  //цифры
frmMain.nz118 :=-18+b;  //цифры
frmMain.nz119 := -18+b;  //цифры
frmMain.nz120 := -18+b;  //цифры
frmMain.nz121 := -18+b;  //цифры
frmMain.nz122 := -18+b;  //цифры
frmMain.nz123 := -18+b;  //цифры
frmMain.nz124 := -18+b;  //цифры
frmMain.nz125 := -16+b;
frmMain.nz126 := -14+b;
frmMain.nz127 := -12+b;
frmMain.nz128 := -16+b;
frmMain.nz129 := -16+b;
frmMain.nz130 := -16+b;
frmMain.nz131 := -16+b;
frmMain.nz132 := -16+b;
frmMain.nz133 := -16+b;
frmMain.nz134 := -16+b;
frmMain.nz135 := -16+b;
frmMain.nz136 := -14+b;
frmMain.nz137 := -14+b;
frmMain.nz138 := -14+b;
frmMain.nz139 := -14+b;
frmMain.nz140 := -14+b;
frmMain.nz141 := -15+b;
frmMain.nz142 := -15+b;
frmMain.nz143 := -15+b;
frmMain.nz144 := -15+b;
frmMain.nz145 := -15+b;
frmMain.nz146 := -15+b;
frmMain.nz147 := -15+b;
frmMain.nz148 := -15+b;
frmMain.nz149 := -14+b;
frmMain.nz150 := -14+b;
frmMain.nz151 := -12+b;
frmMain.nz152 := -12+b;
frmMain.nz153 := -13+b;
frmMain.nz154 := -13+b;
frmMain.nz155 := -13+b;
frmMain.nz156 := -6+b;
frmMain.nz157 := -12+b;
frmMain.nz158 := -12+b;
frmMain.nz159 := -12+b;
frmMain.nz160 := -12+b;
frmMain.nz161 := -10+b;
frmMain.nz162 := -10+b;
frmMain.nz163 := -10+b;
frmMain.nz164 := -10+b;
frmMain.nz165 := -8+b;
frmMain.nz166 := -8+b;
frmMain.nz167 := -8+b;
frmMain.nz168 := -8+b;
frmMain.nz169 := -6+b;
frmMain.nz170 := -6+b;
frmMain.nz171 := -6+b;
frmMain.nz172 := -6+b;
frmMain.nz173 := -4+b;
frmMain.nz174 := -4+b;
frmMain.nz175 := -4+b;
frmMain.nz176 := -4+b;
frmMain.nz177 := -2+b;
frmMain.nz178 := -2+b;
frmMain.nz179 := -2+b;
frmMain.nz180 := -2+b;
 frmMain.nz181 := -3+b;
 frmMain.nz182 := -3+b;
 frmMain.nz183 := -3+b;
 frmMain.nz184 := -3+b;
 frmMain.nz185 := -5+b;
 frmMain.nz186 := -5+b;
 frmMain.nz187 := -5+b;
 frmMain.nz188 := -5+b;
 frmMain.nz189 := -7+b;
 frmMain.nz190 := -7+b;
 frmMain.nz191 := -7+b;
 frmMain.nz192 := -7+b;
 frmMain.nz193 := -9+b;
 frmMain.nz194 := -9+b;
 frmMain.nz195 := -9+b;
 frmMain.nz196 := -9+b;
 frmMain.nz197 := -11+b;
 frmMain.nz198 := -11+b;
 frmMain.nz199 := -11+b;
 frmMain.nz200 := -11+b;
 frmMain.nz201 := -13+b;
 frmMain.nz202 := -13+b;
 frmMain.nz203 := -13+b;
 frmMain.nz204 := -13+b;
 frmMain.nz205 := -4+b;  //корабль
 frmMain.nz206 := -8+b;  //Подлодка
 frmMain.nz215 := -12+b;
 frmMain.frmGL.Width:=800;
 b:=0;

 end;








 if (c=3) and (d=2) then
begin
StringGrid1.Cells[c,d]:='1';
a:=a+3;
b:=b+17;
frmMain.nx := 0+a;
  frmMain.nx1 := 0+a;
  frmMain.nx2 := 0+a;
 frmMain.nx3 := 0+a;
 frmMain.nx7 := -1+a;
 frmMain.nx8 := 1+a;
 frmMain.nx9 := -1+a;
  frmMain.nx10 := -2+a;
 frmMain.nx11 := -1+a;
 frmMain.nx12 := 1+a;
 frmMain.nx14 := 1+a;
 frmMain.nx15 := -1+a;
 frmMain.nx16 := -1+a;
 frmMain.nx17 := 1+a;
  frmMain.nx18 := -1+a;
 frmMain.nx19 := 1+a;
 frmMain.nx20 := -1+a;
 frmMain.nx21 := -1+a;
 frmMain.nx22 := 1+a;
  frmMain.nx23 := -1+a;
 frmMain.nx24 := 1+a;
  frmMain.nx25 := 1+a;
 frmMain.nx26 := -1+a;
 frmMain.nx27 := 1+a;
  frmMain.nx28 := -1+a;
  frmMain.nx29 := 1+a;
 frmMain.nx30 := -1+a;

// 1

 frmMain.nx31 := -2+a;
 frmMain.nx32 := 2+a;
 frmMain.nx33 := -2+a;
 frmMain.nx34 :=  2+a;
 frmMain.nx35 := -2+a;
 frmMain.nx36 := 2+a;
  frmMain.nx37 := -2+a;
 frmMain.nx38 := 2+a;
 frmMain.nx39 := -2+a;
 frmMain.nx40 := 2+a;
 frmMain.nx41 := -2+a;
 frmMain.nx42 := 2+a;
 frmMain.nx43 := -2+a;
 frmMain.nx44 := 2+a;
 frmMain.nx45 := -2+a;  //////////////


 //////////////////////

 frmMain.nx46 := -2+a;
 frmMain.nx47 := -2+a;
 frmMain.nx48 := 2+a;
 frmMain.nx49 := -2+a;
 frmMain.nx50 := 2+a;
 frmMain.nx51 := -3+a;
 frmMain.nx52 :=3+a;
 frmMain.nx53 := -3+a;
 frmMain.nx54 :=  3+a;
 frmMain.nx55 := -3+a;
 frmMain.nx56 := 3+a;
 frmMain.nx57 := -3+a;
 frmMain.nx58 := 3+a;
 frmMain.nx59 := -3+a;
 frmMain.nx60 := 3+a;
 frmMain.nx61 := -3+a;
 frmMain.nx62 := 3+a;
 frmMain.nx63 := -3+a;
 frmMain.nx64 := 3+a;
 frmMain.nx65 := -3+a;
 frmMain.nx66 := 3+a;
 frmMain.nx67 := -3+a;
 frmMain.nx68 := 3+a;
 frmMain.nx69 := -3+a;
 frmMain.nx70 := 3+a;


  ///3
 ///
 ///
 frmMain.nx71 := -4+a;
 frmMain.nx72 :=4+a;
 frmMain.nx73 := -4+a;
 frmMain.nx74 :=  4+a;
 frmMain.nx75 := -4+a;
 frmMain.nx76 := 4+a;
 frmMain.nx77 := -4+a;
 frmMain.nx78 := 4+a;
 frmMain.nx79 := -4+a;
 frmMain.nx80 := 4+a;
 frmMain.nx81 := -4+a;
 frmMain.nx82 := 4+a;
 frmMain.nx83 := -4+a;
 frmMain.nx84 := 4+a;
 frmMain.nx85 := -4+a;
 frmMain.nx86 := 4+a;
 frmMain.nx87 := -4+a;
 frmMain.nx88 := 4+a;
 frmMain.nx89 := -4+a;
 frmMain.nx90 := -2+a;

frmMain.nx94 :=0+a;
frmMain.nx95 :=-2+a;  //цифры
frmMain.nx96 :=-4+a;  //цифры
frmMain.nx97 :=-6+a;  //цифры
frmMain.nx98 := 2+a;  //цифры
frmMain.nx99 := 4+a;  //цифры
frmMain.nx100 := 6+a;  //цифры
frmMain.nx101 := 8+a;  //цифры
frmMain.nx102 := 10+a;  //цифры
frmMain.nx103 := 12+a;  //цифры

frmMain.nx104 := -8+a;  //буквы
frmMain.nx105 := -8+a;  //буквы
frmMain.nx106 := -8+a;  //буквы
frmMain.nx107 := -8+a;  //буквы
frmMain.nx108 := -8+a;  //буквы
frmMain.nx109 := -8+a;  //буквы
frmMain.nx110 := -8+a;  //буквы
frmMain.nx111 := -8+a;  //буквы
frmMain.nx112 := -8+a;  //буквы
frmMain.nx113 := -8+a;  //буквы

frmMain.nx114 := -6+a;  //корабль
frmMain.nx115 := 0+a;  //цифры
frmMain.nx116 :=-2+a;  //цифры
frmMain.nx117 :=-4+a;  //цифры
frmMain.nx118 :=-6+a;  //цифры
frmMain.nx119 := 2+a;  //цифры
frmMain.nx120 := 4+a;  //цифры
frmMain.nx121 := 6+a;  //цифры
frmMain.nx122 := 8+a;  //цифры
frmMain.nx123 := 10+a;  //цифры
frmMain.nx124 := 12+a;  //цифры
frmMain.nx125 := 0+a;
frmMain.nx126 := 0+a;
frmMain.nx127 := 0+a;
frmMain.nx128 := 2+a;
frmMain.nx129 := -2+a;
frmMain.nx130 := -4+a;
frmMain.nx131 := 4+a;
frmMain.nx132 := -6+a;
frmMain.nx133 := 6+a;
frmMain.nx134 := 8+a;
frmMain.nx135 := -8+a;
frmMain.nx136 := -2+a;
frmMain.nx137 := 2+a;
frmMain.nx138 := -4+a;
frmMain.nx139 := 4+a;
frmMain.nx140 := -2+a;
frmMain.nx141 := 2+a;
frmMain.nx142 := 0+a;
frmMain.nx143 := 2+a;
frmMain.nx144 := -2+a;
frmMain.nx145 := -4+a;
frmMain.nx146 := 4+a;
frmMain.nx147 := 6+a;
frmMain.nx148 := -6+a;
frmMain.nx149 := -6+a;
frmMain.nx150 := 6+a;
frmMain.nx151 := 2+a;
frmMain.nx152 := -2+a;
frmMain.nx153 := 2+a;
frmMain.nx154 := -2+a;
frmMain.nx155 := 0+a;
frmMain.nx156 := 0+a;
frmMain.nx157 := 4+a;
frmMain.nx158 := -4+a;
frmMain.nx159 := -6+a;
frmMain.nx160 := 6+a;
frmMain.nx161 := 4+a;
frmMain.nx162 := -4+a;
frmMain.nx163 := -6+a;
frmMain.nx164 := 6+a;
frmMain.nx165 := 4+a;
frmMain.nx166 := -4+a;
frmMain.nx167 := -6+a;
frmMain.nx168 := 6+a;
frmMain.nx169 := 4+a;
frmMain.nx170 := -4+a;
frmMain.nx171 := -6+a;
frmMain.nx172 := 6+a;
frmMain.nx173 := 4+a;
frmMain.nx174 := -4+a;
frmMain.nx175 := -6+a;
frmMain.nx176 := 6+a;
frmMain.nx177 := 4+a;
frmMain.nx178 := -4+a;
frmMain.nx179 := -6+a;
frmMain.nx180 := 6+a;
 frmMain.nx181 := 4+a;
 frmMain.nx182 := -4+a;
 frmMain.nx183 := -6+a;
 frmMain.nx184 := 6+a;
 frmMain.nx185 := 4+a;
 frmMain.nx186 := -4+a;
 frmMain.nx187 := -6+a;
 frmMain.nx188 := 6+a;
 frmMain.nx189 := -4+a;
 frmMain.nx190 := 4+a;
 frmMain.nx191 := -6+a;
 frmMain.nx192 := 6+a;
 frmMain.nx193 := -4+a;
 frmMain.nx194 := 4+a;
 frmMain.nx195 := -6+a;
 frmMain.nx196 := 6+a;
 frmMain.nx197 := -4+a;
 frmMain.nx198 := 4+a;
 frmMain.nx199 := -6+a;
 frmMain.nx200 := 6+a;
 frmMain.nx201 := -4+a;
 frmMain.nx202 := 4+a;
 frmMain.nx203 := -6+a;
 frmMain.nx204 := 6+a;
 frmMain.nx205 := 6+a;  //корабль
 frmMain.nx206 := 6+a;  //Подлодка
 frmMain.nx215 := -6+a;
 frmMain.frmGL.Width:=800;
 a:=0;
 frmMain.nz := 0+b;
  frmMain.nz1 := 0+b;
  frmMain.nz2 := 0+b;
 frmMain.nz3 := 1+b;
 frmMain.nz7 := 0+b;
 frmMain.nz8 := 2+b;
 frmMain.nz9 := 2+b;
  frmMain.nz10 := -2+b;
 frmMain.nz11 := -2+b;
 frmMain.nz12 := -2+b;
 frmMain.nz14 := -3+b;
 frmMain.nz15 := -3+b;
 frmMain.nz16 := -4+b;
 frmMain.nz17 := -4+b;
  frmMain.nz18 := -5+b;
 frmMain.nz19 := -5+b;
 frmMain.nz20 := -6+b;
 frmMain.nz21 := -7+b;
 frmMain.nz22 := -7+b;
  frmMain.nz23 := -8+b;
 frmMain.nz24 := -8+b;
  frmMain.nz25 := -9+b;
 frmMain.nz26 := -9+b;
 frmMain.nz27 := -10+b;
  frmMain.nz28 := -10+b;
  frmMain.nz29 := -11+b;
 frmMain.nz30 := -11+b;

// 1

 frmMain.nz31 := -2+b;
 frmMain.nz32 := -2+b;
 frmMain.nz33 := -3+b;
 frmMain.nz34 := -3+b;
 frmMain.nz35 := -4+b;
 frmMain.nz36 := -4+b;
  frmMain.nz37 := -5+b;
 frmMain.nz38 := -5+b;
 frmMain.nz39 := -6+b;
 frmMain.nz40 := -6+b;
 frmMain.nz41 := -7+b;
 frmMain.nz42 := -7+b;
 frmMain.nz43 := -8+b;
 frmMain.nz44 := -8+b;
 frmMain.nz45 := -9+b;  //////////////


 //////////////////////

 frmMain.nz46 := -9+b;
 frmMain.nz47 := -9+b;
 frmMain.nz48 := -10+b;
 frmMain.nz49 := -11+b;
 frmMain.nz50 := -11+b;
 frmMain.nz51 := -2+b;
 frmMain.nz52 :=-2+b;
 frmMain.nz53 := -3+b;
 frmMain.nz54 :=  3+b;
 frmMain.nz55 := -3+b;
 frmMain.nz56 := -4+b;
 frmMain.nz57 := -5+b;
 frmMain.nz58 := -5+b;
 frmMain.nz59 := -6+b;
 frmMain.nz60 := -6+b;
 frmMain.nz61 := -7+b;
 frmMain.nz62 := -7+b;
 frmMain.nz63 := -8+b;
 frmMain.nz64 := -8+b;
 frmMain.nz65 := -9+b;
 frmMain.nz66 := -9+b;
 frmMain.nz67 := -10+b;
 frmMain.nz68 := -10+b;
 frmMain.nz69 := -11+b;
 frmMain.nz70 := -11+b;


  ///3
 ///
 ///
 frmMain.nz71 := -2+b;
 frmMain.nz72 :=-2+b;
 frmMain.nz73 := -3+b;
 frmMain.nz74 :=  -3+b;
 frmMain.nz75 := -4+b;
 frmMain.nz76 := -4+b;
 frmMain.nz77 := -5+b;
 frmMain.nz78 := -5+b;
 frmMain.nz79 := -6+b;
 frmMain.nz80 := -6+b;
 frmMain.nz81 := -7+b;
 frmMain.nz82 := -7+b;
 frmMain.nz83 := -8+b;
 frmMain.nz84 := -8+b;
 frmMain.nz85 := -9+b;
 frmMain.nz86 := -9+b;
 frmMain.nz87 := -10+b;
 frmMain.nz88 := -10+b;
 frmMain.nz89 := -11+b;
 frmMain.nz90 := -2+b;

frmMain.nz94 :=1+b;
frmMain.nz95 :=1+b;  //цифры
frmMain.nz96 :=1+b;  //цифры
frmMain.nz97 :=1+b;  //цифры
frmMain.nz98 := 1+b;  //цифры
frmMain.nz99 := 1+b;  //цифры
frmMain.nz100 := 1+b;  //цифры
frmMain.nz101 := 1+b;  //цифры
frmMain.nz102 := 1+b;  //цифры
frmMain.nz103 := 1+b;  //цифры

frmMain.nz104 := -0+b;  //буквы
frmMain.nz105 := -2+b;  //буквы
frmMain.nz106 := -4+b;  //буквы
frmMain.nz107 := -6+b;  //буквы
frmMain.nz108 := -8+b;  //буквы
frmMain.nz109 := -10+b;  //буквы
frmMain.nz110 := -12+b;  //буквы
frmMain.nz111 := -14+b;  //буквы
frmMain.nz112 := -16+b;  //буквы
frmMain.nz113 := -18+b;  //буквы

frmMain.nz114 := -4+b;  //корабль
frmMain.nz115 := -18+b;  //цифры
frmMain.nz116 :=-18+b;  //цифры
frmMain.nz117 :=-18+b;  //цифры
frmMain.nz118 :=-18+b;  //цифры
frmMain.nz119 := -18+b;  //цифры
frmMain.nz120 := -18+b;  //цифры
frmMain.nz121 := -18+b;  //цифры
frmMain.nz122 := -18+b;  //цифры
frmMain.nz123 := -18+b;  //цифры
frmMain.nz124 := -18+b;  //цифры
frmMain.nz125 := -16+b;
frmMain.nz126 := -14+b;
frmMain.nz127 := -12+b;
frmMain.nz128 := -16+b;
frmMain.nz129 := -16+b;
frmMain.nz130 := -16+b;
frmMain.nz131 := -16+b;
frmMain.nz132 := -16+b;
frmMain.nz133 := -16+b;
frmMain.nz134 := -16+b;
frmMain.nz135 := -16+b;
frmMain.nz136 := -14+b;
frmMain.nz137 := -14+b;
frmMain.nz138 := -14+b;
frmMain.nz139 := -14+b;
frmMain.nz140 := -14+b;
frmMain.nz141 := -15+b;
frmMain.nz142 := -15+b;
frmMain.nz143 := -15+b;
frmMain.nz144 := -15+b;
frmMain.nz145 := -15+b;
frmMain.nz146 := -15+b;
frmMain.nz147 := -15+b;
frmMain.nz148 := -15+b;
frmMain.nz149 := -14+b;
frmMain.nz150 := -14+b;
frmMain.nz151 := -12+b;
frmMain.nz152 := -12+b;
frmMain.nz153 := -13+b;
frmMain.nz154 := -13+b;
frmMain.nz155 := -13+b;
frmMain.nz156 := -6+b;
frmMain.nz157 := -12+b;
frmMain.nz158 := -12+b;
frmMain.nz159 := -12+b;
frmMain.nz160 := -12+b;
frmMain.nz161 := -10+b;
frmMain.nz162 := -10+b;
frmMain.nz163 := -10+b;
frmMain.nz164 := -10+b;
frmMain.nz165 := -8+b;
frmMain.nz166 := -8+b;
frmMain.nz167 := -8+b;
frmMain.nz168 := -8+b;
frmMain.nz169 := -6+b;
frmMain.nz170 := -6+b;
frmMain.nz171 := -6+b;
frmMain.nz172 := -6+b;
frmMain.nz173 := -4+b;
frmMain.nz174 := -4+b;
frmMain.nz175 := -4+b;
frmMain.nz176 := -4+b;
frmMain.nz177 := -2+b;
frmMain.nz178 := -2+b;
frmMain.nz179 := -2+b;
frmMain.nz180 := -2+b;
 frmMain.nz181 := -3+b;
 frmMain.nz182 := -3+b;
 frmMain.nz183 := -3+b;
 frmMain.nz184 := -3+b;
 frmMain.nz185 := -5+b;
 frmMain.nz186 := -5+b;
 frmMain.nz187 := -5+b;
 frmMain.nz188 := -5+b;
 frmMain.nz189 := -7+b;
 frmMain.nz190 := -7+b;
 frmMain.nz191 := -7+b;
 frmMain.nz192 := -7+b;
 frmMain.nz193 := -9+b;
 frmMain.nz194 := -9+b;
 frmMain.nz195 := -9+b;
 frmMain.nz196 := -9+b;
 frmMain.nz197 := -11+b;
 frmMain.nz198 := -11+b;
 frmMain.nz199 := -11+b;
 frmMain.nz200 := -11+b;
 frmMain.nz201 := -13+b;
 frmMain.nz202 := -13+b;
 frmMain.nz203 := -13+b;
 frmMain.nz204 := -13+b;
 frmMain.nz205 := -4+b;  //корабль
 frmMain.nz206 := -8+b;  //Подлодка
 frmMain.nz215 := -12+b;
 frmMain.frmGL.Width:=800;
 b:=0;

 end;






  if (c=3) and (d=1) then
begin
StringGrid1.Cells[c,d]:='1';
a:=a+3;
b:=b+19;
frmMain.nx := 0+a;
  frmMain.nx1 := 0+a;
  frmMain.nx2 := 0+a;
 frmMain.nx3 := 0+a;
 frmMain.nx7 := -1+a;
 frmMain.nx8 := 1+a;
 frmMain.nx9 := -1+a;
  frmMain.nx10 := -2+a;
 frmMain.nx11 := -1+a;
 frmMain.nx12 := 1+a;
 frmMain.nx14 := 1+a;
 frmMain.nx15 := -1+a;
 frmMain.nx16 := -1+a;
 frmMain.nx17 := 1+a;
  frmMain.nx18 := -1+a;
 frmMain.nx19 := 1+a;
 frmMain.nx20 := -1+a;
 frmMain.nx21 := -1+a;
 frmMain.nx22 := 1+a;
  frmMain.nx23 := -1+a;
 frmMain.nx24 := 1+a;
  frmMain.nx25 := 1+a;
 frmMain.nx26 := -1+a;
 frmMain.nx27 := 1+a;
  frmMain.nx28 := -1+a;
  frmMain.nx29 := 1+a;
 frmMain.nx30 := -1+a;

// 1

 frmMain.nx31 := -2+a;
 frmMain.nx32 := 2+a;
 frmMain.nx33 := -2+a;
 frmMain.nx34 :=  2+a;
 frmMain.nx35 := -2+a;
 frmMain.nx36 := 2+a;
  frmMain.nx37 := -2+a;
 frmMain.nx38 := 2+a;
 frmMain.nx39 := -2+a;
 frmMain.nx40 := 2+a;
 frmMain.nx41 := -2+a;
 frmMain.nx42 := 2+a;
 frmMain.nx43 := -2+a;
 frmMain.nx44 := 2+a;
 frmMain.nx45 := -2+a;  //////////////


 //////////////////////

 frmMain.nx46 := -2+a;
 frmMain.nx47 := -2+a;
 frmMain.nx48 := 2+a;
 frmMain.nx49 := -2+a;
 frmMain.nx50 := 2+a;
 frmMain.nx51 := -3+a;
 frmMain.nx52 :=3+a;
 frmMain.nx53 := -3+a;
 frmMain.nx54 :=  3+a;
 frmMain.nx55 := -3+a;
 frmMain.nx56 := 3+a;
 frmMain.nx57 := -3+a;
 frmMain.nx58 := 3+a;
 frmMain.nx59 := -3+a;
 frmMain.nx60 := 3+a;
 frmMain.nx61 := -3+a;
 frmMain.nx62 := 3+a;
 frmMain.nx63 := -3+a;
 frmMain.nx64 := 3+a;
 frmMain.nx65 := -3+a;
 frmMain.nx66 := 3+a;
 frmMain.nx67 := -3+a;
 frmMain.nx68 := 3+a;
 frmMain.nx69 := -3+a;
 frmMain.nx70 := 3+a;


  ///3
 ///
 ///
 frmMain.nx71 := -4+a;
 frmMain.nx72 :=4+a;
 frmMain.nx73 := -4+a;
 frmMain.nx74 :=  4+a;
 frmMain.nx75 := -4+a;
 frmMain.nx76 := 4+a;
 frmMain.nx77 := -4+a;
 frmMain.nx78 := 4+a;
 frmMain.nx79 := -4+a;
 frmMain.nx80 := 4+a;
 frmMain.nx81 := -4+a;
 frmMain.nx82 := 4+a;
 frmMain.nx83 := -4+a;
 frmMain.nx84 := 4+a;
 frmMain.nx85 := -4+a;
 frmMain.nx86 := 4+a;
 frmMain.nx87 := -4+a;
 frmMain.nx88 := 4+a;
 frmMain.nx89 := -4+a;
 frmMain.nx90 := -2+a;

frmMain.nx94 :=0+a;
frmMain.nx95 :=-2+a;  //цифры
frmMain.nx96 :=-4+a;  //цифры
frmMain.nx97 :=-6+a;  //цифры
frmMain.nx98 := 2+a;  //цифры
frmMain.nx99 := 4+a;  //цифры
frmMain.nx100 := 6+a;  //цифры
frmMain.nx101 := 8+a;  //цифры
frmMain.nx102 := 10+a;  //цифры
frmMain.nx103 := 12+a;  //цифры

frmMain.nx104 := -8+a;  //буквы
frmMain.nx105 := -8+a;  //буквы
frmMain.nx106 := -8+a;  //буквы
frmMain.nx107 := -8+a;  //буквы
frmMain.nx108 := -8+a;  //буквы
frmMain.nx109 := -8+a;  //буквы
frmMain.nx110 := -8+a;  //буквы
frmMain.nx111 := -8+a;  //буквы
frmMain.nx112 := -8+a;  //буквы
frmMain.nx113 := -8+a;  //буквы

frmMain.nx114 := -6+a;  //корабль
frmMain.nx115 := 0+a;  //цифры
frmMain.nx116 :=-2+a;  //цифры
frmMain.nx117 :=-4+a;  //цифры
frmMain.nx118 :=-6+a;  //цифры
frmMain.nx119 := 2+a;  //цифры
frmMain.nx120 := 4+a;  //цифры
frmMain.nx121 := 6+a;  //цифры
frmMain.nx122 := 8+a;  //цифры
frmMain.nx123 := 10+a;  //цифры
frmMain.nx124 := 12+a;  //цифры
frmMain.nx125 := 0+a;
frmMain.nx126 := 0+a;
frmMain.nx127 := 0+a;
frmMain.nx128 := 2+a;
frmMain.nx129 := -2+a;
frmMain.nx130 := -4+a;
frmMain.nx131 := 4+a;
frmMain.nx132 := -6+a;
frmMain.nx133 := 6+a;
frmMain.nx134 := 8+a;
frmMain.nx135 := -8+a;
frmMain.nx136 := -2+a;
frmMain.nx137 := 2+a;
frmMain.nx138 := -4+a;
frmMain.nx139 := 4+a;
frmMain.nx140 := -2+a;
frmMain.nx141 := 2+a;
frmMain.nx142 := 0+a;
frmMain.nx143 := 2+a;
frmMain.nx144 := -2+a;
frmMain.nx145 := -4+a;
frmMain.nx146 := 4+a;
frmMain.nx147 := 6+a;
frmMain.nx148 := -6+a;
frmMain.nx149 := -6+a;
frmMain.nx150 := 6+a;
frmMain.nx151 := 2+a;
frmMain.nx152 := -2+a;
frmMain.nx153 := 2+a;
frmMain.nx154 := -2+a;
frmMain.nx155 := 0+a;
frmMain.nx156 := 0+a;
frmMain.nx157 := 4+a;
frmMain.nx158 := -4+a;
frmMain.nx159 := -6+a;
frmMain.nx160 := 6+a;
frmMain.nx161 := 4+a;
frmMain.nx162 := -4+a;
frmMain.nx163 := -6+a;
frmMain.nx164 := 6+a;
frmMain.nx165 := 4+a;
frmMain.nx166 := -4+a;
frmMain.nx167 := -6+a;
frmMain.nx168 := 6+a;
frmMain.nx169 := 4+a;
frmMain.nx170 := -4+a;
frmMain.nx171 := -6+a;
frmMain.nx172 := 6+a;
frmMain.nx173 := 4+a;
frmMain.nx174 := -4+a;
frmMain.nx175 := -6+a;
frmMain.nx176 := 6+a;
frmMain.nx177 := 4+a;
frmMain.nx178 := -4+a;
frmMain.nx179 := -6+a;
frmMain.nx180 := 6+a;
 frmMain.nx181 := 4+a;
 frmMain.nx182 := -4+a;
 frmMain.nx183 := -6+a;
 frmMain.nx184 := 6+a;
 frmMain.nx185 := 4+a;
 frmMain.nx186 := -4+a;
 frmMain.nx187 := -6+a;
 frmMain.nx188 := 6+a;
 frmMain.nx189 := -4+a;
 frmMain.nx190 := 4+a;
 frmMain.nx191 := -6+a;
 frmMain.nx192 := 6+a;
 frmMain.nx193 := -4+a;
 frmMain.nx194 := 4+a;
 frmMain.nx195 := -6+a;
 frmMain.nx196 := 6+a;
 frmMain.nx197 := -4+a;
 frmMain.nx198 := 4+a;
 frmMain.nx199 := -6+a;
 frmMain.nx200 := 6+a;
 frmMain.nx201 := -4+a;
 frmMain.nx202 := 4+a;
 frmMain.nx203 := -6+a;
 frmMain.nx204 := 6+a;
 frmMain.nx205 := 6+a;  //корабль
 frmMain.nx206 := 6+a;  //Подлодка
 frmMain.nx215 := -6+a;
 frmMain.frmGL.Width:=800;
 a:=0;
 frmMain.nz := 0+b;
  frmMain.nz1 := 0+b;
  frmMain.nz2 := 0+b;
 frmMain.nz3 := 1+b;
 frmMain.nz7 := 0+b;
 frmMain.nz8 := 2+b;
 frmMain.nz9 := 2+b;
  frmMain.nz10 := -2+b;
 frmMain.nz11 := -2+b;
 frmMain.nz12 := -2+b;
 frmMain.nz14 := -3+b;
 frmMain.nz15 := -3+b;
 frmMain.nz16 := -4+b;
 frmMain.nz17 := -4+b;
  frmMain.nz18 := -5+b;
 frmMain.nz19 := -5+b;
 frmMain.nz20 := -6+b;
 frmMain.nz21 := -7+b;
 frmMain.nz22 := -7+b;
  frmMain.nz23 := -8+b;
 frmMain.nz24 := -8+b;
  frmMain.nz25 := -9+b;
 frmMain.nz26 := -9+b;
 frmMain.nz27 := -10+b;
  frmMain.nz28 := -10+b;
  frmMain.nz29 := -11+b;
 frmMain.nz30 := -11+b;

// 1

 frmMain.nz31 := -2+b;
 frmMain.nz32 := -2+b;
 frmMain.nz33 := -3+b;
 frmMain.nz34 := -3+b;
 frmMain.nz35 := -4+b;
 frmMain.nz36 := -4+b;
  frmMain.nz37 := -5+b;
 frmMain.nz38 := -5+b;
 frmMain.nz39 := -6+b;
 frmMain.nz40 := -6+b;
 frmMain.nz41 := -7+b;
 frmMain.nz42 := -7+b;
 frmMain.nz43 := -8+b;
 frmMain.nz44 := -8+b;
 frmMain.nz45 := -9+b;  //////////////


 //////////////////////

 frmMain.nz46 := -9+b;
 frmMain.nz47 := -9+b;
 frmMain.nz48 := -10+b;
 frmMain.nz49 := -11+b;
 frmMain.nz50 := -11+b;
 frmMain.nz51 := -2+b;
 frmMain.nz52 :=-2+b;
 frmMain.nz53 := -3+b;
 frmMain.nz54 :=  3+b;
 frmMain.nz55 := -3+b;
 frmMain.nz56 := -4+b;
 frmMain.nz57 := -5+b;
 frmMain.nz58 := -5+b;
 frmMain.nz59 := -6+b;
 frmMain.nz60 := -6+b;
 frmMain.nz61 := -7+b;
 frmMain.nz62 := -7+b;
 frmMain.nz63 := -8+b;
 frmMain.nz64 := -8+b;
 frmMain.nz65 := -9+b;
 frmMain.nz66 := -9+b;
 frmMain.nz67 := -10+b;
 frmMain.nz68 := -10+b;
 frmMain.nz69 := -11+b;
 frmMain.nz70 := -11+b;


  ///3
 ///
 ///
 frmMain.nz71 := -2+b;
 frmMain.nz72 :=-2+b;
 frmMain.nz73 := -3+b;
 frmMain.nz74 :=  -3+b;
 frmMain.nz75 := -4+b;
 frmMain.nz76 := -4+b;
 frmMain.nz77 := -5+b;
 frmMain.nz78 := -5+b;
 frmMain.nz79 := -6+b;
 frmMain.nz80 := -6+b;
 frmMain.nz81 := -7+b;
 frmMain.nz82 := -7+b;
 frmMain.nz83 := -8+b;
 frmMain.nz84 := -8+b;
 frmMain.nz85 := -9+b;
 frmMain.nz86 := -9+b;
 frmMain.nz87 := -10+b;
 frmMain.nz88 := -10+b;
 frmMain.nz89 := -11+b;
 frmMain.nz90 := -2+b;

frmMain.nz94 :=1+b;
frmMain.nz95 :=1+b;  //цифры
frmMain.nz96 :=1+b;  //цифры
frmMain.nz97 :=1+b;  //цифры
frmMain.nz98 := 1+b;  //цифры
frmMain.nz99 := 1+b;  //цифры
frmMain.nz100 := 1+b;  //цифры
frmMain.nz101 := 1+b;  //цифры
frmMain.nz102 := 1+b;  //цифры
frmMain.nz103 := 1+b;  //цифры

frmMain.nz104 := -0+b;  //буквы
frmMain.nz105 := -2+b;  //буквы
frmMain.nz106 := -4+b;  //буквы
frmMain.nz107 := -6+b;  //буквы
frmMain.nz108 := -8+b;  //буквы
frmMain.nz109 := -10+b;  //буквы
frmMain.nz110 := -12+b;  //буквы
frmMain.nz111 := -14+b;  //буквы
frmMain.nz112 := -16+b;  //буквы
frmMain.nz113 := -18+b;  //буквы

frmMain.nz114 := -4+b;  //корабль
frmMain.nz115 := -18+b;  //цифры
frmMain.nz116 :=-18+b;  //цифры
frmMain.nz117 :=-18+b;  //цифры
frmMain.nz118 :=-18+b;  //цифры
frmMain.nz119 := -18+b;  //цифры
frmMain.nz120 := -18+b;  //цифры
frmMain.nz121 := -18+b;  //цифры
frmMain.nz122 := -18+b;  //цифры
frmMain.nz123 := -18+b;  //цифры
frmMain.nz124 := -18+b;  //цифры
frmMain.nz125 := -16+b;
frmMain.nz126 := -14+b;
frmMain.nz127 := -12+b;
frmMain.nz128 := -16+b;
frmMain.nz129 := -16+b;
frmMain.nz130 := -16+b;
frmMain.nz131 := -16+b;
frmMain.nz132 := -16+b;
frmMain.nz133 := -16+b;
frmMain.nz134 := -16+b;
frmMain.nz135 := -16+b;
frmMain.nz136 := -14+b;
frmMain.nz137 := -14+b;
frmMain.nz138 := -14+b;
frmMain.nz139 := -14+b;
frmMain.nz140 := -14+b;
frmMain.nz141 := -15+b;
frmMain.nz142 := -15+b;
frmMain.nz143 := -15+b;
frmMain.nz144 := -15+b;
frmMain.nz145 := -15+b;
frmMain.nz146 := -15+b;
frmMain.nz147 := -15+b;
frmMain.nz148 := -15+b;
frmMain.nz149 := -14+b;
frmMain.nz150 := -14+b;
frmMain.nz151 := -12+b;
frmMain.nz152 := -12+b;
frmMain.nz153 := -13+b;
frmMain.nz154 := -13+b;
frmMain.nz155 := -13+b;
frmMain.nz156 := -6+b;
frmMain.nz157 := -12+b;
frmMain.nz158 := -12+b;
frmMain.nz159 := -12+b;
frmMain.nz160 := -12+b;
frmMain.nz161 := -10+b;
frmMain.nz162 := -10+b;
frmMain.nz163 := -10+b;
frmMain.nz164 := -10+b;
frmMain.nz165 := -8+b;
frmMain.nz166 := -8+b;
frmMain.nz167 := -8+b;
frmMain.nz168 := -8+b;
frmMain.nz169 := -6+b;
frmMain.nz170 := -6+b;
frmMain.nz171 := -6+b;
frmMain.nz172 := -6+b;
frmMain.nz173 := -4+b;
frmMain.nz174 := -4+b;
frmMain.nz175 := -4+b;
frmMain.nz176 := -4+b;
frmMain.nz177 := -2+b;
frmMain.nz178 := -2+b;
frmMain.nz179 := -2+b;
frmMain.nz180 := -2+b;
 frmMain.nz181 := -3+b;
 frmMain.nz182 := -3+b;
 frmMain.nz183 := -3+b;
 frmMain.nz184 := -3+b;
 frmMain.nz185 := -5+b;
 frmMain.nz186 := -5+b;
 frmMain.nz187 := -5+b;
 frmMain.nz188 := -5+b;
 frmMain.nz189 := -7+b;
 frmMain.nz190 := -7+b;
 frmMain.nz191 := -7+b;
 frmMain.nz192 := -7+b;
 frmMain.nz193 := -9+b;
 frmMain.nz194 := -9+b;
 frmMain.nz195 := -9+b;
 frmMain.nz196 := -9+b;
 frmMain.nz197 := -11+b;
 frmMain.nz198 := -11+b;
 frmMain.nz199 := -11+b;
 frmMain.nz200 := -11+b;
 frmMain.nz201 := -13+b;
 frmMain.nz202 := -13+b;
 frmMain.nz203 := -13+b;
 frmMain.nz204 := -13+b;
 frmMain.nz205 := -4+b;  //корабль
 frmMain.nz206 := -8+b;  //Подлодка
 frmMain.nz215 := -12+b;
 frmMain.frmGL.Width:=800;
 b:=0;

 end;






 if (c=4) and (d=1) then
begin
StringGrid1.Cells[c,d]:='1';
a:=a+1;
b:=b+19;
frmMain.nx := 0+a;
  frmMain.nx1 := 0+a;
  frmMain.nx2 := 0+a;
 frmMain.nx3 := 0+a;
 frmMain.nx7 := -1+a;
 frmMain.nx8 := 1+a;
 frmMain.nx9 := -1+a;
  frmMain.nx10 := -2+a;
 frmMain.nx11 := -1+a;
 frmMain.nx12 := 1+a;
 frmMain.nx14 := 1+a;
 frmMain.nx15 := -1+a;
 frmMain.nx16 := -1+a;
 frmMain.nx17 := 1+a;
  frmMain.nx18 := -1+a;
 frmMain.nx19 := 1+a;
 frmMain.nx20 := -1+a;
 frmMain.nx21 := -1+a;
 frmMain.nx22 := 1+a;
  frmMain.nx23 := -1+a;
 frmMain.nx24 := 1+a;
  frmMain.nx25 := 1+a;
 frmMain.nx26 := -1+a;
 frmMain.nx27 := 1+a;
  frmMain.nx28 := -1+a;
  frmMain.nx29 := 1+a;
 frmMain.nx30 := -1+a;

// 1

 frmMain.nx31 := -2+a;
 frmMain.nx32 := 2+a;
 frmMain.nx33 := -2+a;
 frmMain.nx34 :=  2+a;
 frmMain.nx35 := -2+a;
 frmMain.nx36 := 2+a;
  frmMain.nx37 := -2+a;
 frmMain.nx38 := 2+a;
 frmMain.nx39 := -2+a;
 frmMain.nx40 := 2+a;
 frmMain.nx41 := -2+a;
 frmMain.nx42 := 2+a;
 frmMain.nx43 := -2+a;
 frmMain.nx44 := 2+a;
 frmMain.nx45 := -2+a;  //////////////


 //////////////////////

 frmMain.nx46 := -2+a;
 frmMain.nx47 := -2+a;
 frmMain.nx48 := 2+a;
 frmMain.nx49 := -2+a;
 frmMain.nx50 := 2+a;
 frmMain.nx51 := -3+a;
 frmMain.nx52 :=3+a;
 frmMain.nx53 := -3+a;
 frmMain.nx54 :=  3+a;
 frmMain.nx55 := -3+a;
 frmMain.nx56 := 3+a;
 frmMain.nx57 := -3+a;
 frmMain.nx58 := 3+a;
 frmMain.nx59 := -3+a;
 frmMain.nx60 := 3+a;
 frmMain.nx61 := -3+a;
 frmMain.nx62 := 3+a;
 frmMain.nx63 := -3+a;
 frmMain.nx64 := 3+a;
 frmMain.nx65 := -3+a;
 frmMain.nx66 := 3+a;
 frmMain.nx67 := -3+a;
 frmMain.nx68 := 3+a;
 frmMain.nx69 := -3+a;
 frmMain.nx70 := 3+a;


  ///3
 ///
 ///
 frmMain.nx71 := -4+a;
 frmMain.nx72 :=4+a;
 frmMain.nx73 := -4+a;
 frmMain.nx74 :=  4+a;
 frmMain.nx75 := -4+a;
 frmMain.nx76 := 4+a;
 frmMain.nx77 := -4+a;
 frmMain.nx78 := 4+a;
 frmMain.nx79 := -4+a;
 frmMain.nx80 := 4+a;
 frmMain.nx81 := -4+a;
 frmMain.nx82 := 4+a;
 frmMain.nx83 := -4+a;
 frmMain.nx84 := 4+a;
 frmMain.nx85 := -4+a;
 frmMain.nx86 := 4+a;
 frmMain.nx87 := -4+a;
 frmMain.nx88 := 4+a;
 frmMain.nx89 := -4+a;
 frmMain.nx90 := -2+a;

frmMain.nx94 :=0+a;
frmMain.nx95 :=-2+a;  //цифры
frmMain.nx96 :=-4+a;  //цифры
frmMain.nx97 :=-6+a;  //цифры
frmMain.nx98 := 2+a;  //цифры
frmMain.nx99 := 4+a;  //цифры
frmMain.nx100 := 6+a;  //цифры
frmMain.nx101 := 8+a;  //цифры
frmMain.nx102 := 10+a;  //цифры
frmMain.nx103 := 12+a;  //цифры

frmMain.nx104 := -8+a;  //буквы
frmMain.nx105 := -8+a;  //буквы
frmMain.nx106 := -8+a;  //буквы
frmMain.nx107 := -8+a;  //буквы
frmMain.nx108 := -8+a;  //буквы
frmMain.nx109 := -8+a;  //буквы
frmMain.nx110 := -8+a;  //буквы
frmMain.nx111 := -8+a;  //буквы
frmMain.nx112 := -8+a;  //буквы
frmMain.nx113 := -8+a;  //буквы

frmMain.nx114 := -6+a;  //корабль
frmMain.nx115 := 0+a;  //цифры
frmMain.nx116 :=-2+a;  //цифры
frmMain.nx117 :=-4+a;  //цифры
frmMain.nx118 :=-6+a;  //цифры
frmMain.nx119 := 2+a;  //цифры
frmMain.nx120 := 4+a;  //цифры
frmMain.nx121 := 6+a;  //цифры
frmMain.nx122 := 8+a;  //цифры
frmMain.nx123 := 10+a;  //цифры
frmMain.nx124 := 12+a;  //цифры
frmMain.nx125 := 0+a;
frmMain.nx126 := 0+a;
frmMain.nx127 := 0+a;
frmMain.nx128 := 2+a;
frmMain.nx129 := -2+a;
frmMain.nx130 := -4+a;
frmMain.nx131 := 4+a;
frmMain.nx132 := -6+a;
frmMain.nx133 := 6+a;
frmMain.nx134 := 8+a;
frmMain.nx135 := -8+a;
frmMain.nx136 := -2+a;
frmMain.nx137 := 2+a;
frmMain.nx138 := -4+a;
frmMain.nx139 := 4+a;
frmMain.nx140 := -2+a;
frmMain.nx141 := 2+a;
frmMain.nx142 := 0+a;
frmMain.nx143 := 2+a;
frmMain.nx144 := -2+a;
frmMain.nx145 := -4+a;
frmMain.nx146 := 4+a;
frmMain.nx147 := 6+a;
frmMain.nx148 := -6+a;
frmMain.nx149 := -6+a;
frmMain.nx150 := 6+a;
frmMain.nx151 := 2+a;
frmMain.nx152 := -2+a;
frmMain.nx153 := 2+a;
frmMain.nx154 := -2+a;
frmMain.nx155 := 0+a;
frmMain.nx156 := 0+a;
frmMain.nx157 := 4+a;
frmMain.nx158 := -4+a;
frmMain.nx159 := -6+a;
frmMain.nx160 := 6+a;
frmMain.nx161 := 4+a;
frmMain.nx162 := -4+a;
frmMain.nx163 := -6+a;
frmMain.nx164 := 6+a;
frmMain.nx165 := 4+a;
frmMain.nx166 := -4+a;
frmMain.nx167 := -6+a;
frmMain.nx168 := 6+a;
frmMain.nx169 := 4+a;
frmMain.nx170 := -4+a;
frmMain.nx171 := -6+a;
frmMain.nx172 := 6+a;
frmMain.nx173 := 4+a;
frmMain.nx174 := -4+a;
frmMain.nx175 := -6+a;
frmMain.nx176 := 6+a;
frmMain.nx177 := 4+a;
frmMain.nx178 := -4+a;
frmMain.nx179 := -6+a;
frmMain.nx180 := 6+a;
 frmMain.nx181 := 4+a;
 frmMain.nx182 := -4+a;
 frmMain.nx183 := -6+a;
 frmMain.nx184 := 6+a;
 frmMain.nx185 := 4+a;
 frmMain.nx186 := -4+a;
 frmMain.nx187 := -6+a;
 frmMain.nx188 := 6+a;
 frmMain.nx189 := -4+a;
 frmMain.nx190 := 4+a;
 frmMain.nx191 := -6+a;
 frmMain.nx192 := 6+a;
 frmMain.nx193 := -4+a;
 frmMain.nx194 := 4+a;
 frmMain.nx195 := -6+a;
 frmMain.nx196 := 6+a;
 frmMain.nx197 := -4+a;
 frmMain.nx198 := 4+a;
 frmMain.nx199 := -6+a;
 frmMain.nx200 := 6+a;
 frmMain.nx201 := -4+a;
 frmMain.nx202 := 4+a;
 frmMain.nx203 := -6+a;
 frmMain.nx204 := 6+a;
 frmMain.nx205 := 6+a;  //корабль
 frmMain.nx206 := 6+a;  //Подлодка
 frmMain.nx215 := -6+a;
 frmMain.frmGL.Width:=800;
 a:=0;
 frmMain.nz := 0+b;
  frmMain.nz1 := 0+b;
  frmMain.nz2 := 0+b;
 frmMain.nz3 := 1+b;
 frmMain.nz7 := 0+b;
 frmMain.nz8 := 2+b;
 frmMain.nz9 := 2+b;
  frmMain.nz10 := -2+b;
 frmMain.nz11 := -2+b;
 frmMain.nz12 := -2+b;
 frmMain.nz14 := -3+b;
 frmMain.nz15 := -3+b;
 frmMain.nz16 := -4+b;
 frmMain.nz17 := -4+b;
  frmMain.nz18 := -5+b;
 frmMain.nz19 := -5+b;
 frmMain.nz20 := -6+b;
 frmMain.nz21 := -7+b;
 frmMain.nz22 := -7+b;
  frmMain.nz23 := -8+b;
 frmMain.nz24 := -8+b;
  frmMain.nz25 := -9+b;
 frmMain.nz26 := -9+b;
 frmMain.nz27 := -10+b;
  frmMain.nz28 := -10+b;
  frmMain.nz29 := -11+b;
 frmMain.nz30 := -11+b;

// 1

 frmMain.nz31 := -2+b;
 frmMain.nz32 := -2+b;
 frmMain.nz33 := -3+b;
 frmMain.nz34 := -3+b;
 frmMain.nz35 := -4+b;
 frmMain.nz36 := -4+b;
  frmMain.nz37 := -5+b;
 frmMain.nz38 := -5+b;
 frmMain.nz39 := -6+b;
 frmMain.nz40 := -6+b;
 frmMain.nz41 := -7+b;
 frmMain.nz42 := -7+b;
 frmMain.nz43 := -8+b;
 frmMain.nz44 := -8+b;
 frmMain.nz45 := -9+b;  //////////////


 //////////////////////

 frmMain.nz46 := -9+b;
 frmMain.nz47 := -9+b;
 frmMain.nz48 := -10+b;
 frmMain.nz49 := -11+b;
 frmMain.nz50 := -11+b;
 frmMain.nz51 := -2+b;
 frmMain.nz52 :=-2+b;
 frmMain.nz53 := -3+b;
 frmMain.nz54 :=  3+b;
 frmMain.nz55 := -3+b;
 frmMain.nz56 := -4+b;
 frmMain.nz57 := -5+b;
 frmMain.nz58 := -5+b;
 frmMain.nz59 := -6+b;
 frmMain.nz60 := -6+b;
 frmMain.nz61 := -7+b;
 frmMain.nz62 := -7+b;
 frmMain.nz63 := -8+b;
 frmMain.nz64 := -8+b;
 frmMain.nz65 := -9+b;
 frmMain.nz66 := -9+b;
 frmMain.nz67 := -10+b;
 frmMain.nz68 := -10+b;
 frmMain.nz69 := -11+b;
 frmMain.nz70 := -11+b;


  ///3
 ///
 ///
 frmMain.nz71 := -2+b;
 frmMain.nz72 :=-2+b;
 frmMain.nz73 := -3+b;
 frmMain.nz74 :=  -3+b;
 frmMain.nz75 := -4+b;
 frmMain.nz76 := -4+b;
 frmMain.nz77 := -5+b;
 frmMain.nz78 := -5+b;
 frmMain.nz79 := -6+b;
 frmMain.nz80 := -6+b;
 frmMain.nz81 := -7+b;
 frmMain.nz82 := -7+b;
 frmMain.nz83 := -8+b;
 frmMain.nz84 := -8+b;
 frmMain.nz85 := -9+b;
 frmMain.nz86 := -9+b;
 frmMain.nz87 := -10+b;
 frmMain.nz88 := -10+b;
 frmMain.nz89 := -11+b;
 frmMain.nz90 := -2+b;

frmMain.nz94 :=1+b;
frmMain.nz95 :=1+b;  //цифры
frmMain.nz96 :=1+b;  //цифры
frmMain.nz97 :=1+b;  //цифры
frmMain.nz98 := 1+b;  //цифры
frmMain.nz99 := 1+b;  //цифры
frmMain.nz100 := 1+b;  //цифры
frmMain.nz101 := 1+b;  //цифры
frmMain.nz102 := 1+b;  //цифры
frmMain.nz103 := 1+b;  //цифры

frmMain.nz104 := -0+b;  //буквы
frmMain.nz105 := -2+b;  //буквы
frmMain.nz106 := -4+b;  //буквы
frmMain.nz107 := -6+b;  //буквы
frmMain.nz108 := -8+b;  //буквы
frmMain.nz109 := -10+b;  //буквы
frmMain.nz110 := -12+b;  //буквы
frmMain.nz111 := -14+b;  //буквы
frmMain.nz112 := -16+b;  //буквы
frmMain.nz113 := -18+b;  //буквы

frmMain.nz114 := -4+b;  //корабль
frmMain.nz115 := -18+b;  //цифры
frmMain.nz116 :=-18+b;  //цифры
frmMain.nz117 :=-18+b;  //цифры
frmMain.nz118 :=-18+b;  //цифры
frmMain.nz119 := -18+b;  //цифры
frmMain.nz120 := -18+b;  //цифры
frmMain.nz121 := -18+b;  //цифры
frmMain.nz122 := -18+b;  //цифры
frmMain.nz123 := -18+b;  //цифры
frmMain.nz124 := -18+b;  //цифры
frmMain.nz125 := -16+b;
frmMain.nz126 := -14+b;
frmMain.nz127 := -12+b;
frmMain.nz128 := -16+b;
frmMain.nz129 := -16+b;
frmMain.nz130 := -16+b;
frmMain.nz131 := -16+b;
frmMain.nz132 := -16+b;
frmMain.nz133 := -16+b;
frmMain.nz134 := -16+b;
frmMain.nz135 := -16+b;
frmMain.nz136 := -14+b;
frmMain.nz137 := -14+b;
frmMain.nz138 := -14+b;
frmMain.nz139 := -14+b;
frmMain.nz140 := -14+b;
frmMain.nz141 := -15+b;
frmMain.nz142 := -15+b;
frmMain.nz143 := -15+b;
frmMain.nz144 := -15+b;
frmMain.nz145 := -15+b;
frmMain.nz146 := -15+b;
frmMain.nz147 := -15+b;
frmMain.nz148 := -15+b;
frmMain.nz149 := -14+b;
frmMain.nz150 := -14+b;
frmMain.nz151 := -12+b;
frmMain.nz152 := -12+b;
frmMain.nz153 := -13+b;
frmMain.nz154 := -13+b;
frmMain.nz155 := -13+b;
frmMain.nz156 := -6+b;
frmMain.nz157 := -12+b;
frmMain.nz158 := -12+b;
frmMain.nz159 := -12+b;
frmMain.nz160 := -12+b;
frmMain.nz161 := -10+b;
frmMain.nz162 := -10+b;
frmMain.nz163 := -10+b;
frmMain.nz164 := -10+b;
frmMain.nz165 := -8+b;
frmMain.nz166 := -8+b;
frmMain.nz167 := -8+b;
frmMain.nz168 := -8+b;
frmMain.nz169 := -6+b;
frmMain.nz170 := -6+b;
frmMain.nz171 := -6+b;
frmMain.nz172 := -6+b;
frmMain.nz173 := -4+b;
frmMain.nz174 := -4+b;
frmMain.nz175 := -4+b;
frmMain.nz176 := -4+b;
frmMain.nz177 := -2+b;
frmMain.nz178 := -2+b;
frmMain.nz179 := -2+b;
frmMain.nz180 := -2+b;
 frmMain.nz181 := -3+b;
 frmMain.nz182 := -3+b;
 frmMain.nz183 := -3+b;
 frmMain.nz184 := -3+b;
 frmMain.nz185 := -5+b;
 frmMain.nz186 := -5+b;
 frmMain.nz187 := -5+b;
 frmMain.nz188 := -5+b;
 frmMain.nz189 := -7+b;
 frmMain.nz190 := -7+b;
 frmMain.nz191 := -7+b;
 frmMain.nz192 := -7+b;
 frmMain.nz193 := -9+b;
 frmMain.nz194 := -9+b;
 frmMain.nz195 := -9+b;
 frmMain.nz196 := -9+b;
 frmMain.nz197 := -11+b;
 frmMain.nz198 := -11+b;
 frmMain.nz199 := -11+b;
 frmMain.nz200 := -11+b;
 frmMain.nz201 := -13+b;
 frmMain.nz202 := -13+b;
 frmMain.nz203 := -13+b;
 frmMain.nz204 := -13+b;
 frmMain.nz205 := -4+b;  //корабль
 frmMain.nz206 := -8+b;  //Подлодка
 frmMain.nz215 := -12+b;
 frmMain.frmGL.Width:=800;
 b:=0;

 end;




 if (c=4) and (d=2) then
begin
StringGrid1.Cells[c,d]:='1';
a:=a+1;
b:=b+17;
frmMain.nx := 0+a;
  frmMain.nx1 := 0+a;
  frmMain.nx2 := 0+a;
 frmMain.nx3 := 0+a;
 frmMain.nx7 := -1+a;
 frmMain.nx8 := 1+a;
 frmMain.nx9 := -1+a;
  frmMain.nx10 := -2+a;
 frmMain.nx11 := -1+a;
 frmMain.nx12 := 1+a;
 frmMain.nx14 := 1+a;
 frmMain.nx15 := -1+a;
 frmMain.nx16 := -1+a;
 frmMain.nx17 := 1+a;
  frmMain.nx18 := -1+a;
 frmMain.nx19 := 1+a;
 frmMain.nx20 := -1+a;
 frmMain.nx21 := -1+a;
 frmMain.nx22 := 1+a;
  frmMain.nx23 := -1+a;
 frmMain.nx24 := 1+a;
  frmMain.nx25 := 1+a;
 frmMain.nx26 := -1+a;
 frmMain.nx27 := 1+a;
  frmMain.nx28 := -1+a;
  frmMain.nx29 := 1+a;
 frmMain.nx30 := -1+a;

// 1

 frmMain.nx31 := -2+a;
 frmMain.nx32 := 2+a;
 frmMain.nx33 := -2+a;
 frmMain.nx34 :=  2+a;
 frmMain.nx35 := -2+a;
 frmMain.nx36 := 2+a;
  frmMain.nx37 := -2+a;
 frmMain.nx38 := 2+a;
 frmMain.nx39 := -2+a;
 frmMain.nx40 := 2+a;
 frmMain.nx41 := -2+a;
 frmMain.nx42 := 2+a;
 frmMain.nx43 := -2+a;
 frmMain.nx44 := 2+a;
 frmMain.nx45 := -2+a;  //////////////


 //////////////////////

 frmMain.nx46 := -2+a;
 frmMain.nx47 := -2+a;
 frmMain.nx48 := 2+a;
 frmMain.nx49 := -2+a;
 frmMain.nx50 := 2+a;
 frmMain.nx51 := -3+a;
 frmMain.nx52 :=3+a;
 frmMain.nx53 := -3+a;
 frmMain.nx54 :=  3+a;
 frmMain.nx55 := -3+a;
 frmMain.nx56 := 3+a;
 frmMain.nx57 := -3+a;
 frmMain.nx58 := 3+a;
 frmMain.nx59 := -3+a;
 frmMain.nx60 := 3+a;
 frmMain.nx61 := -3+a;
 frmMain.nx62 := 3+a;
 frmMain.nx63 := -3+a;
 frmMain.nx64 := 3+a;
 frmMain.nx65 := -3+a;
 frmMain.nx66 := 3+a;
 frmMain.nx67 := -3+a;
 frmMain.nx68 := 3+a;
 frmMain.nx69 := -3+a;
 frmMain.nx70 := 3+a;


  ///3
 ///
 ///
 frmMain.nx71 := -4+a;
 frmMain.nx72 :=4+a;
 frmMain.nx73 := -4+a;
 frmMain.nx74 :=  4+a;
 frmMain.nx75 := -4+a;
 frmMain.nx76 := 4+a;
 frmMain.nx77 := -4+a;
 frmMain.nx78 := 4+a;
 frmMain.nx79 := -4+a;
 frmMain.nx80 := 4+a;
 frmMain.nx81 := -4+a;
 frmMain.nx82 := 4+a;
 frmMain.nx83 := -4+a;
 frmMain.nx84 := 4+a;
 frmMain.nx85 := -4+a;
 frmMain.nx86 := 4+a;
 frmMain.nx87 := -4+a;
 frmMain.nx88 := 4+a;
 frmMain.nx89 := -4+a;
 frmMain.nx90 := -2+a;

frmMain.nx94 :=0+a;
frmMain.nx95 :=-2+a;  //цифры
frmMain.nx96 :=-4+a;  //цифры
frmMain.nx97 :=-6+a;  //цифры
frmMain.nx98 := 2+a;  //цифры
frmMain.nx99 := 4+a;  //цифры
frmMain.nx100 := 6+a;  //цифры
frmMain.nx101 := 8+a;  //цифры
frmMain.nx102 := 10+a;  //цифры
frmMain.nx103 := 12+a;  //цифры

frmMain.nx104 := -8+a;  //буквы
frmMain.nx105 := -8+a;  //буквы
frmMain.nx106 := -8+a;  //буквы
frmMain.nx107 := -8+a;  //буквы
frmMain.nx108 := -8+a;  //буквы
frmMain.nx109 := -8+a;  //буквы
frmMain.nx110 := -8+a;  //буквы
frmMain.nx111 := -8+a;  //буквы
frmMain.nx112 := -8+a;  //буквы
frmMain.nx113 := -8+a;  //буквы

frmMain.nx114 := -6+a;  //корабль
frmMain.nx115 := 0+a;  //цифры
frmMain.nx116 :=-2+a;  //цифры
frmMain.nx117 :=-4+a;  //цифры
frmMain.nx118 :=-6+a;  //цифры
frmMain.nx119 := 2+a;  //цифры
frmMain.nx120 := 4+a;  //цифры
frmMain.nx121 := 6+a;  //цифры
frmMain.nx122 := 8+a;  //цифры
frmMain.nx123 := 10+a;  //цифры
frmMain.nx124 := 12+a;  //цифры
frmMain.nx125 := 0+a;
frmMain.nx126 := 0+a;
frmMain.nx127 := 0+a;
frmMain.nx128 := 2+a;
frmMain.nx129 := -2+a;
frmMain.nx130 := -4+a;
frmMain.nx131 := 4+a;
frmMain.nx132 := -6+a;
frmMain.nx133 := 6+a;
frmMain.nx134 := 8+a;
frmMain.nx135 := -8+a;
frmMain.nx136 := -2+a;
frmMain.nx137 := 2+a;
frmMain.nx138 := -4+a;
frmMain.nx139 := 4+a;
frmMain.nx140 := -2+a;
frmMain.nx141 := 2+a;
frmMain.nx142 := 0+a;
frmMain.nx143 := 2+a;
frmMain.nx144 := -2+a;
frmMain.nx145 := -4+a;
frmMain.nx146 := 4+a;
frmMain.nx147 := 6+a;
frmMain.nx148 := -6+a;
frmMain.nx149 := -6+a;
frmMain.nx150 := 6+a;
frmMain.nx151 := 2+a;
frmMain.nx152 := -2+a;
frmMain.nx153 := 2+a;
frmMain.nx154 := -2+a;
frmMain.nx155 := 0+a;
frmMain.nx156 := 0+a;
frmMain.nx157 := 4+a;
frmMain.nx158 := -4+a;
frmMain.nx159 := -6+a;
frmMain.nx160 := 6+a;
frmMain.nx161 := 4+a;
frmMain.nx162 := -4+a;
frmMain.nx163 := -6+a;
frmMain.nx164 := 6+a;
frmMain.nx165 := 4+a;
frmMain.nx166 := -4+a;
frmMain.nx167 := -6+a;
frmMain.nx168 := 6+a;
frmMain.nx169 := 4+a;
frmMain.nx170 := -4+a;
frmMain.nx171 := -6+a;
frmMain.nx172 := 6+a;
frmMain.nx173 := 4+a;
frmMain.nx174 := -4+a;
frmMain.nx175 := -6+a;
frmMain.nx176 := 6+a;
frmMain.nx177 := 4+a;
frmMain.nx178 := -4+a;
frmMain.nx179 := -6+a;
frmMain.nx180 := 6+a;
 frmMain.nx181 := 4+a;
 frmMain.nx182 := -4+a;
 frmMain.nx183 := -6+a;
 frmMain.nx184 := 6+a;
 frmMain.nx185 := 4+a;
 frmMain.nx186 := -4+a;
 frmMain.nx187 := -6+a;
 frmMain.nx188 := 6+a;
 frmMain.nx189 := -4+a;
 frmMain.nx190 := 4+a;
 frmMain.nx191 := -6+a;
 frmMain.nx192 := 6+a;
 frmMain.nx193 := -4+a;
 frmMain.nx194 := 4+a;
 frmMain.nx195 := -6+a;
 frmMain.nx196 := 6+a;
 frmMain.nx197 := -4+a;
 frmMain.nx198 := 4+a;
 frmMain.nx199 := -6+a;
 frmMain.nx200 := 6+a;
 frmMain.nx201 := -4+a;
 frmMain.nx202 := 4+a;
 frmMain.nx203 := -6+a;
 frmMain.nx204 := 6+a;
 frmMain.nx205 := 6+a;  //корабль
 frmMain.nx206 := 6+a;  //Подлодка
 frmMain.nx215 := -6+a;
 frmMain.frmGL.Width:=800;
 a:=0;
 frmMain.nz := 0+b;
  frmMain.nz1 := 0+b;
  frmMain.nz2 := 0+b;
 frmMain.nz3 := 1+b;
 frmMain.nz7 := 0+b;
 frmMain.nz8 := 2+b;
 frmMain.nz9 := 2+b;
  frmMain.nz10 := -2+b;
 frmMain.nz11 := -2+b;
 frmMain.nz12 := -2+b;
 frmMain.nz14 := -3+b;
 frmMain.nz15 := -3+b;
 frmMain.nz16 := -4+b;
 frmMain.nz17 := -4+b;
  frmMain.nz18 := -5+b;
 frmMain.nz19 := -5+b;
 frmMain.nz20 := -6+b;
 frmMain.nz21 := -7+b;
 frmMain.nz22 := -7+b;
  frmMain.nz23 := -8+b;
 frmMain.nz24 := -8+b;
  frmMain.nz25 := -9+b;
 frmMain.nz26 := -9+b;
 frmMain.nz27 := -10+b;
  frmMain.nz28 := -10+b;
  frmMain.nz29 := -11+b;
 frmMain.nz30 := -11+b;

// 1

 frmMain.nz31 := -2+b;
 frmMain.nz32 := -2+b;
 frmMain.nz33 := -3+b;
 frmMain.nz34 := -3+b;
 frmMain.nz35 := -4+b;
 frmMain.nz36 := -4+b;
  frmMain.nz37 := -5+b;
 frmMain.nz38 := -5+b;
 frmMain.nz39 := -6+b;
 frmMain.nz40 := -6+b;
 frmMain.nz41 := -7+b;
 frmMain.nz42 := -7+b;
 frmMain.nz43 := -8+b;
 frmMain.nz44 := -8+b;
 frmMain.nz45 := -9+b;  //////////////


 //////////////////////

 frmMain.nz46 := -9+b;
 frmMain.nz47 := -9+b;
 frmMain.nz48 := -10+b;
 frmMain.nz49 := -11+b;
 frmMain.nz50 := -11+b;
 frmMain.nz51 := -2+b;
 frmMain.nz52 :=-2+b;
 frmMain.nz53 := -3+b;
 frmMain.nz54 :=  3+b;
 frmMain.nz55 := -3+b;
 frmMain.nz56 := -4+b;
 frmMain.nz57 := -5+b;
 frmMain.nz58 := -5+b;
 frmMain.nz59 := -6+b;
 frmMain.nz60 := -6+b;
 frmMain.nz61 := -7+b;
 frmMain.nz62 := -7+b;
 frmMain.nz63 := -8+b;
 frmMain.nz64 := -8+b;
 frmMain.nz65 := -9+b;
 frmMain.nz66 := -9+b;
 frmMain.nz67 := -10+b;
 frmMain.nz68 := -10+b;
 frmMain.nz69 := -11+b;
 frmMain.nz70 := -11+b;


  ///3
 ///
 ///
 frmMain.nz71 := -2+b;
 frmMain.nz72 :=-2+b;
 frmMain.nz73 := -3+b;
 frmMain.nz74 :=  -3+b;
 frmMain.nz75 := -4+b;
 frmMain.nz76 := -4+b;
 frmMain.nz77 := -5+b;
 frmMain.nz78 := -5+b;
 frmMain.nz79 := -6+b;
 frmMain.nz80 := -6+b;
 frmMain.nz81 := -7+b;
 frmMain.nz82 := -7+b;
 frmMain.nz83 := -8+b;
 frmMain.nz84 := -8+b;
 frmMain.nz85 := -9+b;
 frmMain.nz86 := -9+b;
 frmMain.nz87 := -10+b;
 frmMain.nz88 := -10+b;
 frmMain.nz89 := -11+b;
 frmMain.nz90 := -2+b;

frmMain.nz94 :=1+b;
frmMain.nz95 :=1+b;  //цифры
frmMain.nz96 :=1+b;  //цифры
frmMain.nz97 :=1+b;  //цифры
frmMain.nz98 := 1+b;  //цифры
frmMain.nz99 := 1+b;  //цифры
frmMain.nz100 := 1+b;  //цифры
frmMain.nz101 := 1+b;  //цифры
frmMain.nz102 := 1+b;  //цифры
frmMain.nz103 := 1+b;  //цифры

frmMain.nz104 := -0+b;  //буквы
frmMain.nz105 := -2+b;  //буквы
frmMain.nz106 := -4+b;  //буквы
frmMain.nz107 := -6+b;  //буквы
frmMain.nz108 := -8+b;  //буквы
frmMain.nz109 := -10+b;  //буквы
frmMain.nz110 := -12+b;  //буквы
frmMain.nz111 := -14+b;  //буквы
frmMain.nz112 := -16+b;  //буквы
frmMain.nz113 := -18+b;  //буквы

frmMain.nz114 := -4+b;  //корабль
frmMain.nz115 := -18+b;  //цифры
frmMain.nz116 :=-18+b;  //цифры
frmMain.nz117 :=-18+b;  //цифры
frmMain.nz118 :=-18+b;  //цифры
frmMain.nz119 := -18+b;  //цифры
frmMain.nz120 := -18+b;  //цифры
frmMain.nz121 := -18+b;  //цифры
frmMain.nz122 := -18+b;  //цифры
frmMain.nz123 := -18+b;  //цифры
frmMain.nz124 := -18+b;  //цифры
frmMain.nz125 := -16+b;
frmMain.nz126 := -14+b;
frmMain.nz127 := -12+b;
frmMain.nz128 := -16+b;
frmMain.nz129 := -16+b;
frmMain.nz130 := -16+b;
frmMain.nz131 := -16+b;
frmMain.nz132 := -16+b;
frmMain.nz133 := -16+b;
frmMain.nz134 := -16+b;
frmMain.nz135 := -16+b;
frmMain.nz136 := -14+b;
frmMain.nz137 := -14+b;
frmMain.nz138 := -14+b;
frmMain.nz139 := -14+b;
frmMain.nz140 := -14+b;
frmMain.nz141 := -15+b;
frmMain.nz142 := -15+b;
frmMain.nz143 := -15+b;
frmMain.nz144 := -15+b;
frmMain.nz145 := -15+b;
frmMain.nz146 := -15+b;
frmMain.nz147 := -15+b;
frmMain.nz148 := -15+b;
frmMain.nz149 := -14+b;
frmMain.nz150 := -14+b;
frmMain.nz151 := -12+b;
frmMain.nz152 := -12+b;
frmMain.nz153 := -13+b;
frmMain.nz154 := -13+b;
frmMain.nz155 := -13+b;
frmMain.nz156 := -6+b;
frmMain.nz157 := -12+b;
frmMain.nz158 := -12+b;
frmMain.nz159 := -12+b;
frmMain.nz160 := -12+b;
frmMain.nz161 := -10+b;
frmMain.nz162 := -10+b;
frmMain.nz163 := -10+b;
frmMain.nz164 := -10+b;
frmMain.nz165 := -8+b;
frmMain.nz166 := -8+b;
frmMain.nz167 := -8+b;
frmMain.nz168 := -8+b;
frmMain.nz169 := -6+b;
frmMain.nz170 := -6+b;
frmMain.nz171 := -6+b;
frmMain.nz172 := -6+b;
frmMain.nz173 := -4+b;
frmMain.nz174 := -4+b;
frmMain.nz175 := -4+b;
frmMain.nz176 := -4+b;
frmMain.nz177 := -2+b;
frmMain.nz178 := -2+b;
frmMain.nz179 := -2+b;
frmMain.nz180 := -2+b;
 frmMain.nz181 := -3+b;
 frmMain.nz182 := -3+b;
 frmMain.nz183 := -3+b;
 frmMain.nz184 := -3+b;
 frmMain.nz185 := -5+b;
 frmMain.nz186 := -5+b;
 frmMain.nz187 := -5+b;
 frmMain.nz188 := -5+b;
 frmMain.nz189 := -7+b;
 frmMain.nz190 := -7+b;
 frmMain.nz191 := -7+b;
 frmMain.nz192 := -7+b;
 frmMain.nz193 := -9+b;
 frmMain.nz194 := -9+b;
 frmMain.nz195 := -9+b;
 frmMain.nz196 := -9+b;
 frmMain.nz197 := -11+b;
 frmMain.nz198 := -11+b;
 frmMain.nz199 := -11+b;
 frmMain.nz200 := -11+b;
 frmMain.nz201 := -13+b;
 frmMain.nz202 := -13+b;
 frmMain.nz203 := -13+b;
 frmMain.nz204 := -13+b;
 frmMain.nz205 := -4+b;  //корабль
 frmMain.nz206 := -8+b;  //Подлодка
 frmMain.nz215 := -12+b;
 frmMain.frmGL.Width:=800;
 b:=0;

 end;


 if (c=4) and (d=3) then
begin
StringGrid1.Cells[c,d]:='1';
a:=a+1;
b:=b+15;
frmMain.nx := 0+a;
  frmMain.nx1 := 0+a;
  frmMain.nx2 := 0+a;
 frmMain.nx3 := 0+a;
 frmMain.nx7 := -1+a;
 frmMain.nx8 := 1+a;
 frmMain.nx9 := -1+a;
  frmMain.nx10 := -2+a;
 frmMain.nx11 := -1+a;
 frmMain.nx12 := 1+a;
 frmMain.nx14 := 1+a;
 frmMain.nx15 := -1+a;
 frmMain.nx16 := -1+a;
 frmMain.nx17 := 1+a;
  frmMain.nx18 := -1+a;
 frmMain.nx19 := 1+a;
 frmMain.nx20 := -1+a;
 frmMain.nx21 := -1+a;
 frmMain.nx22 := 1+a;
  frmMain.nx23 := -1+a;
 frmMain.nx24 := 1+a;
  frmMain.nx25 := 1+a;
 frmMain.nx26 := -1+a;
 frmMain.nx27 := 1+a;
  frmMain.nx28 := -1+a;
  frmMain.nx29 := 1+a;
 frmMain.nx30 := -1+a;

// 1

 frmMain.nx31 := -2+a;
 frmMain.nx32 := 2+a;
 frmMain.nx33 := -2+a;
 frmMain.nx34 :=  2+a;
 frmMain.nx35 := -2+a;
 frmMain.nx36 := 2+a;
  frmMain.nx37 := -2+a;
 frmMain.nx38 := 2+a;
 frmMain.nx39 := -2+a;
 frmMain.nx40 := 2+a;
 frmMain.nx41 := -2+a;
 frmMain.nx42 := 2+a;
 frmMain.nx43 := -2+a;
 frmMain.nx44 := 2+a;
 frmMain.nx45 := -2+a;  //////////////


 //////////////////////

 frmMain.nx46 := -2+a;
 frmMain.nx47 := -2+a;
 frmMain.nx48 := 2+a;
 frmMain.nx49 := -2+a;
 frmMain.nx50 := 2+a;
 frmMain.nx51 := -3+a;
 frmMain.nx52 :=3+a;
 frmMain.nx53 := -3+a;
 frmMain.nx54 :=  3+a;
 frmMain.nx55 := -3+a;
 frmMain.nx56 := 3+a;
 frmMain.nx57 := -3+a;
 frmMain.nx58 := 3+a;
 frmMain.nx59 := -3+a;
 frmMain.nx60 := 3+a;
 frmMain.nx61 := -3+a;
 frmMain.nx62 := 3+a;
 frmMain.nx63 := -3+a;
 frmMain.nx64 := 3+a;
 frmMain.nx65 := -3+a;
 frmMain.nx66 := 3+a;
 frmMain.nx67 := -3+a;
 frmMain.nx68 := 3+a;
 frmMain.nx69 := -3+a;
 frmMain.nx70 := 3+a;


  ///3
 ///
 ///
 frmMain.nx71 := -4+a;
 frmMain.nx72 :=4+a;
 frmMain.nx73 := -4+a;
 frmMain.nx74 :=  4+a;
 frmMain.nx75 := -4+a;
 frmMain.nx76 := 4+a;
 frmMain.nx77 := -4+a;
 frmMain.nx78 := 4+a;
 frmMain.nx79 := -4+a;
 frmMain.nx80 := 4+a;
 frmMain.nx81 := -4+a;
 frmMain.nx82 := 4+a;
 frmMain.nx83 := -4+a;
 frmMain.nx84 := 4+a;
 frmMain.nx85 := -4+a;
 frmMain.nx86 := 4+a;
 frmMain.nx87 := -4+a;
 frmMain.nx88 := 4+a;
 frmMain.nx89 := -4+a;
 frmMain.nx90 := -2+a;

frmMain.nx94 :=0+a;
frmMain.nx95 :=-2+a;  //цифры
frmMain.nx96 :=-4+a;  //цифры
frmMain.nx97 :=-6+a;  //цифры
frmMain.nx98 := 2+a;  //цифры
frmMain.nx99 := 4+a;  //цифры
frmMain.nx100 := 6+a;  //цифры
frmMain.nx101 := 8+a;  //цифры
frmMain.nx102 := 10+a;  //цифры
frmMain.nx103 := 12+a;  //цифры

frmMain.nx104 := -8+a;  //буквы
frmMain.nx105 := -8+a;  //буквы
frmMain.nx106 := -8+a;  //буквы
frmMain.nx107 := -8+a;  //буквы
frmMain.nx108 := -8+a;  //буквы
frmMain.nx109 := -8+a;  //буквы
frmMain.nx110 := -8+a;  //буквы
frmMain.nx111 := -8+a;  //буквы
frmMain.nx112 := -8+a;  //буквы
frmMain.nx113 := -8+a;  //буквы

frmMain.nx114 := -6+a;  //корабль
frmMain.nx115 := 0+a;  //цифры
frmMain.nx116 :=-2+a;  //цифры
frmMain.nx117 :=-4+a;  //цифры
frmMain.nx118 :=-6+a;  //цифры
frmMain.nx119 := 2+a;  //цифры
frmMain.nx120 := 4+a;  //цифры
frmMain.nx121 := 6+a;  //цифры
frmMain.nx122 := 8+a;  //цифры
frmMain.nx123 := 10+a;  //цифры
frmMain.nx124 := 12+a;  //цифры
frmMain.nx125 := 0+a;
frmMain.nx126 := 0+a;
frmMain.nx127 := 0+a;
frmMain.nx128 := 2+a;
frmMain.nx129 := -2+a;
frmMain.nx130 := -4+a;
frmMain.nx131 := 4+a;
frmMain.nx132 := -6+a;
frmMain.nx133 := 6+a;
frmMain.nx134 := 8+a;
frmMain.nx135 := -8+a;
frmMain.nx136 := -2+a;
frmMain.nx137 := 2+a;
frmMain.nx138 := -4+a;
frmMain.nx139 := 4+a;
frmMain.nx140 := -2+a;
frmMain.nx141 := 2+a;
frmMain.nx142 := 0+a;
frmMain.nx143 := 2+a;
frmMain.nx144 := -2+a;
frmMain.nx145 := -4+a;
frmMain.nx146 := 4+a;
frmMain.nx147 := 6+a;
frmMain.nx148 := -6+a;
frmMain.nx149 := -6+a;
frmMain.nx150 := 6+a;
frmMain.nx151 := 2+a;
frmMain.nx152 := -2+a;
frmMain.nx153 := 2+a;
frmMain.nx154 := -2+a;
frmMain.nx155 := 0+a;
frmMain.nx156 := 0+a;
frmMain.nx157 := 4+a;
frmMain.nx158 := -4+a;
frmMain.nx159 := -6+a;
frmMain.nx160 := 6+a;
frmMain.nx161 := 4+a;
frmMain.nx162 := -4+a;
frmMain.nx163 := -6+a;
frmMain.nx164 := 6+a;
frmMain.nx165 := 4+a;
frmMain.nx166 := -4+a;
frmMain.nx167 := -6+a;
frmMain.nx168 := 6+a;
frmMain.nx169 := 4+a;
frmMain.nx170 := -4+a;
frmMain.nx171 := -6+a;
frmMain.nx172 := 6+a;
frmMain.nx173 := 4+a;
frmMain.nx174 := -4+a;
frmMain.nx175 := -6+a;
frmMain.nx176 := 6+a;
frmMain.nx177 := 4+a;
frmMain.nx178 := -4+a;
frmMain.nx179 := -6+a;
frmMain.nx180 := 6+a;
 frmMain.nx181 := 4+a;
 frmMain.nx182 := -4+a;
 frmMain.nx183 := -6+a;
 frmMain.nx184 := 6+a;
 frmMain.nx185 := 4+a;
 frmMain.nx186 := -4+a;
 frmMain.nx187 := -6+a;
 frmMain.nx188 := 6+a;
 frmMain.nx189 := -4+a;
 frmMain.nx190 := 4+a;
 frmMain.nx191 := -6+a;
 frmMain.nx192 := 6+a;
 frmMain.nx193 := -4+a;
 frmMain.nx194 := 4+a;
 frmMain.nx195 := -6+a;
 frmMain.nx196 := 6+a;
 frmMain.nx197 := -4+a;
 frmMain.nx198 := 4+a;
 frmMain.nx199 := -6+a;
 frmMain.nx200 := 6+a;
 frmMain.nx201 := -4+a;
 frmMain.nx202 := 4+a;
 frmMain.nx203 := -6+a;
 frmMain.nx204 := 6+a;
 frmMain.nx205 := 6+a;  //корабль
 frmMain.nx206 := 6+a;  //Подлодка
 frmMain.nx215 := -6+a;
 frmMain.frmGL.Width:=800;
 a:=0;
 frmMain.nz := 0+b;
  frmMain.nz1 := 0+b;
  frmMain.nz2 := 0+b;
 frmMain.nz3 := 1+b;
 frmMain.nz7 := 0+b;
 frmMain.nz8 := 2+b;
 frmMain.nz9 := 2+b;
  frmMain.nz10 := -2+b;
 frmMain.nz11 := -2+b;
 frmMain.nz12 := -2+b;
 frmMain.nz14 := -3+b;
 frmMain.nz15 := -3+b;
 frmMain.nz16 := -4+b;
 frmMain.nz17 := -4+b;
  frmMain.nz18 := -5+b;
 frmMain.nz19 := -5+b;
 frmMain.nz20 := -6+b;
 frmMain.nz21 := -7+b;
 frmMain.nz22 := -7+b;
  frmMain.nz23 := -8+b;
 frmMain.nz24 := -8+b;
  frmMain.nz25 := -9+b;
 frmMain.nz26 := -9+b;
 frmMain.nz27 := -10+b;
  frmMain.nz28 := -10+b;
  frmMain.nz29 := -11+b;
 frmMain.nz30 := -11+b;

// 1

 frmMain.nz31 := -2+b;
 frmMain.nz32 := -2+b;
 frmMain.nz33 := -3+b;
 frmMain.nz34 := -3+b;
 frmMain.nz35 := -4+b;
 frmMain.nz36 := -4+b;
  frmMain.nz37 := -5+b;
 frmMain.nz38 := -5+b;
 frmMain.nz39 := -6+b;
 frmMain.nz40 := -6+b;
 frmMain.nz41 := -7+b;
 frmMain.nz42 := -7+b;
 frmMain.nz43 := -8+b;
 frmMain.nz44 := -8+b;
 frmMain.nz45 := -9+b;  //////////////


 //////////////////////

 frmMain.nz46 := -9+b;
 frmMain.nz47 := -9+b;
 frmMain.nz48 := -10+b;
 frmMain.nz49 := -11+b;
 frmMain.nz50 := -11+b;
 frmMain.nz51 := -2+b;
 frmMain.nz52 :=-2+b;
 frmMain.nz53 := -3+b;
 frmMain.nz54 :=  3+b;
 frmMain.nz55 := -3+b;
 frmMain.nz56 := -4+b;
 frmMain.nz57 := -5+b;
 frmMain.nz58 := -5+b;
 frmMain.nz59 := -6+b;
 frmMain.nz60 := -6+b;
 frmMain.nz61 := -7+b;
 frmMain.nz62 := -7+b;
 frmMain.nz63 := -8+b;
 frmMain.nz64 := -8+b;
 frmMain.nz65 := -9+b;
 frmMain.nz66 := -9+b;
 frmMain.nz67 := -10+b;
 frmMain.nz68 := -10+b;
 frmMain.nz69 := -11+b;
 frmMain.nz70 := -11+b;


  ///3
 ///
 ///
 frmMain.nz71 := -2+b;
 frmMain.nz72 :=-2+b;
 frmMain.nz73 := -3+b;
 frmMain.nz74 :=  -3+b;
 frmMain.nz75 := -4+b;
 frmMain.nz76 := -4+b;
 frmMain.nz77 := -5+b;
 frmMain.nz78 := -5+b;
 frmMain.nz79 := -6+b;
 frmMain.nz80 := -6+b;
 frmMain.nz81 := -7+b;
 frmMain.nz82 := -7+b;
 frmMain.nz83 := -8+b;
 frmMain.nz84 := -8+b;
 frmMain.nz85 := -9+b;
 frmMain.nz86 := -9+b;
 frmMain.nz87 := -10+b;
 frmMain.nz88 := -10+b;
 frmMain.nz89 := -11+b;
 frmMain.nz90 := -2+b;

frmMain.nz94 :=1+b;
frmMain.nz95 :=1+b;  //цифры
frmMain.nz96 :=1+b;  //цифры
frmMain.nz97 :=1+b;  //цифры
frmMain.nz98 := 1+b;  //цифры
frmMain.nz99 := 1+b;  //цифры
frmMain.nz100 := 1+b;  //цифры
frmMain.nz101 := 1+b;  //цифры
frmMain.nz102 := 1+b;  //цифры
frmMain.nz103 := 1+b;  //цифры

frmMain.nz104 := -0+b;  //буквы
frmMain.nz105 := -2+b;  //буквы
frmMain.nz106 := -4+b;  //буквы
frmMain.nz107 := -6+b;  //буквы
frmMain.nz108 := -8+b;  //буквы
frmMain.nz109 := -10+b;  //буквы
frmMain.nz110 := -12+b;  //буквы
frmMain.nz111 := -14+b;  //буквы
frmMain.nz112 := -16+b;  //буквы
frmMain.nz113 := -18+b;  //буквы

frmMain.nz114 := -4+b;  //корабль
frmMain.nz115 := -18+b;  //цифры
frmMain.nz116 :=-18+b;  //цифры
frmMain.nz117 :=-18+b;  //цифры
frmMain.nz118 :=-18+b;  //цифры
frmMain.nz119 := -18+b;  //цифры
frmMain.nz120 := -18+b;  //цифры
frmMain.nz121 := -18+b;  //цифры
frmMain.nz122 := -18+b;  //цифры
frmMain.nz123 := -18+b;  //цифры
frmMain.nz124 := -18+b;  //цифры
frmMain.nz125 := -16+b;
frmMain.nz126 := -14+b;
frmMain.nz127 := -12+b;
frmMain.nz128 := -16+b;
frmMain.nz129 := -16+b;
frmMain.nz130 := -16+b;
frmMain.nz131 := -16+b;
frmMain.nz132 := -16+b;
frmMain.nz133 := -16+b;
frmMain.nz134 := -16+b;
frmMain.nz135 := -16+b;
frmMain.nz136 := -14+b;
frmMain.nz137 := -14+b;
frmMain.nz138 := -14+b;
frmMain.nz139 := -14+b;
frmMain.nz140 := -14+b;
frmMain.nz141 := -15+b;
frmMain.nz142 := -15+b;
frmMain.nz143 := -15+b;
frmMain.nz144 := -15+b;
frmMain.nz145 := -15+b;
frmMain.nz146 := -15+b;
frmMain.nz147 := -15+b;
frmMain.nz148 := -15+b;
frmMain.nz149 := -14+b;
frmMain.nz150 := -14+b;
frmMain.nz151 := -12+b;
frmMain.nz152 := -12+b;
frmMain.nz153 := -13+b;
frmMain.nz154 := -13+b;
frmMain.nz155 := -13+b;
frmMain.nz156 := -6+b;
frmMain.nz157 := -12+b;
frmMain.nz158 := -12+b;
frmMain.nz159 := -12+b;
frmMain.nz160 := -12+b;
frmMain.nz161 := -10+b;
frmMain.nz162 := -10+b;
frmMain.nz163 := -10+b;
frmMain.nz164 := -10+b;
frmMain.nz165 := -8+b;
frmMain.nz166 := -8+b;
frmMain.nz167 := -8+b;
frmMain.nz168 := -8+b;
frmMain.nz169 := -6+b;
frmMain.nz170 := -6+b;
frmMain.nz171 := -6+b;
frmMain.nz172 := -6+b;
frmMain.nz173 := -4+b;
frmMain.nz174 := -4+b;
frmMain.nz175 := -4+b;
frmMain.nz176 := -4+b;
frmMain.nz177 := -2+b;
frmMain.nz178 := -2+b;
frmMain.nz179 := -2+b;
frmMain.nz180 := -2+b;
 frmMain.nz181 := -3+b;
 frmMain.nz182 := -3+b;
 frmMain.nz183 := -3+b;
 frmMain.nz184 := -3+b;
 frmMain.nz185 := -5+b;
 frmMain.nz186 := -5+b;
 frmMain.nz187 := -5+b;
 frmMain.nz188 := -5+b;
 frmMain.nz189 := -7+b;
 frmMain.nz190 := -7+b;
 frmMain.nz191 := -7+b;
 frmMain.nz192 := -7+b;
 frmMain.nz193 := -9+b;
 frmMain.nz194 := -9+b;
 frmMain.nz195 := -9+b;
 frmMain.nz196 := -9+b;
 frmMain.nz197 := -11+b;
 frmMain.nz198 := -11+b;
 frmMain.nz199 := -11+b;
 frmMain.nz200 := -11+b;
 frmMain.nz201 := -13+b;
 frmMain.nz202 := -13+b;
 frmMain.nz203 := -13+b;
 frmMain.nz204 := -13+b;
 frmMain.nz205 := -4+b;  //корабль
 frmMain.nz206 := -8+b;  //Подлодка
 frmMain.nz215 := -12+b;
 frmMain.frmGL.Width:=800;
 b:=0;

 end;




 if (c=4) and (d=4) then
begin
StringGrid1.Cells[c,d]:='1';
a:=a+1;
b:=b+13;
frmMain.nx := 0+a;
  frmMain.nx1 := 0+a;
  frmMain.nx2 := 0+a;
 frmMain.nx3 := 0+a;
 frmMain.nx7 := -1+a;
 frmMain.nx8 := 1+a;
 frmMain.nx9 := -1+a;
  frmMain.nx10 := -2+a;
 frmMain.nx11 := -1+a;
 frmMain.nx12 := 1+a;
 frmMain.nx14 := 1+a;
 frmMain.nx15 := -1+a;
 frmMain.nx16 := -1+a;
 frmMain.nx17 := 1+a;
  frmMain.nx18 := -1+a;
 frmMain.nx19 := 1+a;
 frmMain.nx20 := -1+a;
 frmMain.nx21 := -1+a;
 frmMain.nx22 := 1+a;
  frmMain.nx23 := -1+a;
 frmMain.nx24 := 1+a;
  frmMain.nx25 := 1+a;
 frmMain.nx26 := -1+a;
 frmMain.nx27 := 1+a;
  frmMain.nx28 := -1+a;
  frmMain.nx29 := 1+a;
 frmMain.nx30 := -1+a;

// 1

 frmMain.nx31 := -2+a;
 frmMain.nx32 := 2+a;
 frmMain.nx33 := -2+a;
 frmMain.nx34 :=  2+a;
 frmMain.nx35 := -2+a;
 frmMain.nx36 := 2+a;
  frmMain.nx37 := -2+a;
 frmMain.nx38 := 2+a;
 frmMain.nx39 := -2+a;
 frmMain.nx40 := 2+a;
 frmMain.nx41 := -2+a;
 frmMain.nx42 := 2+a;
 frmMain.nx43 := -2+a;
 frmMain.nx44 := 2+a;
 frmMain.nx45 := -2+a;  //////////////


 //////////////////////

 frmMain.nx46 := -2+a;
 frmMain.nx47 := -2+a;
 frmMain.nx48 := 2+a;
 frmMain.nx49 := -2+a;
 frmMain.nx50 := 2+a;
 frmMain.nx51 := -3+a;
 frmMain.nx52 :=3+a;
 frmMain.nx53 := -3+a;
 frmMain.nx54 :=  3+a;
 frmMain.nx55 := -3+a;
 frmMain.nx56 := 3+a;
 frmMain.nx57 := -3+a;
 frmMain.nx58 := 3+a;
 frmMain.nx59 := -3+a;
 frmMain.nx60 := 3+a;
 frmMain.nx61 := -3+a;
 frmMain.nx62 := 3+a;
 frmMain.nx63 := -3+a;
 frmMain.nx64 := 3+a;
 frmMain.nx65 := -3+a;
 frmMain.nx66 := 3+a;
 frmMain.nx67 := -3+a;
 frmMain.nx68 := 3+a;
 frmMain.nx69 := -3+a;
 frmMain.nx70 := 3+a;


  ///3
 ///
 ///
 frmMain.nx71 := -4+a;
 frmMain.nx72 :=4+a;
 frmMain.nx73 := -4+a;
 frmMain.nx74 :=  4+a;
 frmMain.nx75 := -4+a;
 frmMain.nx76 := 4+a;
 frmMain.nx77 := -4+a;
 frmMain.nx78 := 4+a;
 frmMain.nx79 := -4+a;
 frmMain.nx80 := 4+a;
 frmMain.nx81 := -4+a;
 frmMain.nx82 := 4+a;
 frmMain.nx83 := -4+a;
 frmMain.nx84 := 4+a;
 frmMain.nx85 := -4+a;
 frmMain.nx86 := 4+a;
 frmMain.nx87 := -4+a;
 frmMain.nx88 := 4+a;
 frmMain.nx89 := -4+a;
 frmMain.nx90 := -2+a;

frmMain.nx94 :=0+a;
frmMain.nx95 :=-2+a;  //цифры
frmMain.nx96 :=-4+a;  //цифры
frmMain.nx97 :=-6+a;  //цифры
frmMain.nx98 := 2+a;  //цифры
frmMain.nx99 := 4+a;  //цифры
frmMain.nx100 := 6+a;  //цифры
frmMain.nx101 := 8+a;  //цифры
frmMain.nx102 := 10+a;  //цифры
frmMain.nx103 := 12+a;  //цифры

frmMain.nx104 := -8+a;  //буквы
frmMain.nx105 := -8+a;  //буквы
frmMain.nx106 := -8+a;  //буквы
frmMain.nx107 := -8+a;  //буквы
frmMain.nx108 := -8+a;  //буквы
frmMain.nx109 := -8+a;  //буквы
frmMain.nx110 := -8+a;  //буквы
frmMain.nx111 := -8+a;  //буквы
frmMain.nx112 := -8+a;  //буквы
frmMain.nx113 := -8+a;  //буквы

frmMain.nx114 := -6+a;  //корабль
frmMain.nx115 := 0+a;  //цифры
frmMain.nx116 :=-2+a;  //цифры
frmMain.nx117 :=-4+a;  //цифры
frmMain.nx118 :=-6+a;  //цифры
frmMain.nx119 := 2+a;  //цифры
frmMain.nx120 := 4+a;  //цифры
frmMain.nx121 := 6+a;  //цифры
frmMain.nx122 := 8+a;  //цифры
frmMain.nx123 := 10+a;  //цифры
frmMain.nx124 := 12+a;  //цифры
frmMain.nx125 := 0+a;
frmMain.nx126 := 0+a;
frmMain.nx127 := 0+a;
frmMain.nx128 := 2+a;
frmMain.nx129 := -2+a;
frmMain.nx130 := -4+a;
frmMain.nx131 := 4+a;
frmMain.nx132 := -6+a;
frmMain.nx133 := 6+a;
frmMain.nx134 := 8+a;
frmMain.nx135 := -8+a;
frmMain.nx136 := -2+a;
frmMain.nx137 := 2+a;
frmMain.nx138 := -4+a;
frmMain.nx139 := 4+a;
frmMain.nx140 := -2+a;
frmMain.nx141 := 2+a;
frmMain.nx142 := 0+a;
frmMain.nx143 := 2+a;
frmMain.nx144 := -2+a;
frmMain.nx145 := -4+a;
frmMain.nx146 := 4+a;
frmMain.nx147 := 6+a;
frmMain.nx148 := -6+a;
frmMain.nx149 := -6+a;
frmMain.nx150 := 6+a;
frmMain.nx151 := 2+a;
frmMain.nx152 := -2+a;
frmMain.nx153 := 2+a;
frmMain.nx154 := -2+a;
frmMain.nx155 := 0+a;
frmMain.nx156 := 0+a;
frmMain.nx157 := 4+a;
frmMain.nx158 := -4+a;
frmMain.nx159 := -6+a;
frmMain.nx160 := 6+a;
frmMain.nx161 := 4+a;
frmMain.nx162 := -4+a;
frmMain.nx163 := -6+a;
frmMain.nx164 := 6+a;
frmMain.nx165 := 4+a;
frmMain.nx166 := -4+a;
frmMain.nx167 := -6+a;
frmMain.nx168 := 6+a;
frmMain.nx169 := 4+a;
frmMain.nx170 := -4+a;
frmMain.nx171 := -6+a;
frmMain.nx172 := 6+a;
frmMain.nx173 := 4+a;
frmMain.nx174 := -4+a;
frmMain.nx175 := -6+a;
frmMain.nx176 := 6+a;
frmMain.nx177 := 4+a;
frmMain.nx178 := -4+a;
frmMain.nx179 := -6+a;
frmMain.nx180 := 6+a;
 frmMain.nx181 := 4+a;
 frmMain.nx182 := -4+a;
 frmMain.nx183 := -6+a;
 frmMain.nx184 := 6+a;
 frmMain.nx185 := 4+a;
 frmMain.nx186 := -4+a;
 frmMain.nx187 := -6+a;
 frmMain.nx188 := 6+a;
 frmMain.nx189 := -4+a;
 frmMain.nx190 := 4+a;
 frmMain.nx191 := -6+a;
 frmMain.nx192 := 6+a;
 frmMain.nx193 := -4+a;
 frmMain.nx194 := 4+a;
 frmMain.nx195 := -6+a;
 frmMain.nx196 := 6+a;
 frmMain.nx197 := -4+a;
 frmMain.nx198 := 4+a;
 frmMain.nx199 := -6+a;
 frmMain.nx200 := 6+a;
 frmMain.nx201 := -4+a;
 frmMain.nx202 := 4+a;
 frmMain.nx203 := -6+a;
 frmMain.nx204 := 6+a;
 frmMain.nx205 := 6+a;  //корабль
 frmMain.nx206 := 6+a;  //Подлодка
 frmMain.nx215 := -6+a;
 frmMain.frmGL.Width:=800;
 a:=0;
 frmMain.nz := 0+b;
  frmMain.nz1 := 0+b;
  frmMain.nz2 := 0+b;
 frmMain.nz3 := 1+b;
 frmMain.nz7 := 0+b;
 frmMain.nz8 := 2+b;
 frmMain.nz9 := 2+b;
  frmMain.nz10 := -2+b;
 frmMain.nz11 := -2+b;
 frmMain.nz12 := -2+b;
 frmMain.nz14 := -3+b;
 frmMain.nz15 := -3+b;
 frmMain.nz16 := -4+b;
 frmMain.nz17 := -4+b;
  frmMain.nz18 := -5+b;
 frmMain.nz19 := -5+b;
 frmMain.nz20 := -6+b;
 frmMain.nz21 := -7+b;
 frmMain.nz22 := -7+b;
  frmMain.nz23 := -8+b;
 frmMain.nz24 := -8+b;
  frmMain.nz25 := -9+b;
 frmMain.nz26 := -9+b;
 frmMain.nz27 := -10+b;
  frmMain.nz28 := -10+b;
  frmMain.nz29 := -11+b;
 frmMain.nz30 := -11+b;

// 1

 frmMain.nz31 := -2+b;
 frmMain.nz32 := -2+b;
 frmMain.nz33 := -3+b;
 frmMain.nz34 := -3+b;
 frmMain.nz35 := -4+b;
 frmMain.nz36 := -4+b;
  frmMain.nz37 := -5+b;
 frmMain.nz38 := -5+b;
 frmMain.nz39 := -6+b;
 frmMain.nz40 := -6+b;
 frmMain.nz41 := -7+b;
 frmMain.nz42 := -7+b;
 frmMain.nz43 := -8+b;
 frmMain.nz44 := -8+b;
 frmMain.nz45 := -9+b;  //////////////


 //////////////////////

 frmMain.nz46 := -9+b;
 frmMain.nz47 := -9+b;
 frmMain.nz48 := -10+b;
 frmMain.nz49 := -11+b;
 frmMain.nz50 := -11+b;
 frmMain.nz51 := -2+b;
 frmMain.nz52 :=-2+b;
 frmMain.nz53 := -3+b;
 frmMain.nz54 :=  3+b;
 frmMain.nz55 := -3+b;
 frmMain.nz56 := -4+b;
 frmMain.nz57 := -5+b;
 frmMain.nz58 := -5+b;
 frmMain.nz59 := -6+b;
 frmMain.nz60 := -6+b;
 frmMain.nz61 := -7+b;
 frmMain.nz62 := -7+b;
 frmMain.nz63 := -8+b;
 frmMain.nz64 := -8+b;
 frmMain.nz65 := -9+b;
 frmMain.nz66 := -9+b;
 frmMain.nz67 := -10+b;
 frmMain.nz68 := -10+b;
 frmMain.nz69 := -11+b;
 frmMain.nz70 := -11+b;


  ///3
 ///
 ///
 frmMain.nz71 := -2+b;
 frmMain.nz72 :=-2+b;
 frmMain.nz73 := -3+b;
 frmMain.nz74 :=  -3+b;
 frmMain.nz75 := -4+b;
 frmMain.nz76 := -4+b;
 frmMain.nz77 := -5+b;
 frmMain.nz78 := -5+b;
 frmMain.nz79 := -6+b;
 frmMain.nz80 := -6+b;
 frmMain.nz81 := -7+b;
 frmMain.nz82 := -7+b;
 frmMain.nz83 := -8+b;
 frmMain.nz84 := -8+b;
 frmMain.nz85 := -9+b;
 frmMain.nz86 := -9+b;
 frmMain.nz87 := -10+b;
 frmMain.nz88 := -10+b;
 frmMain.nz89 := -11+b;
 frmMain.nz90 := -2+b;

frmMain.nz94 :=1+b;
frmMain.nz95 :=1+b;  //цифры
frmMain.nz96 :=1+b;  //цифры
frmMain.nz97 :=1+b;  //цифры
frmMain.nz98 := 1+b;  //цифры
frmMain.nz99 := 1+b;  //цифры
frmMain.nz100 := 1+b;  //цифры
frmMain.nz101 := 1+b;  //цифры
frmMain.nz102 := 1+b;  //цифры
frmMain.nz103 := 1+b;  //цифры

frmMain.nz104 := -0+b;  //буквы
frmMain.nz105 := -2+b;  //буквы
frmMain.nz106 := -4+b;  //буквы
frmMain.nz107 := -6+b;  //буквы
frmMain.nz108 := -8+b;  //буквы
frmMain.nz109 := -10+b;  //буквы
frmMain.nz110 := -12+b;  //буквы
frmMain.nz111 := -14+b;  //буквы
frmMain.nz112 := -16+b;  //буквы
frmMain.nz113 := -18+b;  //буквы

frmMain.nz114 := -4+b;  //корабль
frmMain.nz115 := -18+b;  //цифры
frmMain.nz116 :=-18+b;  //цифры
frmMain.nz117 :=-18+b;  //цифры
frmMain.nz118 :=-18+b;  //цифры
frmMain.nz119 := -18+b;  //цифры
frmMain.nz120 := -18+b;  //цифры
frmMain.nz121 := -18+b;  //цифры
frmMain.nz122 := -18+b;  //цифры
frmMain.nz123 := -18+b;  //цифры
frmMain.nz124 := -18+b;  //цифры
frmMain.nz125 := -16+b;
frmMain.nz126 := -14+b;
frmMain.nz127 := -12+b;
frmMain.nz128 := -16+b;
frmMain.nz129 := -16+b;
frmMain.nz130 := -16+b;
frmMain.nz131 := -16+b;
frmMain.nz132 := -16+b;
frmMain.nz133 := -16+b;
frmMain.nz134 := -16+b;
frmMain.nz135 := -16+b;
frmMain.nz136 := -14+b;
frmMain.nz137 := -14+b;
frmMain.nz138 := -14+b;
frmMain.nz139 := -14+b;
frmMain.nz140 := -14+b;
frmMain.nz141 := -15+b;
frmMain.nz142 := -15+b;
frmMain.nz143 := -15+b;
frmMain.nz144 := -15+b;
frmMain.nz145 := -15+b;
frmMain.nz146 := -15+b;
frmMain.nz147 := -15+b;
frmMain.nz148 := -15+b;
frmMain.nz149 := -14+b;
frmMain.nz150 := -14+b;
frmMain.nz151 := -12+b;
frmMain.nz152 := -12+b;
frmMain.nz153 := -13+b;
frmMain.nz154 := -13+b;
frmMain.nz155 := -13+b;
frmMain.nz156 := -6+b;
frmMain.nz157 := -12+b;
frmMain.nz158 := -12+b;
frmMain.nz159 := -12+b;
frmMain.nz160 := -12+b;
frmMain.nz161 := -10+b;
frmMain.nz162 := -10+b;
frmMain.nz163 := -10+b;
frmMain.nz164 := -10+b;
frmMain.nz165 := -8+b;
frmMain.nz166 := -8+b;
frmMain.nz167 := -8+b;
frmMain.nz168 := -8+b;
frmMain.nz169 := -6+b;
frmMain.nz170 := -6+b;
frmMain.nz171 := -6+b;
frmMain.nz172 := -6+b;
frmMain.nz173 := -4+b;
frmMain.nz174 := -4+b;
frmMain.nz175 := -4+b;
frmMain.nz176 := -4+b;
frmMain.nz177 := -2+b;
frmMain.nz178 := -2+b;
frmMain.nz179 := -2+b;
frmMain.nz180 := -2+b;
 frmMain.nz181 := -3+b;
 frmMain.nz182 := -3+b;
 frmMain.nz183 := -3+b;
 frmMain.nz184 := -3+b;
 frmMain.nz185 := -5+b;
 frmMain.nz186 := -5+b;
 frmMain.nz187 := -5+b;
 frmMain.nz188 := -5+b;
 frmMain.nz189 := -7+b;
 frmMain.nz190 := -7+b;
 frmMain.nz191 := -7+b;
 frmMain.nz192 := -7+b;
 frmMain.nz193 := -9+b;
 frmMain.nz194 := -9+b;
 frmMain.nz195 := -9+b;
 frmMain.nz196 := -9+b;
 frmMain.nz197 := -11+b;
 frmMain.nz198 := -11+b;
 frmMain.nz199 := -11+b;
 frmMain.nz200 := -11+b;
 frmMain.nz201 := -13+b;
 frmMain.nz202 := -13+b;
 frmMain.nz203 := -13+b;
 frmMain.nz204 := -13+b;
 frmMain.nz205 := -4+b;  //корабль
 frmMain.nz206 := -8+b;  //Подлодка
 frmMain.nz215 := -12+b;
 frmMain.frmGL.Width:=800;
 b:=0;

 end;




 if (c=4) and (d=5) then
begin
StringGrid1.Cells[c,d]:='1';
a:=a+1;
b:=b+11;
frmMain.nx := 0+a;
  frmMain.nx1 := 0+a;
  frmMain.nx2 := 0+a;
 frmMain.nx3 := 0+a;
 frmMain.nx7 := -1+a;
 frmMain.nx8 := 1+a;
 frmMain.nx9 := -1+a;
  frmMain.nx10 := -2+a;
 frmMain.nx11 := -1+a;
 frmMain.nx12 := 1+a;
 frmMain.nx14 := 1+a;
 frmMain.nx15 := -1+a;
 frmMain.nx16 := -1+a;
 frmMain.nx17 := 1+a;
  frmMain.nx18 := -1+a;
 frmMain.nx19 := 1+a;
 frmMain.nx20 := -1+a;
 frmMain.nx21 := -1+a;
 frmMain.nx22 := 1+a;
  frmMain.nx23 := -1+a;
 frmMain.nx24 := 1+a;
  frmMain.nx25 := 1+a;
 frmMain.nx26 := -1+a;
 frmMain.nx27 := 1+a;
  frmMain.nx28 := -1+a;
  frmMain.nx29 := 1+a;
 frmMain.nx30 := -1+a;

// 1

 frmMain.nx31 := -2+a;
 frmMain.nx32 := 2+a;
 frmMain.nx33 := -2+a;
 frmMain.nx34 :=  2+a;
 frmMain.nx35 := -2+a;
 frmMain.nx36 := 2+a;
  frmMain.nx37 := -2+a;
 frmMain.nx38 := 2+a;
 frmMain.nx39 := -2+a;
 frmMain.nx40 := 2+a;
 frmMain.nx41 := -2+a;
 frmMain.nx42 := 2+a;
 frmMain.nx43 := -2+a;
 frmMain.nx44 := 2+a;
 frmMain.nx45 := -2+a;  //////////////


 //////////////////////

 frmMain.nx46 := -2+a;
 frmMain.nx47 := -2+a;
 frmMain.nx48 := 2+a;
 frmMain.nx49 := -2+a;
 frmMain.nx50 := 2+a;
 frmMain.nx51 := -3+a;
 frmMain.nx52 :=3+a;
 frmMain.nx53 := -3+a;
 frmMain.nx54 :=  3+a;
 frmMain.nx55 := -3+a;
 frmMain.nx56 := 3+a;
 frmMain.nx57 := -3+a;
 frmMain.nx58 := 3+a;
 frmMain.nx59 := -3+a;
 frmMain.nx60 := 3+a;
 frmMain.nx61 := -3+a;
 frmMain.nx62 := 3+a;
 frmMain.nx63 := -3+a;
 frmMain.nx64 := 3+a;
 frmMain.nx65 := -3+a;
 frmMain.nx66 := 3+a;
 frmMain.nx67 := -3+a;
 frmMain.nx68 := 3+a;
 frmMain.nx69 := -3+a;
 frmMain.nx70 := 3+a;


  ///3
 ///
 ///
 frmMain.nx71 := -4+a;
 frmMain.nx72 :=4+a;
 frmMain.nx73 := -4+a;
 frmMain.nx74 :=  4+a;
 frmMain.nx75 := -4+a;
 frmMain.nx76 := 4+a;
 frmMain.nx77 := -4+a;
 frmMain.nx78 := 4+a;
 frmMain.nx79 := -4+a;
 frmMain.nx80 := 4+a;
 frmMain.nx81 := -4+a;
 frmMain.nx82 := 4+a;
 frmMain.nx83 := -4+a;
 frmMain.nx84 := 4+a;
 frmMain.nx85 := -4+a;
 frmMain.nx86 := 4+a;
 frmMain.nx87 := -4+a;
 frmMain.nx88 := 4+a;
 frmMain.nx89 := -4+a;
 frmMain.nx90 := -2+a;

frmMain.nx94 :=0+a;
frmMain.nx95 :=-2+a;  //цифры
frmMain.nx96 :=-4+a;  //цифры
frmMain.nx97 :=-6+a;  //цифры
frmMain.nx98 := 2+a;  //цифры
frmMain.nx99 := 4+a;  //цифры
frmMain.nx100 := 6+a;  //цифры
frmMain.nx101 := 8+a;  //цифры
frmMain.nx102 := 10+a;  //цифры
frmMain.nx103 := 12+a;  //цифры

frmMain.nx104 := -8+a;  //буквы
frmMain.nx105 := -8+a;  //буквы
frmMain.nx106 := -8+a;  //буквы
frmMain.nx107 := -8+a;  //буквы
frmMain.nx108 := -8+a;  //буквы
frmMain.nx109 := -8+a;  //буквы
frmMain.nx110 := -8+a;  //буквы
frmMain.nx111 := -8+a;  //буквы
frmMain.nx112 := -8+a;  //буквы
frmMain.nx113 := -8+a;  //буквы

frmMain.nx114 := -6+a;  //корабль
frmMain.nx115 := 0+a;  //цифры
frmMain.nx116 :=-2+a;  //цифры
frmMain.nx117 :=-4+a;  //цифры
frmMain.nx118 :=-6+a;  //цифры
frmMain.nx119 := 2+a;  //цифры
frmMain.nx120 := 4+a;  //цифры
frmMain.nx121 := 6+a;  //цифры
frmMain.nx122 := 8+a;  //цифры
frmMain.nx123 := 10+a;  //цифры
frmMain.nx124 := 12+a;  //цифры
frmMain.nx125 := 0+a;
frmMain.nx126 := 0+a;
frmMain.nx127 := 0+a;
frmMain.nx128 := 2+a;
frmMain.nx129 := -2+a;
frmMain.nx130 := -4+a;
frmMain.nx131 := 4+a;
frmMain.nx132 := -6+a;
frmMain.nx133 := 6+a;
frmMain.nx134 := 8+a;
frmMain.nx135 := -8+a;
frmMain.nx136 := -2+a;
frmMain.nx137 := 2+a;
frmMain.nx138 := -4+a;
frmMain.nx139 := 4+a;
frmMain.nx140 := -2+a;
frmMain.nx141 := 2+a;
frmMain.nx142 := 0+a;
frmMain.nx143 := 2+a;
frmMain.nx144 := -2+a;
frmMain.nx145 := -4+a;
frmMain.nx146 := 4+a;
frmMain.nx147 := 6+a;
frmMain.nx148 := -6+a;
frmMain.nx149 := -6+a;
frmMain.nx150 := 6+a;
frmMain.nx151 := 2+a;
frmMain.nx152 := -2+a;
frmMain.nx153 := 2+a;
frmMain.nx154 := -2+a;
frmMain.nx155 := 0+a;
frmMain.nx156 := 0+a;
frmMain.nx157 := 4+a;
frmMain.nx158 := -4+a;
frmMain.nx159 := -6+a;
frmMain.nx160 := 6+a;
frmMain.nx161 := 4+a;
frmMain.nx162 := -4+a;
frmMain.nx163 := -6+a;
frmMain.nx164 := 6+a;
frmMain.nx165 := 4+a;
frmMain.nx166 := -4+a;
frmMain.nx167 := -6+a;
frmMain.nx168 := 6+a;
frmMain.nx169 := 4+a;
frmMain.nx170 := -4+a;
frmMain.nx171 := -6+a;
frmMain.nx172 := 6+a;
frmMain.nx173 := 4+a;
frmMain.nx174 := -4+a;
frmMain.nx175 := -6+a;
frmMain.nx176 := 6+a;
frmMain.nx177 := 4+a;
frmMain.nx178 := -4+a;
frmMain.nx179 := -6+a;
frmMain.nx180 := 6+a;
 frmMain.nx181 := 4+a;
 frmMain.nx182 := -4+a;
 frmMain.nx183 := -6+a;
 frmMain.nx184 := 6+a;
 frmMain.nx185 := 4+a;
 frmMain.nx186 := -4+a;
 frmMain.nx187 := -6+a;
 frmMain.nx188 := 6+a;
 frmMain.nx189 := -4+a;
 frmMain.nx190 := 4+a;
 frmMain.nx191 := -6+a;
 frmMain.nx192 := 6+a;
 frmMain.nx193 := -4+a;
 frmMain.nx194 := 4+a;
 frmMain.nx195 := -6+a;
 frmMain.nx196 := 6+a;
 frmMain.nx197 := -4+a;
 frmMain.nx198 := 4+a;
 frmMain.nx199 := -6+a;
 frmMain.nx200 := 6+a;
 frmMain.nx201 := -4+a;
 frmMain.nx202 := 4+a;
 frmMain.nx203 := -6+a;
 frmMain.nx204 := 6+a;
 frmMain.nx205 := 6+a;  //корабль
 frmMain.nx206 := 6+a;  //Подлодка
 frmMain.nx215 := -6+a;
 frmMain.frmGL.Width:=800;
 a:=0;
 frmMain.nz := 0+b;
  frmMain.nz1 := 0+b;
  frmMain.nz2 := 0+b;
 frmMain.nz3 := 1+b;
 frmMain.nz7 := 0+b;
 frmMain.nz8 := 2+b;
 frmMain.nz9 := 2+b;
  frmMain.nz10 := -2+b;
 frmMain.nz11 := -2+b;
 frmMain.nz12 := -2+b;
 frmMain.nz14 := -3+b;
 frmMain.nz15 := -3+b;
 frmMain.nz16 := -4+b;
 frmMain.nz17 := -4+b;
  frmMain.nz18 := -5+b;
 frmMain.nz19 := -5+b;
 frmMain.nz20 := -6+b;
 frmMain.nz21 := -7+b;
 frmMain.nz22 := -7+b;
  frmMain.nz23 := -8+b;
 frmMain.nz24 := -8+b;
  frmMain.nz25 := -9+b;
 frmMain.nz26 := -9+b;
 frmMain.nz27 := -10+b;
  frmMain.nz28 := -10+b;
  frmMain.nz29 := -11+b;
 frmMain.nz30 := -11+b;

// 1

 frmMain.nz31 := -2+b;
 frmMain.nz32 := -2+b;
 frmMain.nz33 := -3+b;
 frmMain.nz34 := -3+b;
 frmMain.nz35 := -4+b;
 frmMain.nz36 := -4+b;
  frmMain.nz37 := -5+b;
 frmMain.nz38 := -5+b;
 frmMain.nz39 := -6+b;
 frmMain.nz40 := -6+b;
 frmMain.nz41 := -7+b;
 frmMain.nz42 := -7+b;
 frmMain.nz43 := -8+b;
 frmMain.nz44 := -8+b;
 frmMain.nz45 := -9+b;  //////////////


 //////////////////////

 frmMain.nz46 := -9+b;
 frmMain.nz47 := -9+b;
 frmMain.nz48 := -10+b;
 frmMain.nz49 := -11+b;
 frmMain.nz50 := -11+b;
 frmMain.nz51 := -2+b;
 frmMain.nz52 :=-2+b;
 frmMain.nz53 := -3+b;
 frmMain.nz54 :=  3+b;
 frmMain.nz55 := -3+b;
 frmMain.nz56 := -4+b;
 frmMain.nz57 := -5+b;
 frmMain.nz58 := -5+b;
 frmMain.nz59 := -6+b;
 frmMain.nz60 := -6+b;
 frmMain.nz61 := -7+b;
 frmMain.nz62 := -7+b;
 frmMain.nz63 := -8+b;
 frmMain.nz64 := -8+b;
 frmMain.nz65 := -9+b;
 frmMain.nz66 := -9+b;
 frmMain.nz67 := -10+b;
 frmMain.nz68 := -10+b;
 frmMain.nz69 := -11+b;
 frmMain.nz70 := -11+b;


  ///3
 ///
 ///
 frmMain.nz71 := -2+b;
 frmMain.nz72 :=-2+b;
 frmMain.nz73 := -3+b;
 frmMain.nz74 :=  -3+b;
 frmMain.nz75 := -4+b;
 frmMain.nz76 := -4+b;
 frmMain.nz77 := -5+b;
 frmMain.nz78 := -5+b;
 frmMain.nz79 := -6+b;
 frmMain.nz80 := -6+b;
 frmMain.nz81 := -7+b;
 frmMain.nz82 := -7+b;
 frmMain.nz83 := -8+b;
 frmMain.nz84 := -8+b;
 frmMain.nz85 := -9+b;
 frmMain.nz86 := -9+b;
 frmMain.nz87 := -10+b;
 frmMain.nz88 := -10+b;
 frmMain.nz89 := -11+b;
 frmMain.nz90 := -2+b;

frmMain.nz94 :=1+b;
frmMain.nz95 :=1+b;  //цифры
frmMain.nz96 :=1+b;  //цифры
frmMain.nz97 :=1+b;  //цифры
frmMain.nz98 := 1+b;  //цифры
frmMain.nz99 := 1+b;  //цифры
frmMain.nz100 := 1+b;  //цифры
frmMain.nz101 := 1+b;  //цифры
frmMain.nz102 := 1+b;  //цифры
frmMain.nz103 := 1+b;  //цифры

frmMain.nz104 := -0+b;  //буквы
frmMain.nz105 := -2+b;  //буквы
frmMain.nz106 := -4+b;  //буквы
frmMain.nz107 := -6+b;  //буквы
frmMain.nz108 := -8+b;  //буквы
frmMain.nz109 := -10+b;  //буквы
frmMain.nz110 := -12+b;  //буквы
frmMain.nz111 := -14+b;  //буквы
frmMain.nz112 := -16+b;  //буквы
frmMain.nz113 := -18+b;  //буквы

frmMain.nz114 := -4+b;  //корабль
frmMain.nz115 := -18+b;  //цифры
frmMain.nz116 :=-18+b;  //цифры
frmMain.nz117 :=-18+b;  //цифры
frmMain.nz118 :=-18+b;  //цифры
frmMain.nz119 := -18+b;  //цифры
frmMain.nz120 := -18+b;  //цифры
frmMain.nz121 := -18+b;  //цифры
frmMain.nz122 := -18+b;  //цифры
frmMain.nz123 := -18+b;  //цифры
frmMain.nz124 := -18+b;  //цифры
frmMain.nz125 := -16+b;
frmMain.nz126 := -14+b;
frmMain.nz127 := -12+b;
frmMain.nz128 := -16+b;
frmMain.nz129 := -16+b;
frmMain.nz130 := -16+b;
frmMain.nz131 := -16+b;
frmMain.nz132 := -16+b;
frmMain.nz133 := -16+b;
frmMain.nz134 := -16+b;
frmMain.nz135 := -16+b;
frmMain.nz136 := -14+b;
frmMain.nz137 := -14+b;
frmMain.nz138 := -14+b;
frmMain.nz139 := -14+b;
frmMain.nz140 := -14+b;
frmMain.nz141 := -15+b;
frmMain.nz142 := -15+b;
frmMain.nz143 := -15+b;
frmMain.nz144 := -15+b;
frmMain.nz145 := -15+b;
frmMain.nz146 := -15+b;
frmMain.nz147 := -15+b;
frmMain.nz148 := -15+b;
frmMain.nz149 := -14+b;
frmMain.nz150 := -14+b;
frmMain.nz151 := -12+b;
frmMain.nz152 := -12+b;
frmMain.nz153 := -13+b;
frmMain.nz154 := -13+b;
frmMain.nz155 := -13+b;
frmMain.nz156 := -6+b;
frmMain.nz157 := -12+b;
frmMain.nz158 := -12+b;
frmMain.nz159 := -12+b;
frmMain.nz160 := -12+b;
frmMain.nz161 := -10+b;
frmMain.nz162 := -10+b;
frmMain.nz163 := -10+b;
frmMain.nz164 := -10+b;
frmMain.nz165 := -8+b;
frmMain.nz166 := -8+b;
frmMain.nz167 := -8+b;
frmMain.nz168 := -8+b;
frmMain.nz169 := -6+b;
frmMain.nz170 := -6+b;
frmMain.nz171 := -6+b;
frmMain.nz172 := -6+b;
frmMain.nz173 := -4+b;
frmMain.nz174 := -4+b;
frmMain.nz175 := -4+b;
frmMain.nz176 := -4+b;
frmMain.nz177 := -2+b;
frmMain.nz178 := -2+b;
frmMain.nz179 := -2+b;
frmMain.nz180 := -2+b;
 frmMain.nz181 := -3+b;
 frmMain.nz182 := -3+b;
 frmMain.nz183 := -3+b;
 frmMain.nz184 := -3+b;
 frmMain.nz185 := -5+b;
 frmMain.nz186 := -5+b;
 frmMain.nz187 := -5+b;
 frmMain.nz188 := -5+b;
 frmMain.nz189 := -7+b;
 frmMain.nz190 := -7+b;
 frmMain.nz191 := -7+b;
 frmMain.nz192 := -7+b;
 frmMain.nz193 := -9+b;
 frmMain.nz194 := -9+b;
 frmMain.nz195 := -9+b;
 frmMain.nz196 := -9+b;
 frmMain.nz197 := -11+b;
 frmMain.nz198 := -11+b;
 frmMain.nz199 := -11+b;
 frmMain.nz200 := -11+b;
 frmMain.nz201 := -13+b;
 frmMain.nz202 := -13+b;
 frmMain.nz203 := -13+b;
 frmMain.nz204 := -13+b;
 frmMain.nz205 := -4+b;  //корабль
 frmMain.nz206 := -8+b;  //Подлодка
 frmMain.nz215 := -12+b;
 frmMain.frmGL.Width:=800;
 b:=0;

 end;







 if (c=4) and (d=6) then
begin
StringGrid1.Cells[c,d]:='1';
a:=a+1;
b:=b+9;
frmMain.nx := 0+a;
  frmMain.nx1 := 0+a;
  frmMain.nx2 := 0+a;
 frmMain.nx3 := 0+a;
 frmMain.nx7 := -1+a;
 frmMain.nx8 := 1+a;
 frmMain.nx9 := -1+a;
  frmMain.nx10 := -2+a;
 frmMain.nx11 := -1+a;
 frmMain.nx12 := 1+a;
 frmMain.nx14 := 1+a;
 frmMain.nx15 := -1+a;
 frmMain.nx16 := -1+a;
 frmMain.nx17 := 1+a;
  frmMain.nx18 := -1+a;
 frmMain.nx19 := 1+a;
 frmMain.nx20 := -1+a;
 frmMain.nx21 := -1+a;
 frmMain.nx22 := 1+a;
  frmMain.nx23 := -1+a;
 frmMain.nx24 := 1+a;
  frmMain.nx25 := 1+a;
 frmMain.nx26 := -1+a;
 frmMain.nx27 := 1+a;
  frmMain.nx28 := -1+a;
  frmMain.nx29 := 1+a;
 frmMain.nx30 := -1+a;

// 1

 frmMain.nx31 := -2+a;
 frmMain.nx32 := 2+a;
 frmMain.nx33 := -2+a;
 frmMain.nx34 :=  2+a;
 frmMain.nx35 := -2+a;
 frmMain.nx36 := 2+a;
  frmMain.nx37 := -2+a;
 frmMain.nx38 := 2+a;
 frmMain.nx39 := -2+a;
 frmMain.nx40 := 2+a;
 frmMain.nx41 := -2+a;
 frmMain.nx42 := 2+a;
 frmMain.nx43 := -2+a;
 frmMain.nx44 := 2+a;
 frmMain.nx45 := -2+a;  //////////////


 //////////////////////

 frmMain.nx46 := -2+a;
 frmMain.nx47 := -2+a;
 frmMain.nx48 := 2+a;
 frmMain.nx49 := -2+a;
 frmMain.nx50 := 2+a;
 frmMain.nx51 := -3+a;
 frmMain.nx52 :=3+a;
 frmMain.nx53 := -3+a;
 frmMain.nx54 :=  3+a;
 frmMain.nx55 := -3+a;
 frmMain.nx56 := 3+a;
 frmMain.nx57 := -3+a;
 frmMain.nx58 := 3+a;
 frmMain.nx59 := -3+a;
 frmMain.nx60 := 3+a;
 frmMain.nx61 := -3+a;
 frmMain.nx62 := 3+a;
 frmMain.nx63 := -3+a;
 frmMain.nx64 := 3+a;
 frmMain.nx65 := -3+a;
 frmMain.nx66 := 3+a;
 frmMain.nx67 := -3+a;
 frmMain.nx68 := 3+a;
 frmMain.nx69 := -3+a;
 frmMain.nx70 := 3+a;


  ///3
 ///
 ///
 frmMain.nx71 := -4+a;
 frmMain.nx72 :=4+a;
 frmMain.nx73 := -4+a;
 frmMain.nx74 :=  4+a;
 frmMain.nx75 := -4+a;
 frmMain.nx76 := 4+a;
 frmMain.nx77 := -4+a;
 frmMain.nx78 := 4+a;
 frmMain.nx79 := -4+a;
 frmMain.nx80 := 4+a;
 frmMain.nx81 := -4+a;
 frmMain.nx82 := 4+a;
 frmMain.nx83 := -4+a;
 frmMain.nx84 := 4+a;
 frmMain.nx85 := -4+a;
 frmMain.nx86 := 4+a;
 frmMain.nx87 := -4+a;
 frmMain.nx88 := 4+a;
 frmMain.nx89 := -4+a;
 frmMain.nx90 := -2+a;

frmMain.nx94 :=0+a;
frmMain.nx95 :=-2+a;  //цифры
frmMain.nx96 :=-4+a;  //цифры
frmMain.nx97 :=-6+a;  //цифры
frmMain.nx98 := 2+a;  //цифры
frmMain.nx99 := 4+a;  //цифры
frmMain.nx100 := 6+a;  //цифры
frmMain.nx101 := 8+a;  //цифры
frmMain.nx102 := 10+a;  //цифры
frmMain.nx103 := 12+a;  //цифры

frmMain.nx104 := -8+a;  //буквы
frmMain.nx105 := -8+a;  //буквы
frmMain.nx106 := -8+a;  //буквы
frmMain.nx107 := -8+a;  //буквы
frmMain.nx108 := -8+a;  //буквы
frmMain.nx109 := -8+a;  //буквы
frmMain.nx110 := -8+a;  //буквы
frmMain.nx111 := -8+a;  //буквы
frmMain.nx112 := -8+a;  //буквы
frmMain.nx113 := -8+a;  //буквы

frmMain.nx114 := -6+a;  //корабль
frmMain.nx115 := 0+a;  //цифры
frmMain.nx116 :=-2+a;  //цифры
frmMain.nx117 :=-4+a;  //цифры
frmMain.nx118 :=-6+a;  //цифры
frmMain.nx119 := 2+a;  //цифры
frmMain.nx120 := 4+a;  //цифры
frmMain.nx121 := 6+a;  //цифры
frmMain.nx122 := 8+a;  //цифры
frmMain.nx123 := 10+a;  //цифры
frmMain.nx124 := 12+a;  //цифры
frmMain.nx125 := 0+a;
frmMain.nx126 := 0+a;
frmMain.nx127 := 0+a;
frmMain.nx128 := 2+a;
frmMain.nx129 := -2+a;
frmMain.nx130 := -4+a;
frmMain.nx131 := 4+a;
frmMain.nx132 := -6+a;
frmMain.nx133 := 6+a;
frmMain.nx134 := 8+a;
frmMain.nx135 := -8+a;
frmMain.nx136 := -2+a;
frmMain.nx137 := 2+a;
frmMain.nx138 := -4+a;
frmMain.nx139 := 4+a;
frmMain.nx140 := -2+a;
frmMain.nx141 := 2+a;
frmMain.nx142 := 0+a;
frmMain.nx143 := 2+a;
frmMain.nx144 := -2+a;
frmMain.nx145 := -4+a;
frmMain.nx146 := 4+a;
frmMain.nx147 := 6+a;
frmMain.nx148 := -6+a;
frmMain.nx149 := -6+a;
frmMain.nx150 := 6+a;
frmMain.nx151 := 2+a;
frmMain.nx152 := -2+a;
frmMain.nx153 := 2+a;
frmMain.nx154 := -2+a;
frmMain.nx155 := 0+a;
frmMain.nx156 := 0+a;
frmMain.nx157 := 4+a;
frmMain.nx158 := -4+a;
frmMain.nx159 := -6+a;
frmMain.nx160 := 6+a;
frmMain.nx161 := 4+a;
frmMain.nx162 := -4+a;
frmMain.nx163 := -6+a;
frmMain.nx164 := 6+a;
frmMain.nx165 := 4+a;
frmMain.nx166 := -4+a;
frmMain.nx167 := -6+a;
frmMain.nx168 := 6+a;
frmMain.nx169 := 4+a;
frmMain.nx170 := -4+a;
frmMain.nx171 := -6+a;
frmMain.nx172 := 6+a;
frmMain.nx173 := 4+a;
frmMain.nx174 := -4+a;
frmMain.nx175 := -6+a;
frmMain.nx176 := 6+a;
frmMain.nx177 := 4+a;
frmMain.nx178 := -4+a;
frmMain.nx179 := -6+a;
frmMain.nx180 := 6+a;
 frmMain.nx181 := 4+a;
 frmMain.nx182 := -4+a;
 frmMain.nx183 := -6+a;
 frmMain.nx184 := 6+a;
 frmMain.nx185 := 4+a;
 frmMain.nx186 := -4+a;
 frmMain.nx187 := -6+a;
 frmMain.nx188 := 6+a;
 frmMain.nx189 := -4+a;
 frmMain.nx190 := 4+a;
 frmMain.nx191 := -6+a;
 frmMain.nx192 := 6+a;
 frmMain.nx193 := -4+a;
 frmMain.nx194 := 4+a;
 frmMain.nx195 := -6+a;
 frmMain.nx196 := 6+a;
 frmMain.nx197 := -4+a;
 frmMain.nx198 := 4+a;
 frmMain.nx199 := -6+a;
 frmMain.nx200 := 6+a;
 frmMain.nx201 := -4+a;
 frmMain.nx202 := 4+a;
 frmMain.nx203 := -6+a;
 frmMain.nx204 := 6+a;
 frmMain.nx205 := 6+a;  //корабль
 frmMain.nx206 := 6+a;  //Подлодка
 frmMain.nx215 := -6+a;
 frmMain.frmGL.Width:=800;
 a:=0;
 frmMain.nz := 0+b;
  frmMain.nz1 := 0+b;
  frmMain.nz2 := 0+b;
 frmMain.nz3 := 1+b;
 frmMain.nz7 := 0+b;
 frmMain.nz8 := 2+b;
 frmMain.nz9 := 2+b;
  frmMain.nz10 := -2+b;
 frmMain.nz11 := -2+b;
 frmMain.nz12 := -2+b;
 frmMain.nz14 := -3+b;
 frmMain.nz15 := -3+b;
 frmMain.nz16 := -4+b;
 frmMain.nz17 := -4+b;
  frmMain.nz18 := -5+b;
 frmMain.nz19 := -5+b;
 frmMain.nz20 := -6+b;
 frmMain.nz21 := -7+b;
 frmMain.nz22 := -7+b;
  frmMain.nz23 := -8+b;
 frmMain.nz24 := -8+b;
  frmMain.nz25 := -9+b;
 frmMain.nz26 := -9+b;
 frmMain.nz27 := -10+b;
  frmMain.nz28 := -10+b;
  frmMain.nz29 := -11+b;
 frmMain.nz30 := -11+b;

// 1

 frmMain.nz31 := -2+b;
 frmMain.nz32 := -2+b;
 frmMain.nz33 := -3+b;
 frmMain.nz34 := -3+b;
 frmMain.nz35 := -4+b;
 frmMain.nz36 := -4+b;
  frmMain.nz37 := -5+b;
 frmMain.nz38 := -5+b;
 frmMain.nz39 := -6+b;
 frmMain.nz40 := -6+b;
 frmMain.nz41 := -7+b;
 frmMain.nz42 := -7+b;
 frmMain.nz43 := -8+b;
 frmMain.nz44 := -8+b;
 frmMain.nz45 := -9+b;  //////////////


 //////////////////////

 frmMain.nz46 := -9+b;
 frmMain.nz47 := -9+b;
 frmMain.nz48 := -10+b;
 frmMain.nz49 := -11+b;
 frmMain.nz50 := -11+b;
 frmMain.nz51 := -2+b;
 frmMain.nz52 :=-2+b;
 frmMain.nz53 := -3+b;
 frmMain.nz54 :=  3+b;
 frmMain.nz55 := -3+b;
 frmMain.nz56 := -4+b;
 frmMain.nz57 := -5+b;
 frmMain.nz58 := -5+b;
 frmMain.nz59 := -6+b;
 frmMain.nz60 := -6+b;
 frmMain.nz61 := -7+b;
 frmMain.nz62 := -7+b;
 frmMain.nz63 := -8+b;
 frmMain.nz64 := -8+b;
 frmMain.nz65 := -9+b;
 frmMain.nz66 := -9+b;
 frmMain.nz67 := -10+b;
 frmMain.nz68 := -10+b;
 frmMain.nz69 := -11+b;
 frmMain.nz70 := -11+b;


  ///3
 ///
 ///
 frmMain.nz71 := -2+b;
 frmMain.nz72 :=-2+b;
 frmMain.nz73 := -3+b;
 frmMain.nz74 :=  -3+b;
 frmMain.nz75 := -4+b;
 frmMain.nz76 := -4+b;
 frmMain.nz77 := -5+b;
 frmMain.nz78 := -5+b;
 frmMain.nz79 := -6+b;
 frmMain.nz80 := -6+b;
 frmMain.nz81 := -7+b;
 frmMain.nz82 := -7+b;
 frmMain.nz83 := -8+b;
 frmMain.nz84 := -8+b;
 frmMain.nz85 := -9+b;
 frmMain.nz86 := -9+b;
 frmMain.nz87 := -10+b;
 frmMain.nz88 := -10+b;
 frmMain.nz89 := -11+b;
 frmMain.nz90 := -2+b;

frmMain.nz94 :=1+b;
frmMain.nz95 :=1+b;  //цифры
frmMain.nz96 :=1+b;  //цифры
frmMain.nz97 :=1+b;  //цифры
frmMain.nz98 := 1+b;  //цифры
frmMain.nz99 := 1+b;  //цифры
frmMain.nz100 := 1+b;  //цифры
frmMain.nz101 := 1+b;  //цифры
frmMain.nz102 := 1+b;  //цифры
frmMain.nz103 := 1+b;  //цифры

frmMain.nz104 := -0+b;  //буквы
frmMain.nz105 := -2+b;  //буквы
frmMain.nz106 := -4+b;  //буквы
frmMain.nz107 := -6+b;  //буквы
frmMain.nz108 := -8+b;  //буквы
frmMain.nz109 := -10+b;  //буквы
frmMain.nz110 := -12+b;  //буквы
frmMain.nz111 := -14+b;  //буквы
frmMain.nz112 := -16+b;  //буквы
frmMain.nz113 := -18+b;  //буквы

frmMain.nz114 := -4+b;  //корабль
frmMain.nz115 := -18+b;  //цифры
frmMain.nz116 :=-18+b;  //цифры
frmMain.nz117 :=-18+b;  //цифры
frmMain.nz118 :=-18+b;  //цифры
frmMain.nz119 := -18+b;  //цифры
frmMain.nz120 := -18+b;  //цифры
frmMain.nz121 := -18+b;  //цифры
frmMain.nz122 := -18+b;  //цифры
frmMain.nz123 := -18+b;  //цифры
frmMain.nz124 := -18+b;  //цифры
frmMain.nz125 := -16+b;
frmMain.nz126 := -14+b;
frmMain.nz127 := -12+b;
frmMain.nz128 := -16+b;
frmMain.nz129 := -16+b;
frmMain.nz130 := -16+b;
frmMain.nz131 := -16+b;
frmMain.nz132 := -16+b;
frmMain.nz133 := -16+b;
frmMain.nz134 := -16+b;
frmMain.nz135 := -16+b;
frmMain.nz136 := -14+b;
frmMain.nz137 := -14+b;
frmMain.nz138 := -14+b;
frmMain.nz139 := -14+b;
frmMain.nz140 := -14+b;
frmMain.nz141 := -15+b;
frmMain.nz142 := -15+b;
frmMain.nz143 := -15+b;
frmMain.nz144 := -15+b;
frmMain.nz145 := -15+b;
frmMain.nz146 := -15+b;
frmMain.nz147 := -15+b;
frmMain.nz148 := -15+b;
frmMain.nz149 := -14+b;
frmMain.nz150 := -14+b;
frmMain.nz151 := -12+b;
frmMain.nz152 := -12+b;
frmMain.nz153 := -13+b;
frmMain.nz154 := -13+b;
frmMain.nz155 := -13+b;
frmMain.nz156 := -6+b;
frmMain.nz157 := -12+b;
frmMain.nz158 := -12+b;
frmMain.nz159 := -12+b;
frmMain.nz160 := -12+b;
frmMain.nz161 := -10+b;
frmMain.nz162 := -10+b;
frmMain.nz163 := -10+b;
frmMain.nz164 := -10+b;
frmMain.nz165 := -8+b;
frmMain.nz166 := -8+b;
frmMain.nz167 := -8+b;
frmMain.nz168 := -8+b;
frmMain.nz169 := -6+b;
frmMain.nz170 := -6+b;
frmMain.nz171 := -6+b;
frmMain.nz172 := -6+b;
frmMain.nz173 := -4+b;
frmMain.nz174 := -4+b;
frmMain.nz175 := -4+b;
frmMain.nz176 := -4+b;
frmMain.nz177 := -2+b;
frmMain.nz178 := -2+b;
frmMain.nz179 := -2+b;
frmMain.nz180 := -2+b;
 frmMain.nz181 := -3+b;
 frmMain.nz182 := -3+b;
 frmMain.nz183 := -3+b;
 frmMain.nz184 := -3+b;
 frmMain.nz185 := -5+b;
 frmMain.nz186 := -5+b;
 frmMain.nz187 := -5+b;
 frmMain.nz188 := -5+b;
 frmMain.nz189 := -7+b;
 frmMain.nz190 := -7+b;
 frmMain.nz191 := -7+b;
 frmMain.nz192 := -7+b;
 frmMain.nz193 := -9+b;
 frmMain.nz194 := -9+b;
 frmMain.nz195 := -9+b;
 frmMain.nz196 := -9+b;
 frmMain.nz197 := -11+b;
 frmMain.nz198 := -11+b;
 frmMain.nz199 := -11+b;
 frmMain.nz200 := -11+b;
 frmMain.nz201 := -13+b;
 frmMain.nz202 := -13+b;
 frmMain.nz203 := -13+b;
 frmMain.nz204 := -13+b;
 frmMain.nz205 := -4+b;  //корабль
 frmMain.nz206 := -8+b;  //Подлодка
 frmMain.nz215 := -12+b;
 frmMain.frmGL.Width:=800;
 b:=0;

 end;




 if (c=4) and (d=7) then
begin
 c:=4; d:=6;
StringGrid1.Cells[c,d]:='d';
  c:=4; d:=7;
StringGrid1.Cells[c,d]:='1';
a:=a+1;
b:=b+7;
korabley:=korabley+1;
label2.Caption:=inttostr(korabley);
ochkofnabrano:=ochkofnabrano+200;
label6.Caption:=inttostr(ochkofnabrano);
frmMain.nx := 0+a;
  frmMain.nx1 := 0+a;
  frmMain.nx2 := 0+a;
 frmMain.nx3 := 0+a;
 frmMain.nx7 := -1+a;
 frmMain.nx8 := 1+a;
 frmMain.nx9 := -1+a;
  frmMain.nx10 := -2+a;
 frmMain.nx11 := -1+a;
 frmMain.nx12 := 1+a;
 frmMain.nx14 := 1+a;
 frmMain.nx15 := -1+a;
 frmMain.nx16 := -1+a;
 frmMain.nx17 := 1+a;
  frmMain.nx18 := -1+a;
 frmMain.nx19 := 1+a;
 frmMain.nx20 := -1+a;
 frmMain.nx21 := -1+a;
 frmMain.nx22 := 1+a;
  frmMain.nx23 := -1+a;
 frmMain.nx24 := 1+a;
  frmMain.nx25 := 1+a;
 frmMain.nx26 := -1+a;
 frmMain.nx27 := 1+a;
  frmMain.nx28 := -1+a;
  frmMain.nx29 := 1+a;
 frmMain.nx30 := -1+a;

// 1

 frmMain.nx31 := -2+a;
 frmMain.nx32 := 2+a;
 frmMain.nx33 := -2+a;
 frmMain.nx34 :=  2+a;
 frmMain.nx35 := -2+a;
 frmMain.nx36 := 2+a;
  frmMain.nx37 := -2+a;
 frmMain.nx38 := 2+a;
 frmMain.nx39 := -2+a;
 frmMain.nx40 := 2+a;
 frmMain.nx41 := -2+a;
 frmMain.nx42 := 2+a;
 frmMain.nx43 := -2+a;
 frmMain.nx44 := 2+a;
 frmMain.nx45 := -2+a;  //////////////


 //////////////////////

 frmMain.nx46 := -2+a;
 frmMain.nx47 := -2+a;
 frmMain.nx48 := 2+a;
 frmMain.nx49 := -2+a;
 frmMain.nx50 := 2+a;
 frmMain.nx51 := -3+a;
 frmMain.nx52 :=3+a;
 frmMain.nx53 := -3+a;
 frmMain.nx54 :=  3+a;
 frmMain.nx55 := -3+a;
 frmMain.nx56 := 3+a;
 frmMain.nx57 := -3+a;
 frmMain.nx58 := 3+a;
 frmMain.nx59 := -3+a;
 frmMain.nx60 := 3+a;
 frmMain.nx61 := -3+a;
 frmMain.nx62 := 3+a;
 frmMain.nx63 := -3+a;
 frmMain.nx64 := 3+a;
 frmMain.nx65 := -3+a;
 frmMain.nx66 := 3+a;
 frmMain.nx67 := -3+a;
 frmMain.nx68 := 3+a;
 frmMain.nx69 := -3+a;
 frmMain.nx70 := 3+a;


  ///3
 ///
 ///
 frmMain.nx71 := -4+a;
 frmMain.nx72 :=4+a;
 frmMain.nx73 := -4+a;
 frmMain.nx74 :=  4+a;
 frmMain.nx75 := -4+a;
 frmMain.nx76 := 4+a;
 frmMain.nx77 := -4+a;
 frmMain.nx78 := 4+a;
 frmMain.nx79 := -4+a;
 frmMain.nx80 := 4+a;
 frmMain.nx81 := -4+a;
 frmMain.nx82 := 4+a;
 frmMain.nx83 := -4+a;
 frmMain.nx84 := 4+a;
 frmMain.nx85 := -4+a;
 frmMain.nx86 := 4+a;
 frmMain.nx87 := -4+a;
 frmMain.nx88 := 4+a;
 frmMain.nx89 := -4+a;
 frmMain.nx90 := -2+a;

frmMain.nx94 :=0+a;
frmMain.nx95 :=-2+a;  //цифры
frmMain.nx96 :=-4+a;  //цифры
frmMain.nx97 :=-6+a;  //цифры
frmMain.nx98 := 2+a;  //цифры
frmMain.nx99 := 4+a;  //цифры
frmMain.nx100 := 6+a;  //цифры
frmMain.nx101 := 8+a;  //цифры
frmMain.nx102 := 10+a;  //цифры
frmMain.nx103 := 12+a;  //цифры

frmMain.nx104 := -8+a;  //буквы
frmMain.nx105 := -8+a;  //буквы
frmMain.nx106 := -8+a;  //буквы
frmMain.nx107 := -8+a;  //буквы
frmMain.nx108 := -8+a;  //буквы
frmMain.nx109 := -8+a;  //буквы
frmMain.nx110 := -8+a;  //буквы
frmMain.nx111 := -8+a;  //буквы
frmMain.nx112 := -8+a;  //буквы
frmMain.nx113 := -8+a;  //буквы

frmMain.nx114 := -6+a;  //корабль
frmMain.nx115 := 0+a;  //цифры
frmMain.nx116 :=-2+a;  //цифры
frmMain.nx117 :=-4+a;  //цифры
frmMain.nx118 :=-6+a;  //цифры
frmMain.nx119 := 2+a;  //цифры
frmMain.nx120 := 4+a;  //цифры
frmMain.nx121 := 6+a;  //цифры
frmMain.nx122 := 8+a;  //цифры
frmMain.nx123 := 10+a;  //цифры
frmMain.nx124 := 12+a;  //цифры
frmMain.nx125 := 0+a;
frmMain.nx126 := 0+a;
frmMain.nx127 := 0+a;
frmMain.nx128 := 2+a;
frmMain.nx129 := -2+a;
frmMain.nx130 := -4+a;
frmMain.nx131 := 4+a;
frmMain.nx132 := -6+a;
frmMain.nx133 := 6+a;
frmMain.nx134 := 8+a;
frmMain.nx135 := -8+a;
frmMain.nx136 := -2+a;
frmMain.nx137 := 2+a;
frmMain.nx138 := -4+a;
frmMain.nx139 := 4+a;
frmMain.nx140 := -2+a;
frmMain.nx141 := 2+a;
frmMain.nx142 := 0+a;
frmMain.nx143 := 2+a;
frmMain.nx144 := -2+a;
frmMain.nx145 := -4+a;
frmMain.nx146 := 4+a;
frmMain.nx147 := 6+a;
frmMain.nx148 := -6+a;
frmMain.nx149 := -6+a;
frmMain.nx150 := 6+a;
frmMain.nx151 := 2+a;
frmMain.nx152 := -2+a;
frmMain.nx153 := 2+a;
frmMain.nx154 := -2+a;
frmMain.nx155 := 0+a;
frmMain.nx156 := 0+a;
frmMain.nx157 := 4+a;
frmMain.nx158 := -4+a;
frmMain.nx159 := -6+a;
frmMain.nx160 := 6+a;
frmMain.nx161 := 4+a;
frmMain.nx162 := -4+a;
frmMain.nx163 := -6+a;
frmMain.nx164 := 6+a;
frmMain.nx165 := 4+a;
frmMain.nx166 := -4+a;
frmMain.nx167 := -6+a;
frmMain.nx168 := 6+a;
frmMain.nx169 := 4+a;
frmMain.nx170 := -4+a;
frmMain.nx171 := -6+a;
frmMain.nx172 := 6+a;
frmMain.nx173 := 4+a;
frmMain.nx174 := -4+a;
frmMain.nx175 := -6+a;
frmMain.nx176 := 6+a;
frmMain.nx177 := 4+a;
frmMain.nx178 := -4+a;
frmMain.nx179 := -6+a;
frmMain.nx180 := 6+a;
 frmMain.nx181 := 4+a;
 frmMain.nx182 := -4+a;
 frmMain.nx183 := -6+a;
 frmMain.nx184 := 6+a;
 frmMain.nx185 := 4+a;
 frmMain.nx186 := -4+a;
 frmMain.nx187 := -6+a;
 frmMain.nx188 := 6+a;
 frmMain.nx189 := -4+a;
 frmMain.nx190 := 4+a;
 frmMain.nx191 := -6+a;
 frmMain.nx192 := 6+a;
 frmMain.nx193 := -4+a;
 frmMain.nx194 := 4+a;
 frmMain.nx195 := -6+a;
 frmMain.nx196 := 6+a;
 frmMain.nx197 := -4+a;
 frmMain.nx198 := 4+a;
 frmMain.nx199 := -6+a;
 frmMain.nx200 := 6+a;
 frmMain.nx201 := -4+a;
 frmMain.nx202 := 4+a;
 frmMain.nx203 := -6+a;
 frmMain.nx204 := 6+a;
 frmMain.nx205 := 6+a;  //корабль
 frmMain.nx206 := 6+a;  //Подлодка
 frmMain.nx215 := -6+a;
 frmMain.frmGL.Width:=800;
 a:=0;
 frmMain.nz := 0+b;
  frmMain.nz1 := 0+b;
  frmMain.nz2 := 0+b;
 frmMain.nz3 := 1+b;
 frmMain.nz7 := 0+b;
 frmMain.nz8 := 2+b;
 frmMain.nz9 := 2+b;
  frmMain.nz10 := -2+b;
 frmMain.nz11 := -2+b;
 frmMain.nz12 := -2+b;
 frmMain.nz14 := -3+b;
 frmMain.nz15 := -3+b;
 frmMain.nz16 := -4+b;
 frmMain.nz17 := -4+b;
  frmMain.nz18 := -5+b;
 frmMain.nz19 := -5+b;
 frmMain.nz20 := -6+b;
 frmMain.nz21 := -7+b;
 frmMain.nz22 := -7+b;
  frmMain.nz23 := -8+b;
 frmMain.nz24 := -8+b;
  frmMain.nz25 := -9+b;
 frmMain.nz26 := -9+b;
 frmMain.nz27 := -10+b;
  frmMain.nz28 := -10+b;
  frmMain.nz29 := -11+b;
 frmMain.nz30 := -11+b;

// 1

 frmMain.nz31 := -2+b;
 frmMain.nz32 := -2+b;
 frmMain.nz33 := -3+b;
 frmMain.nz34 := -3+b;
 frmMain.nz35 := -4+b;
 frmMain.nz36 := -4+b;
  frmMain.nz37 := -5+b;
 frmMain.nz38 := -5+b;
 frmMain.nz39 := -6+b;
 frmMain.nz40 := -6+b;
 frmMain.nz41 := -7+b;
 frmMain.nz42 := -7+b;
 frmMain.nz43 := -8+b;
 frmMain.nz44 := -8+b;
 frmMain.nz45 := -9+b;  //////////////


 //////////////////////

 frmMain.nz46 := -9+b;
 frmMain.nz47 := -9+b;
 frmMain.nz48 := -10+b;
 frmMain.nz49 := -11+b;
 frmMain.nz50 := -11+b;
 frmMain.nz51 := -2+b;
 frmMain.nz52 :=-2+b;
 frmMain.nz53 := -3+b;
 frmMain.nz54 :=  3+b;
 frmMain.nz55 := -3+b;
 frmMain.nz56 := -4+b;
 frmMain.nz57 := -5+b;
 frmMain.nz58 := -5+b;
 frmMain.nz59 := -6+b;
 frmMain.nz60 := -6+b;
 frmMain.nz61 := -7+b;
 frmMain.nz62 := -7+b;
 frmMain.nz63 := -8+b;
 frmMain.nz64 := -8+b;
 frmMain.nz65 := -9+b;
 frmMain.nz66 := -9+b;
 frmMain.nz67 := -10+b;
 frmMain.nz68 := -10+b;
 frmMain.nz69 := -11+b;
 frmMain.nz70 := -11+b;


  ///3
 ///
 ///
 frmMain.nz71 := -2+b;
 frmMain.nz72 :=-2+b;
 frmMain.nz73 := -3+b;
 frmMain.nz74 :=  -3+b;
 frmMain.nz75 := -4+b;
 frmMain.nz76 := -4+b;
 frmMain.nz77 := -5+b;
 frmMain.nz78 := -5+b;
 frmMain.nz79 := -6+b;
 frmMain.nz80 := -6+b;
 frmMain.nz81 := -7+b;
 frmMain.nz82 := -7+b;
 frmMain.nz83 := -8+b;
 frmMain.nz84 := -8+b;
 frmMain.nz85 := -9+b;
 frmMain.nz86 := -9+b;
 frmMain.nz87 := -10+b;
 frmMain.nz88 := -10+b;
 frmMain.nz89 := -11+b;
 frmMain.nz90 := -2+b;

frmMain.nz94 :=1+b;
frmMain.nz95 :=1+b;  //цифры
frmMain.nz96 :=1+b;  //цифры
frmMain.nz97 :=1+b;  //цифры
frmMain.nz98 := 1+b;  //цифры
frmMain.nz99 := 1+b;  //цифры
frmMain.nz100 := 1+b;  //цифры
frmMain.nz101 := 1+b;  //цифры
frmMain.nz102 := 1+b;  //цифры
frmMain.nz103 := 1+b;  //цифры

frmMain.nz104 := -0+b;  //буквы
frmMain.nz105 := -2+b;  //буквы
frmMain.nz106 := -4+b;  //буквы
frmMain.nz107 := -6+b;  //буквы
frmMain.nz108 := -8+b;  //буквы
frmMain.nz109 := -10+b;  //буквы
frmMain.nz110 := -12+b;  //буквы
frmMain.nz111 := -14+b;  //буквы
frmMain.nz112 := -16+b;  //буквы
frmMain.nz113 := -18+b;  //буквы

frmMain.nz114 := -4+b;  //корабль
frmMain.nz115 := -18+b;  //цифры
frmMain.nz116 :=-18+b;  //цифры
frmMain.nz117 :=-18+b;  //цифры
frmMain.nz118 :=-18+b;  //цифры
frmMain.nz119 := -18+b;  //цифры
frmMain.nz120 := -18+b;  //цифры
frmMain.nz121 := -18+b;  //цифры
frmMain.nz122 := -18+b;  //цифры
frmMain.nz123 := -18+b;  //цифры
frmMain.nz124 := -18+b;  //цифры
frmMain.nz125 := -16+b;
frmMain.nz126 := -14+b;
frmMain.nz127 := -12+b;
frmMain.nz128 := -16+b;
frmMain.nz129 := -16+b;
frmMain.nz130 := -16+b;
frmMain.nz131 := -16+b;
frmMain.nz132 := -16+b;
frmMain.nz133 := -16+b;
frmMain.nz134 := -16+b;
frmMain.nz135 := -16+b;
frmMain.nz136 := -14+b;
frmMain.nz137 := -14+b;
frmMain.nz138 := -14+b;
frmMain.nz139 := -14+b;
frmMain.nz140 := -14+b;
frmMain.nz141 := -15+b;
frmMain.nz142 := -15+b;
frmMain.nz143 := -15+b;
frmMain.nz144 := -15+b;
frmMain.nz145 := -15+b;
frmMain.nz146 := -15+b;
frmMain.nz147 := -15+b;
frmMain.nz148 := -15+b;
frmMain.nz149 := -14+b;
frmMain.nz150 := -14+b;
frmMain.nz151 := -12+b;
frmMain.nz152 := -12+b;
frmMain.nz153 := -13+b;
frmMain.nz154 := -13+b;
frmMain.nz155 := -13+b;
frmMain.nz156 := -6+b;
frmMain.nz157 := -12+b;
frmMain.nz158 := -12+b;
frmMain.nz159 := -12+b;
frmMain.nz160 := -12+b;
frmMain.nz161 := -10+b;
frmMain.nz162 := -10+b;
frmMain.nz163 := -10+b;
frmMain.nz164 := -10+b;
frmMain.nz165 := -8+b;
frmMain.nz166 := -8+b;
frmMain.nz167 := -8+b;
frmMain.nz168 := -8+b;
frmMain.nz169 := -6+b;
frmMain.nz170 := -6+b;
frmMain.nz171 := -6+b;
frmMain.nz172 := -6+b;
frmMain.nz173 := -4+b;
frmMain.nz174 := -4+b;
frmMain.nz175 := -4+b;
frmMain.nz176 := -4+b;
frmMain.nz177 := -2+b;
frmMain.nz178 := -2+b;
frmMain.nz179 := -2+b;
frmMain.nz180 := -2+b;
 frmMain.nz181 := -3+b;
 frmMain.nz182 := -3+b;
 frmMain.nz183 := -3+b;
 frmMain.nz184 := -3+b;
 frmMain.nz185 := -5+b;
 frmMain.nz186 := -5+b;
 frmMain.nz187 := -5+b;
 frmMain.nz188 := -5+b;
 frmMain.nz189 := -7+b;
 frmMain.nz190 := -7+b;
 frmMain.nz191 := -7+b;
 frmMain.nz192 := -7+b;
 frmMain.nz193 := -9+b;
 frmMain.nz194 := -9+b;
 frmMain.nz195 := -9+b;
 frmMain.nz196 := -9+b;
 frmMain.nz197 := -11+b;
 frmMain.nz198 := -11+b;
 frmMain.nz199 := -11+b;
 frmMain.nz200 := -11+b;
 frmMain.nz201 := -13+b;
 frmMain.nz202 := -13+b;
 frmMain.nz203 := -13+b;
 frmMain.nz204 := -13+b;
 frmMain.nz205 := -4+b;  //корабль
 frmMain.nz206 := -8+b;  //Подлодка
 frmMain.nz215 := -12+b;
 frmMain.frmGL.Width:=800;
 b:=0;

 end;



 if (c=4) and (d=8) then
begin
StringGrid1.Cells[c,d]:='1';
a:=a+1;
b:=b+5;
frmMain.nx := 0+a;
  frmMain.nx1 := 0+a;
  frmMain.nx2 := 0+a;
 frmMain.nx3 := 0+a;
 frmMain.nx7 := -1+a;
 frmMain.nx8 := 1+a;
 frmMain.nx9 := -1+a;
  frmMain.nx10 := -2+a;
 frmMain.nx11 := -1+a;
 frmMain.nx12 := 1+a;
 frmMain.nx14 := 1+a;
 frmMain.nx15 := -1+a;
 frmMain.nx16 := -1+a;
 frmMain.nx17 := 1+a;
  frmMain.nx18 := -1+a;
 frmMain.nx19 := 1+a;
 frmMain.nx20 := -1+a;
 frmMain.nx21 := -1+a;
 frmMain.nx22 := 1+a;
  frmMain.nx23 := -1+a;
 frmMain.nx24 := 1+a;
  frmMain.nx25 := 1+a;
 frmMain.nx26 := -1+a;
 frmMain.nx27 := 1+a;
  frmMain.nx28 := -1+a;
  frmMain.nx29 := 1+a;
 frmMain.nx30 := -1+a;

// 1

 frmMain.nx31 := -2+a;
 frmMain.nx32 := 2+a;
 frmMain.nx33 := -2+a;
 frmMain.nx34 :=  2+a;
 frmMain.nx35 := -2+a;
 frmMain.nx36 := 2+a;
  frmMain.nx37 := -2+a;
 frmMain.nx38 := 2+a;
 frmMain.nx39 := -2+a;
 frmMain.nx40 := 2+a;
 frmMain.nx41 := -2+a;
 frmMain.nx42 := 2+a;
 frmMain.nx43 := -2+a;
 frmMain.nx44 := 2+a;
 frmMain.nx45 := -2+a;  //////////////


 //////////////////////

 frmMain.nx46 := -2+a;
 frmMain.nx47 := -2+a;
 frmMain.nx48 := 2+a;
 frmMain.nx49 := -2+a;
 frmMain.nx50 := 2+a;
 frmMain.nx51 := -3+a;
 frmMain.nx52 :=3+a;
 frmMain.nx53 := -3+a;
 frmMain.nx54 :=  3+a;
 frmMain.nx55 := -3+a;
 frmMain.nx56 := 3+a;
 frmMain.nx57 := -3+a;
 frmMain.nx58 := 3+a;
 frmMain.nx59 := -3+a;
 frmMain.nx60 := 3+a;
 frmMain.nx61 := -3+a;
 frmMain.nx62 := 3+a;
 frmMain.nx63 := -3+a;
 frmMain.nx64 := 3+a;
 frmMain.nx65 := -3+a;
 frmMain.nx66 := 3+a;
 frmMain.nx67 := -3+a;
 frmMain.nx68 := 3+a;
 frmMain.nx69 := -3+a;
 frmMain.nx70 := 3+a;


  ///3
 ///
 ///
 frmMain.nx71 := -4+a;
 frmMain.nx72 :=4+a;
 frmMain.nx73 := -4+a;
 frmMain.nx74 :=  4+a;
 frmMain.nx75 := -4+a;
 frmMain.nx76 := 4+a;
 frmMain.nx77 := -4+a;
 frmMain.nx78 := 4+a;
 frmMain.nx79 := -4+a;
 frmMain.nx80 := 4+a;
 frmMain.nx81 := -4+a;
 frmMain.nx82 := 4+a;
 frmMain.nx83 := -4+a;
 frmMain.nx84 := 4+a;
 frmMain.nx85 := -4+a;
 frmMain.nx86 := 4+a;
 frmMain.nx87 := -4+a;
 frmMain.nx88 := 4+a;
 frmMain.nx89 := -4+a;
 frmMain.nx90 := -2+a;

frmMain.nx94 :=0+a;
frmMain.nx95 :=-2+a;  //цифры
frmMain.nx96 :=-4+a;  //цифры
frmMain.nx97 :=-6+a;  //цифры
frmMain.nx98 := 2+a;  //цифры
frmMain.nx99 := 4+a;  //цифры
frmMain.nx100 := 6+a;  //цифры
frmMain.nx101 := 8+a;  //цифры
frmMain.nx102 := 10+a;  //цифры
frmMain.nx103 := 12+a;  //цифры

frmMain.nx104 := -8+a;  //буквы
frmMain.nx105 := -8+a;  //буквы
frmMain.nx106 := -8+a;  //буквы
frmMain.nx107 := -8+a;  //буквы
frmMain.nx108 := -8+a;  //буквы
frmMain.nx109 := -8+a;  //буквы
frmMain.nx110 := -8+a;  //буквы
frmMain.nx111 := -8+a;  //буквы
frmMain.nx112 := -8+a;  //буквы
frmMain.nx113 := -8+a;  //буквы

frmMain.nx114 := -6+a;  //корабль
frmMain.nx115 := 0+a;  //цифры
frmMain.nx116 :=-2+a;  //цифры
frmMain.nx117 :=-4+a;  //цифры
frmMain.nx118 :=-6+a;  //цифры
frmMain.nx119 := 2+a;  //цифры
frmMain.nx120 := 4+a;  //цифры
frmMain.nx121 := 6+a;  //цифры
frmMain.nx122 := 8+a;  //цифры
frmMain.nx123 := 10+a;  //цифры
frmMain.nx124 := 12+a;  //цифры
frmMain.nx125 := 0+a;
frmMain.nx126 := 0+a;
frmMain.nx127 := 0+a;
frmMain.nx128 := 2+a;
frmMain.nx129 := -2+a;
frmMain.nx130 := -4+a;
frmMain.nx131 := 4+a;
frmMain.nx132 := -6+a;
frmMain.nx133 := 6+a;
frmMain.nx134 := 8+a;
frmMain.nx135 := -8+a;
frmMain.nx136 := -2+a;
frmMain.nx137 := 2+a;
frmMain.nx138 := -4+a;
frmMain.nx139 := 4+a;
frmMain.nx140 := -2+a;
frmMain.nx141 := 2+a;
frmMain.nx142 := 0+a;
frmMain.nx143 := 2+a;
frmMain.nx144 := -2+a;
frmMain.nx145 := -4+a;
frmMain.nx146 := 4+a;
frmMain.nx147 := 6+a;
frmMain.nx148 := -6+a;
frmMain.nx149 := -6+a;
frmMain.nx150 := 6+a;
frmMain.nx151 := 2+a;
frmMain.nx152 := -2+a;
frmMain.nx153 := 2+a;
frmMain.nx154 := -2+a;
frmMain.nx155 := 0+a;
frmMain.nx156 := 0+a;
frmMain.nx157 := 4+a;
frmMain.nx158 := -4+a;
frmMain.nx159 := -6+a;
frmMain.nx160 := 6+a;
frmMain.nx161 := 4+a;
frmMain.nx162 := -4+a;
frmMain.nx163 := -6+a;
frmMain.nx164 := 6+a;
frmMain.nx165 := 4+a;
frmMain.nx166 := -4+a;
frmMain.nx167 := -6+a;
frmMain.nx168 := 6+a;
frmMain.nx169 := 4+a;
frmMain.nx170 := -4+a;
frmMain.nx171 := -6+a;
frmMain.nx172 := 6+a;
frmMain.nx173 := 4+a;
frmMain.nx174 := -4+a;
frmMain.nx175 := -6+a;
frmMain.nx176 := 6+a;
frmMain.nx177 := 4+a;
frmMain.nx178 := -4+a;
frmMain.nx179 := -6+a;
frmMain.nx180 := 6+a;
 frmMain.nx181 := 4+a;
 frmMain.nx182 := -4+a;
 frmMain.nx183 := -6+a;
 frmMain.nx184 := 6+a;
 frmMain.nx185 := 4+a;
 frmMain.nx186 := -4+a;
 frmMain.nx187 := -6+a;
 frmMain.nx188 := 6+a;
 frmMain.nx189 := -4+a;
 frmMain.nx190 := 4+a;
 frmMain.nx191 := -6+a;
 frmMain.nx192 := 6+a;
 frmMain.nx193 := -4+a;
 frmMain.nx194 := 4+a;
 frmMain.nx195 := -6+a;
 frmMain.nx196 := 6+a;
 frmMain.nx197 := -4+a;
 frmMain.nx198 := 4+a;
 frmMain.nx199 := -6+a;
 frmMain.nx200 := 6+a;
 frmMain.nx201 := -4+a;
 frmMain.nx202 := 4+a;
 frmMain.nx203 := -6+a;
 frmMain.nx204 := 6+a;
 frmMain.nx205 := 6+a;  //корабль
 frmMain.nx206 := 6+a;  //Подлодка
 frmMain.nx215 := -6+a;
 frmMain.frmGL.Width:=800;
 a:=0;
 frmMain.nz := 0+b;
  frmMain.nz1 := 0+b;
  frmMain.nz2 := 0+b;
 frmMain.nz3 := 1+b;
 frmMain.nz7 := 0+b;
 frmMain.nz8 := 2+b;
 frmMain.nz9 := 2+b;
  frmMain.nz10 := -2+b;
 frmMain.nz11 := -2+b;
 frmMain.nz12 := -2+b;
 frmMain.nz14 := -3+b;
 frmMain.nz15 := -3+b;
 frmMain.nz16 := -4+b;
 frmMain.nz17 := -4+b;
  frmMain.nz18 := -5+b;
 frmMain.nz19 := -5+b;
 frmMain.nz20 := -6+b;
 frmMain.nz21 := -7+b;
 frmMain.nz22 := -7+b;
  frmMain.nz23 := -8+b;
 frmMain.nz24 := -8+b;
  frmMain.nz25 := -9+b;
 frmMain.nz26 := -9+b;
 frmMain.nz27 := -10+b;
  frmMain.nz28 := -10+b;
  frmMain.nz29 := -11+b;
 frmMain.nz30 := -11+b;

// 1

 frmMain.nz31 := -2+b;
 frmMain.nz32 := -2+b;
 frmMain.nz33 := -3+b;
 frmMain.nz34 := -3+b;
 frmMain.nz35 := -4+b;
 frmMain.nz36 := -4+b;
  frmMain.nz37 := -5+b;
 frmMain.nz38 := -5+b;
 frmMain.nz39 := -6+b;
 frmMain.nz40 := -6+b;
 frmMain.nz41 := -7+b;
 frmMain.nz42 := -7+b;
 frmMain.nz43 := -8+b;
 frmMain.nz44 := -8+b;
 frmMain.nz45 := -9+b;  //////////////


 //////////////////////

 frmMain.nz46 := -9+b;
 frmMain.nz47 := -9+b;
 frmMain.nz48 := -10+b;
 frmMain.nz49 := -11+b;
 frmMain.nz50 := -11+b;
 frmMain.nz51 := -2+b;
 frmMain.nz52 :=-2+b;
 frmMain.nz53 := -3+b;
 frmMain.nz54 :=  3+b;
 frmMain.nz55 := -3+b;
 frmMain.nz56 := -4+b;
 frmMain.nz57 := -5+b;
 frmMain.nz58 := -5+b;
 frmMain.nz59 := -6+b;
 frmMain.nz60 := -6+b;
 frmMain.nz61 := -7+b;
 frmMain.nz62 := -7+b;
 frmMain.nz63 := -8+b;
 frmMain.nz64 := -8+b;
 frmMain.nz65 := -9+b;
 frmMain.nz66 := -9+b;
 frmMain.nz67 := -10+b;
 frmMain.nz68 := -10+b;
 frmMain.nz69 := -11+b;
 frmMain.nz70 := -11+b;


  ///3
 ///
 ///
 frmMain.nz71 := -2+b;
 frmMain.nz72 :=-2+b;
 frmMain.nz73 := -3+b;
 frmMain.nz74 :=  -3+b;
 frmMain.nz75 := -4+b;
 frmMain.nz76 := -4+b;
 frmMain.nz77 := -5+b;
 frmMain.nz78 := -5+b;
 frmMain.nz79 := -6+b;
 frmMain.nz80 := -6+b;
 frmMain.nz81 := -7+b;
 frmMain.nz82 := -7+b;
 frmMain.nz83 := -8+b;
 frmMain.nz84 := -8+b;
 frmMain.nz85 := -9+b;
 frmMain.nz86 := -9+b;
 frmMain.nz87 := -10+b;
 frmMain.nz88 := -10+b;
 frmMain.nz89 := -11+b;
 frmMain.nz90 := -2+b;

frmMain.nz94 :=1+b;
frmMain.nz95 :=1+b;  //цифры
frmMain.nz96 :=1+b;  //цифры
frmMain.nz97 :=1+b;  //цифры
frmMain.nz98 := 1+b;  //цифры
frmMain.nz99 := 1+b;  //цифры
frmMain.nz100 := 1+b;  //цифры
frmMain.nz101 := 1+b;  //цифры
frmMain.nz102 := 1+b;  //цифры
frmMain.nz103 := 1+b;  //цифры

frmMain.nz104 := -0+b;  //буквы
frmMain.nz105 := -2+b;  //буквы
frmMain.nz106 := -4+b;  //буквы
frmMain.nz107 := -6+b;  //буквы
frmMain.nz108 := -8+b;  //буквы
frmMain.nz109 := -10+b;  //буквы
frmMain.nz110 := -12+b;  //буквы
frmMain.nz111 := -14+b;  //буквы
frmMain.nz112 := -16+b;  //буквы
frmMain.nz113 := -18+b;  //буквы

frmMain.nz114 := -4+b;  //корабль
frmMain.nz115 := -18+b;  //цифры
frmMain.nz116 :=-18+b;  //цифры
frmMain.nz117 :=-18+b;  //цифры
frmMain.nz118 :=-18+b;  //цифры
frmMain.nz119 := -18+b;  //цифры
frmMain.nz120 := -18+b;  //цифры
frmMain.nz121 := -18+b;  //цифры
frmMain.nz122 := -18+b;  //цифры
frmMain.nz123 := -18+b;  //цифры
frmMain.nz124 := -18+b;  //цифры
frmMain.nz125 := -16+b;
frmMain.nz126 := -14+b;
frmMain.nz127 := -12+b;
frmMain.nz128 := -16+b;
frmMain.nz129 := -16+b;
frmMain.nz130 := -16+b;
frmMain.nz131 := -16+b;
frmMain.nz132 := -16+b;
frmMain.nz133 := -16+b;
frmMain.nz134 := -16+b;
frmMain.nz135 := -16+b;
frmMain.nz136 := -14+b;
frmMain.nz137 := -14+b;
frmMain.nz138 := -14+b;
frmMain.nz139 := -14+b;
frmMain.nz140 := -14+b;
frmMain.nz141 := -15+b;
frmMain.nz142 := -15+b;
frmMain.nz143 := -15+b;
frmMain.nz144 := -15+b;
frmMain.nz145 := -15+b;
frmMain.nz146 := -15+b;
frmMain.nz147 := -15+b;
frmMain.nz148 := -15+b;
frmMain.nz149 := -14+b;
frmMain.nz150 := -14+b;
frmMain.nz151 := -12+b;
frmMain.nz152 := -12+b;
frmMain.nz153 := -13+b;
frmMain.nz154 := -13+b;
frmMain.nz155 := -13+b;
frmMain.nz156 := -6+b;
frmMain.nz157 := -12+b;
frmMain.nz158 := -12+b;
frmMain.nz159 := -12+b;
frmMain.nz160 := -12+b;
frmMain.nz161 := -10+b;
frmMain.nz162 := -10+b;
frmMain.nz163 := -10+b;
frmMain.nz164 := -10+b;
frmMain.nz165 := -8+b;
frmMain.nz166 := -8+b;
frmMain.nz167 := -8+b;
frmMain.nz168 := -8+b;
frmMain.nz169 := -6+b;
frmMain.nz170 := -6+b;
frmMain.nz171 := -6+b;
frmMain.nz172 := -6+b;
frmMain.nz173 := -4+b;
frmMain.nz174 := -4+b;
frmMain.nz175 := -4+b;
frmMain.nz176 := -4+b;
frmMain.nz177 := -2+b;
frmMain.nz178 := -2+b;
frmMain.nz179 := -2+b;
frmMain.nz180 := -2+b;
 frmMain.nz181 := -3+b;
 frmMain.nz182 := -3+b;
 frmMain.nz183 := -3+b;
 frmMain.nz184 := -3+b;
 frmMain.nz185 := -5+b;
 frmMain.nz186 := -5+b;
 frmMain.nz187 := -5+b;
 frmMain.nz188 := -5+b;
 frmMain.nz189 := -7+b;
 frmMain.nz190 := -7+b;
 frmMain.nz191 := -7+b;
 frmMain.nz192 := -7+b;
 frmMain.nz193 := -9+b;
 frmMain.nz194 := -9+b;
 frmMain.nz195 := -9+b;
 frmMain.nz196 := -9+b;
 frmMain.nz197 := -11+b;
 frmMain.nz198 := -11+b;
 frmMain.nz199 := -11+b;
 frmMain.nz200 := -11+b;
 frmMain.nz201 := -13+b;
 frmMain.nz202 := -13+b;
 frmMain.nz203 := -13+b;
 frmMain.nz204 := -13+b;
 frmMain.nz205 := -4+b;  //корабль
 frmMain.nz206 := -8+b;  //Подлодка
 frmMain.nz215 := -12+b;
 frmMain.frmGL.Width:=800;
 b:=0;

 end;


 if (c=5) and (d=8) then
begin
StringGrid1.Cells[c,d]:='1';
a:=a-1;
b:=b+5;
frmMain.nx := 0+a;
  frmMain.nx1 := 0+a;
  frmMain.nx2 := 0+a;
 frmMain.nx3 := 0+a;
 frmMain.nx7 := -1+a;
 frmMain.nx8 := 1+a;
 frmMain.nx9 := -1+a;
  frmMain.nx10 := -2+a;
 frmMain.nx11 := -1+a;
 frmMain.nx12 := 1+a;
 frmMain.nx14 := 1+a;
 frmMain.nx15 := -1+a;
 frmMain.nx16 := -1+a;
 frmMain.nx17 := 1+a;
  frmMain.nx18 := -1+a;
 frmMain.nx19 := 1+a;
 frmMain.nx20 := -1+a;
 frmMain.nx21 := -1+a;
 frmMain.nx22 := 1+a;
  frmMain.nx23 := -1+a;
 frmMain.nx24 := 1+a;
  frmMain.nx25 := 1+a;
 frmMain.nx26 := -1+a;
 frmMain.nx27 := 1+a;
  frmMain.nx28 := -1+a;
  frmMain.nx29 := 1+a;
 frmMain.nx30 := -1+a;

// 1

 frmMain.nx31 := -2+a;
 frmMain.nx32 := 2+a;
 frmMain.nx33 := -2+a;
 frmMain.nx34 :=  2+a;
 frmMain.nx35 := -2+a;
 frmMain.nx36 := 2+a;
  frmMain.nx37 := -2+a;
 frmMain.nx38 := 2+a;
 frmMain.nx39 := -2+a;
 frmMain.nx40 := 2+a;
 frmMain.nx41 := -2+a;
 frmMain.nx42 := 2+a;
 frmMain.nx43 := -2+a;
 frmMain.nx44 := 2+a;
 frmMain.nx45 := -2+a;  //////////////


 //////////////////////

 frmMain.nx46 := -2+a;
 frmMain.nx47 := -2+a;
 frmMain.nx48 := 2+a;
 frmMain.nx49 := -2+a;
 frmMain.nx50 := 2+a;
 frmMain.nx51 := -3+a;
 frmMain.nx52 :=3+a;
 frmMain.nx53 := -3+a;
 frmMain.nx54 :=  3+a;
 frmMain.nx55 := -3+a;
 frmMain.nx56 := 3+a;
 frmMain.nx57 := -3+a;
 frmMain.nx58 := 3+a;
 frmMain.nx59 := -3+a;
 frmMain.nx60 := 3+a;
 frmMain.nx61 := -3+a;
 frmMain.nx62 := 3+a;
 frmMain.nx63 := -3+a;
 frmMain.nx64 := 3+a;
 frmMain.nx65 := -3+a;
 frmMain.nx66 := 3+a;
 frmMain.nx67 := -3+a;
 frmMain.nx68 := 3+a;
 frmMain.nx69 := -3+a;
 frmMain.nx70 := 3+a;


  ///3
 ///
 ///
 frmMain.nx71 := -4+a;
 frmMain.nx72 :=4+a;
 frmMain.nx73 := -4+a;
 frmMain.nx74 :=  4+a;
 frmMain.nx75 := -4+a;
 frmMain.nx76 := 4+a;
 frmMain.nx77 := -4+a;
 frmMain.nx78 := 4+a;
 frmMain.nx79 := -4+a;
 frmMain.nx80 := 4+a;
 frmMain.nx81 := -4+a;
 frmMain.nx82 := 4+a;
 frmMain.nx83 := -4+a;
 frmMain.nx84 := 4+a;
 frmMain.nx85 := -4+a;
 frmMain.nx86 := 4+a;
 frmMain.nx87 := -4+a;
 frmMain.nx88 := 4+a;
 frmMain.nx89 := -4+a;
 frmMain.nx90 := -2+a;

frmMain.nx94 :=0+a;
frmMain.nx95 :=-2+a;  //цифры
frmMain.nx96 :=-4+a;  //цифры
frmMain.nx97 :=-6+a;  //цифры
frmMain.nx98 := 2+a;  //цифры
frmMain.nx99 := 4+a;  //цифры
frmMain.nx100 := 6+a;  //цифры
frmMain.nx101 := 8+a;  //цифры
frmMain.nx102 := 10+a;  //цифры
frmMain.nx103 := 12+a;  //цифры

frmMain.nx104 := -8+a;  //буквы
frmMain.nx105 := -8+a;  //буквы
frmMain.nx106 := -8+a;  //буквы
frmMain.nx107 := -8+a;  //буквы
frmMain.nx108 := -8+a;  //буквы
frmMain.nx109 := -8+a;  //буквы
frmMain.nx110 := -8+a;  //буквы
frmMain.nx111 := -8+a;  //буквы
frmMain.nx112 := -8+a;  //буквы
frmMain.nx113 := -8+a;  //буквы

frmMain.nx114 := -6+a;  //корабль
frmMain.nx115 := 0+a;  //цифры
frmMain.nx116 :=-2+a;  //цифры
frmMain.nx117 :=-4+a;  //цифры
frmMain.nx118 :=-6+a;  //цифры
frmMain.nx119 := 2+a;  //цифры
frmMain.nx120 := 4+a;  //цифры
frmMain.nx121 := 6+a;  //цифры
frmMain.nx122 := 8+a;  //цифры
frmMain.nx123 := 10+a;  //цифры
frmMain.nx124 := 12+a;  //цифры
frmMain.nx125 := 0+a;
frmMain.nx126 := 0+a;
frmMain.nx127 := 0+a;
frmMain.nx128 := 2+a;
frmMain.nx129 := -2+a;
frmMain.nx130 := -4+a;
frmMain.nx131 := 4+a;
frmMain.nx132 := -6+a;
frmMain.nx133 := 6+a;
frmMain.nx134 := 8+a;
frmMain.nx135 := -8+a;
frmMain.nx136 := -2+a;
frmMain.nx137 := 2+a;
frmMain.nx138 := -4+a;
frmMain.nx139 := 4+a;
frmMain.nx140 := -2+a;
frmMain.nx141 := 2+a;
frmMain.nx142 := 0+a;
frmMain.nx143 := 2+a;
frmMain.nx144 := -2+a;
frmMain.nx145 := -4+a;
frmMain.nx146 := 4+a;
frmMain.nx147 := 6+a;
frmMain.nx148 := -6+a;
frmMain.nx149 := -6+a;
frmMain.nx150 := 6+a;
frmMain.nx151 := 2+a;
frmMain.nx152 := -2+a;
frmMain.nx153 := 2+a;
frmMain.nx154 := -2+a;
frmMain.nx155 := 0+a;
frmMain.nx156 := 0+a;
frmMain.nx157 := 4+a;
frmMain.nx158 := -4+a;
frmMain.nx159 := -6+a;
frmMain.nx160 := 6+a;
frmMain.nx161 := 4+a;
frmMain.nx162 := -4+a;
frmMain.nx163 := -6+a;
frmMain.nx164 := 6+a;
frmMain.nx165 := 4+a;
frmMain.nx166 := -4+a;
frmMain.nx167 := -6+a;
frmMain.nx168 := 6+a;
frmMain.nx169 := 4+a;
frmMain.nx170 := -4+a;
frmMain.nx171 := -6+a;
frmMain.nx172 := 6+a;
frmMain.nx173 := 4+a;
frmMain.nx174 := -4+a;
frmMain.nx175 := -6+a;
frmMain.nx176 := 6+a;
frmMain.nx177 := 4+a;
frmMain.nx178 := -4+a;
frmMain.nx179 := -6+a;
frmMain.nx180 := 6+a;
 frmMain.nx181 := 4+a;
 frmMain.nx182 := -4+a;
 frmMain.nx183 := -6+a;
 frmMain.nx184 := 6+a;
 frmMain.nx185 := 4+a;
 frmMain.nx186 := -4+a;
 frmMain.nx187 := -6+a;
 frmMain.nx188 := 6+a;
 frmMain.nx189 := -4+a;
 frmMain.nx190 := 4+a;
 frmMain.nx191 := -6+a;
 frmMain.nx192 := 6+a;
 frmMain.nx193 := -4+a;
 frmMain.nx194 := 4+a;
 frmMain.nx195 := -6+a;
 frmMain.nx196 := 6+a;
 frmMain.nx197 := -4+a;
 frmMain.nx198 := 4+a;
 frmMain.nx199 := -6+a;
 frmMain.nx200 := 6+a;
 frmMain.nx201 := -4+a;
 frmMain.nx202 := 4+a;
 frmMain.nx203 := -6+a;
 frmMain.nx204 := 6+a;
 frmMain.nx205 := 6+a;  //корабль
 frmMain.nx206 := 6+a;  //Подлодка
 frmMain.nx215 := -6+a;
 frmMain.frmGL.Width:=800;
 a:=0;
 frmMain.nz := 0+b;
  frmMain.nz1 := 0+b;
  frmMain.nz2 := 0+b;
 frmMain.nz3 := 1+b;
 frmMain.nz7 := 0+b;
 frmMain.nz8 := 2+b;
 frmMain.nz9 := 2+b;
  frmMain.nz10 := -2+b;
 frmMain.nz11 := -2+b;
 frmMain.nz12 := -2+b;
 frmMain.nz14 := -3+b;
 frmMain.nz15 := -3+b;
 frmMain.nz16 := -4+b;
 frmMain.nz17 := -4+b;
  frmMain.nz18 := -5+b;
 frmMain.nz19 := -5+b;
 frmMain.nz20 := -6+b;
 frmMain.nz21 := -7+b;
 frmMain.nz22 := -7+b;
  frmMain.nz23 := -8+b;
 frmMain.nz24 := -8+b;
  frmMain.nz25 := -9+b;
 frmMain.nz26 := -9+b;
 frmMain.nz27 := -10+b;
  frmMain.nz28 := -10+b;
  frmMain.nz29 := -11+b;
 frmMain.nz30 := -11+b;

// 1

 frmMain.nz31 := -2+b;
 frmMain.nz32 := -2+b;
 frmMain.nz33 := -3+b;
 frmMain.nz34 := -3+b;
 frmMain.nz35 := -4+b;
 frmMain.nz36 := -4+b;
  frmMain.nz37 := -5+b;
 frmMain.nz38 := -5+b;
 frmMain.nz39 := -6+b;
 frmMain.nz40 := -6+b;
 frmMain.nz41 := -7+b;
 frmMain.nz42 := -7+b;
 frmMain.nz43 := -8+b;
 frmMain.nz44 := -8+b;
 frmMain.nz45 := -9+b;  //////////////


 //////////////////////

 frmMain.nz46 := -9+b;
 frmMain.nz47 := -9+b;
 frmMain.nz48 := -10+b;
 frmMain.nz49 := -11+b;
 frmMain.nz50 := -11+b;
 frmMain.nz51 := -2+b;
 frmMain.nz52 :=-2+b;
 frmMain.nz53 := -3+b;
 frmMain.nz54 :=  3+b;
 frmMain.nz55 := -3+b;
 frmMain.nz56 := -4+b;
 frmMain.nz57 := -5+b;
 frmMain.nz58 := -5+b;
 frmMain.nz59 := -6+b;
 frmMain.nz60 := -6+b;
 frmMain.nz61 := -7+b;
 frmMain.nz62 := -7+b;
 frmMain.nz63 := -8+b;
 frmMain.nz64 := -8+b;
 frmMain.nz65 := -9+b;
 frmMain.nz66 := -9+b;
 frmMain.nz67 := -10+b;
 frmMain.nz68 := -10+b;
 frmMain.nz69 := -11+b;
 frmMain.nz70 := -11+b;


  ///3
 ///
 ///
 frmMain.nz71 := -2+b;
 frmMain.nz72 :=-2+b;
 frmMain.nz73 := -3+b;
 frmMain.nz74 :=  -3+b;
 frmMain.nz75 := -4+b;
 frmMain.nz76 := -4+b;
 frmMain.nz77 := -5+b;
 frmMain.nz78 := -5+b;
 frmMain.nz79 := -6+b;
 frmMain.nz80 := -6+b;
 frmMain.nz81 := -7+b;
 frmMain.nz82 := -7+b;
 frmMain.nz83 := -8+b;
 frmMain.nz84 := -8+b;
 frmMain.nz85 := -9+b;
 frmMain.nz86 := -9+b;
 frmMain.nz87 := -10+b;
 frmMain.nz88 := -10+b;
 frmMain.nz89 := -11+b;
 frmMain.nz90 := -2+b;

frmMain.nz94 :=1+b;
frmMain.nz95 :=1+b;  //цифры
frmMain.nz96 :=1+b;  //цифры
frmMain.nz97 :=1+b;  //цифры
frmMain.nz98 := 1+b;  //цифры
frmMain.nz99 := 1+b;  //цифры
frmMain.nz100 := 1+b;  //цифры
frmMain.nz101 := 1+b;  //цифры
frmMain.nz102 := 1+b;  //цифры
frmMain.nz103 := 1+b;  //цифры

frmMain.nz104 := -0+b;  //буквы
frmMain.nz105 := -2+b;  //буквы
frmMain.nz106 := -4+b;  //буквы
frmMain.nz107 := -6+b;  //буквы
frmMain.nz108 := -8+b;  //буквы
frmMain.nz109 := -10+b;  //буквы
frmMain.nz110 := -12+b;  //буквы
frmMain.nz111 := -14+b;  //буквы
frmMain.nz112 := -16+b;  //буквы
frmMain.nz113 := -18+b;  //буквы

frmMain.nz114 := -4+b;  //корабль
frmMain.nz115 := -18+b;  //цифры
frmMain.nz116 :=-18+b;  //цифры
frmMain.nz117 :=-18+b;  //цифры
frmMain.nz118 :=-18+b;  //цифры
frmMain.nz119 := -18+b;  //цифры
frmMain.nz120 := -18+b;  //цифры
frmMain.nz121 := -18+b;  //цифры
frmMain.nz122 := -18+b;  //цифры
frmMain.nz123 := -18+b;  //цифры
frmMain.nz124 := -18+b;  //цифры
frmMain.nz125 := -16+b;
frmMain.nz126 := -14+b;
frmMain.nz127 := -12+b;
frmMain.nz128 := -16+b;
frmMain.nz129 := -16+b;
frmMain.nz130 := -16+b;
frmMain.nz131 := -16+b;
frmMain.nz132 := -16+b;
frmMain.nz133 := -16+b;
frmMain.nz134 := -16+b;
frmMain.nz135 := -16+b;
frmMain.nz136 := -14+b;
frmMain.nz137 := -14+b;
frmMain.nz138 := -14+b;
frmMain.nz139 := -14+b;
frmMain.nz140 := -14+b;
frmMain.nz141 := -15+b;
frmMain.nz142 := -15+b;
frmMain.nz143 := -15+b;
frmMain.nz144 := -15+b;
frmMain.nz145 := -15+b;
frmMain.nz146 := -15+b;
frmMain.nz147 := -15+b;
frmMain.nz148 := -15+b;
frmMain.nz149 := -14+b;
frmMain.nz150 := -14+b;
frmMain.nz151 := -12+b;
frmMain.nz152 := -12+b;
frmMain.nz153 := -13+b;
frmMain.nz154 := -13+b;
frmMain.nz155 := -13+b;
frmMain.nz156 := -6+b;
frmMain.nz157 := -12+b;
frmMain.nz158 := -12+b;
frmMain.nz159 := -12+b;
frmMain.nz160 := -12+b;
frmMain.nz161 := -10+b;
frmMain.nz162 := -10+b;
frmMain.nz163 := -10+b;
frmMain.nz164 := -10+b;
frmMain.nz165 := -8+b;
frmMain.nz166 := -8+b;
frmMain.nz167 := -8+b;
frmMain.nz168 := -8+b;
frmMain.nz169 := -6+b;
frmMain.nz170 := -6+b;
frmMain.nz171 := -6+b;
frmMain.nz172 := -6+b;
frmMain.nz173 := -4+b;
frmMain.nz174 := -4+b;
frmMain.nz175 := -4+b;
frmMain.nz176 := -4+b;
frmMain.nz177 := -2+b;
frmMain.nz178 := -2+b;
frmMain.nz179 := -2+b;
frmMain.nz180 := -2+b;
 frmMain.nz181 := -3+b;
 frmMain.nz182 := -3+b;
 frmMain.nz183 := -3+b;
 frmMain.nz184 := -3+b;
 frmMain.nz185 := -5+b;
 frmMain.nz186 := -5+b;
 frmMain.nz187 := -5+b;
 frmMain.nz188 := -5+b;
 frmMain.nz189 := -7+b;
 frmMain.nz190 := -7+b;
 frmMain.nz191 := -7+b;
 frmMain.nz192 := -7+b;
 frmMain.nz193 := -9+b;
 frmMain.nz194 := -9+b;
 frmMain.nz195 := -9+b;
 frmMain.nz196 := -9+b;
 frmMain.nz197 := -11+b;
 frmMain.nz198 := -11+b;
 frmMain.nz199 := -11+b;
 frmMain.nz200 := -11+b;
 frmMain.nz201 := -13+b;
 frmMain.nz202 := -13+b;
 frmMain.nz203 := -13+b;
 frmMain.nz204 := -13+b;
 frmMain.nz205 := -4+b;  //корабль
 frmMain.nz206 := -8+b;  //Подлодка
 frmMain.nz215 := -12+b;
 frmMain.frmGL.Width:=800;
 b:=0;

 end;







 if (c=5) and (d=7) then
begin
StringGrid1.Cells[c,d]:='1';
a:=a-1;
b:=b+7;
frmMain.nx := 0+a;
  frmMain.nx1 := 0+a;
  frmMain.nx2 := 0+a;
 frmMain.nx3 := 0+a;
 frmMain.nx7 := -1+a;
 frmMain.nx8 := 1+a;
 frmMain.nx9 := -1+a;
  frmMain.nx10 := -2+a;
 frmMain.nx11 := -1+a;
 frmMain.nx12 := 1+a;
 frmMain.nx14 := 1+a;
 frmMain.nx15 := -1+a;
 frmMain.nx16 := -1+a;
 frmMain.nx17 := 1+a;
  frmMain.nx18 := -1+a;
 frmMain.nx19 := 1+a;
 frmMain.nx20 := -1+a;
 frmMain.nx21 := -1+a;
 frmMain.nx22 := 1+a;
  frmMain.nx23 := -1+a;
 frmMain.nx24 := 1+a;
  frmMain.nx25 := 1+a;
 frmMain.nx26 := -1+a;
 frmMain.nx27 := 1+a;
  frmMain.nx28 := -1+a;
  frmMain.nx29 := 1+a;
 frmMain.nx30 := -1+a;

// 1

 frmMain.nx31 := -2+a;
 frmMain.nx32 := 2+a;
 frmMain.nx33 := -2+a;
 frmMain.nx34 :=  2+a;
 frmMain.nx35 := -2+a;
 frmMain.nx36 := 2+a;
  frmMain.nx37 := -2+a;
 frmMain.nx38 := 2+a;
 frmMain.nx39 := -2+a;
 frmMain.nx40 := 2+a;
 frmMain.nx41 := -2+a;
 frmMain.nx42 := 2+a;
 frmMain.nx43 := -2+a;
 frmMain.nx44 := 2+a;
 frmMain.nx45 := -2+a;  //////////////


 //////////////////////

 frmMain.nx46 := -2+a;
 frmMain.nx47 := -2+a;
 frmMain.nx48 := 2+a;
 frmMain.nx49 := -2+a;
 frmMain.nx50 := 2+a;
 frmMain.nx51 := -3+a;
 frmMain.nx52 :=3+a;
 frmMain.nx53 := -3+a;
 frmMain.nx54 :=  3+a;
 frmMain.nx55 := -3+a;
 frmMain.nx56 := 3+a;
 frmMain.nx57 := -3+a;
 frmMain.nx58 := 3+a;
 frmMain.nx59 := -3+a;
 frmMain.nx60 := 3+a;
 frmMain.nx61 := -3+a;
 frmMain.nx62 := 3+a;
 frmMain.nx63 := -3+a;
 frmMain.nx64 := 3+a;
 frmMain.nx65 := -3+a;
 frmMain.nx66 := 3+a;
 frmMain.nx67 := -3+a;
 frmMain.nx68 := 3+a;
 frmMain.nx69 := -3+a;
 frmMain.nx70 := 3+a;


  ///3
 ///
 ///
 frmMain.nx71 := -4+a;
 frmMain.nx72 :=4+a;
 frmMain.nx73 := -4+a;
 frmMain.nx74 :=  4+a;
 frmMain.nx75 := -4+a;
 frmMain.nx76 := 4+a;
 frmMain.nx77 := -4+a;
 frmMain.nx78 := 4+a;
 frmMain.nx79 := -4+a;
 frmMain.nx80 := 4+a;
 frmMain.nx81 := -4+a;
 frmMain.nx82 := 4+a;
 frmMain.nx83 := -4+a;
 frmMain.nx84 := 4+a;
 frmMain.nx85 := -4+a;
 frmMain.nx86 := 4+a;
 frmMain.nx87 := -4+a;
 frmMain.nx88 := 4+a;
 frmMain.nx89 := -4+a;
 frmMain.nx90 := -2+a;

frmMain.nx94 :=0+a;
frmMain.nx95 :=-2+a;  //цифры
frmMain.nx96 :=-4+a;  //цифры
frmMain.nx97 :=-6+a;  //цифры
frmMain.nx98 := 2+a;  //цифры
frmMain.nx99 := 4+a;  //цифры
frmMain.nx100 := 6+a;  //цифры
frmMain.nx101 := 8+a;  //цифры
frmMain.nx102 := 10+a;  //цифры
frmMain.nx103 := 12+a;  //цифры

frmMain.nx104 := -8+a;  //буквы
frmMain.nx105 := -8+a;  //буквы
frmMain.nx106 := -8+a;  //буквы
frmMain.nx107 := -8+a;  //буквы
frmMain.nx108 := -8+a;  //буквы
frmMain.nx109 := -8+a;  //буквы
frmMain.nx110 := -8+a;  //буквы
frmMain.nx111 := -8+a;  //буквы
frmMain.nx112 := -8+a;  //буквы
frmMain.nx113 := -8+a;  //буквы

frmMain.nx114 := -6+a;  //корабль
frmMain.nx115 := 0+a;  //цифры
frmMain.nx116 :=-2+a;  //цифры
frmMain.nx117 :=-4+a;  //цифры
frmMain.nx118 :=-6+a;  //цифры
frmMain.nx119 := 2+a;  //цифры
frmMain.nx120 := 4+a;  //цифры
frmMain.nx121 := 6+a;  //цифры
frmMain.nx122 := 8+a;  //цифры
frmMain.nx123 := 10+a;  //цифры
frmMain.nx124 := 12+a;  //цифры
frmMain.nx125 := 0+a;
frmMain.nx126 := 0+a;
frmMain.nx127 := 0+a;
frmMain.nx128 := 2+a;
frmMain.nx129 := -2+a;
frmMain.nx130 := -4+a;
frmMain.nx131 := 4+a;
frmMain.nx132 := -6+a;
frmMain.nx133 := 6+a;
frmMain.nx134 := 8+a;
frmMain.nx135 := -8+a;
frmMain.nx136 := -2+a;
frmMain.nx137 := 2+a;
frmMain.nx138 := -4+a;
frmMain.nx139 := 4+a;
frmMain.nx140 := -2+a;
frmMain.nx141 := 2+a;
frmMain.nx142 := 0+a;
frmMain.nx143 := 2+a;
frmMain.nx144 := -2+a;
frmMain.nx145 := -4+a;
frmMain.nx146 := 4+a;
frmMain.nx147 := 6+a;
frmMain.nx148 := -6+a;
frmMain.nx149 := -6+a;
frmMain.nx150 := 6+a;
frmMain.nx151 := 2+a;
frmMain.nx152 := -2+a;
frmMain.nx153 := 2+a;
frmMain.nx154 := -2+a;
frmMain.nx155 := 0+a;
frmMain.nx156 := 0+a;
frmMain.nx157 := 4+a;
frmMain.nx158 := -4+a;
frmMain.nx159 := -6+a;
frmMain.nx160 := 6+a;
frmMain.nx161 := 4+a;
frmMain.nx162 := -4+a;
frmMain.nx163 := -6+a;
frmMain.nx164 := 6+a;
frmMain.nx165 := 4+a;
frmMain.nx166 := -4+a;
frmMain.nx167 := -6+a;
frmMain.nx168 := 6+a;
frmMain.nx169 := 4+a;
frmMain.nx170 := -4+a;
frmMain.nx171 := -6+a;
frmMain.nx172 := 6+a;
frmMain.nx173 := 4+a;
frmMain.nx174 := -4+a;
frmMain.nx175 := -6+a;
frmMain.nx176 := 6+a;
frmMain.nx177 := 4+a;
frmMain.nx178 := -4+a;
frmMain.nx179 := -6+a;
frmMain.nx180 := 6+a;
 frmMain.nx181 := 4+a;
 frmMain.nx182 := -4+a;
 frmMain.nx183 := -6+a;
 frmMain.nx184 := 6+a;
 frmMain.nx185 := 4+a;
 frmMain.nx186 := -4+a;
 frmMain.nx187 := -6+a;
 frmMain.nx188 := 6+a;
 frmMain.nx189 := -4+a;
 frmMain.nx190 := 4+a;
 frmMain.nx191 := -6+a;
 frmMain.nx192 := 6+a;
 frmMain.nx193 := -4+a;
 frmMain.nx194 := 4+a;
 frmMain.nx195 := -6+a;
 frmMain.nx196 := 6+a;
 frmMain.nx197 := -4+a;
 frmMain.nx198 := 4+a;
 frmMain.nx199 := -6+a;
 frmMain.nx200 := 6+a;
 frmMain.nx201 := -4+a;
 frmMain.nx202 := 4+a;
 frmMain.nx203 := -6+a;
 frmMain.nx204 := 6+a;
 frmMain.nx205 := 6+a;  //корабль
 frmMain.nx206 := 6+a;  //Подлодка
 frmMain.nx215 := -6+a;
 frmMain.frmGL.Width:=800;
 a:=0;
 frmMain.nz := 0+b;
  frmMain.nz1 := 0+b;
  frmMain.nz2 := 0+b;
 frmMain.nz3 := 1+b;
 frmMain.nz7 := 0+b;
 frmMain.nz8 := 2+b;
 frmMain.nz9 := 2+b;
  frmMain.nz10 := -2+b;
 frmMain.nz11 := -2+b;
 frmMain.nz12 := -2+b;
 frmMain.nz14 := -3+b;
 frmMain.nz15 := -3+b;
 frmMain.nz16 := -4+b;
 frmMain.nz17 := -4+b;
  frmMain.nz18 := -5+b;
 frmMain.nz19 := -5+b;
 frmMain.nz20 := -6+b;
 frmMain.nz21 := -7+b;
 frmMain.nz22 := -7+b;
  frmMain.nz23 := -8+b;
 frmMain.nz24 := -8+b;
  frmMain.nz25 := -9+b;
 frmMain.nz26 := -9+b;
 frmMain.nz27 := -10+b;
  frmMain.nz28 := -10+b;
  frmMain.nz29 := -11+b;
 frmMain.nz30 := -11+b;

// 1

 frmMain.nz31 := -2+b;
 frmMain.nz32 := -2+b;
 frmMain.nz33 := -3+b;
 frmMain.nz34 := -3+b;
 frmMain.nz35 := -4+b;
 frmMain.nz36 := -4+b;
  frmMain.nz37 := -5+b;
 frmMain.nz38 := -5+b;
 frmMain.nz39 := -6+b;
 frmMain.nz40 := -6+b;
 frmMain.nz41 := -7+b;
 frmMain.nz42 := -7+b;
 frmMain.nz43 := -8+b;
 frmMain.nz44 := -8+b;
 frmMain.nz45 := -9+b;  //////////////


 //////////////////////

 frmMain.nz46 := -9+b;
 frmMain.nz47 := -9+b;
 frmMain.nz48 := -10+b;
 frmMain.nz49 := -11+b;
 frmMain.nz50 := -11+b;
 frmMain.nz51 := -2+b;
 frmMain.nz52 :=-2+b;
 frmMain.nz53 := -3+b;
 frmMain.nz54 :=  3+b;
 frmMain.nz55 := -3+b;
 frmMain.nz56 := -4+b;
 frmMain.nz57 := -5+b;
 frmMain.nz58 := -5+b;
 frmMain.nz59 := -6+b;
 frmMain.nz60 := -6+b;
 frmMain.nz61 := -7+b;
 frmMain.nz62 := -7+b;
 frmMain.nz63 := -8+b;
 frmMain.nz64 := -8+b;
 frmMain.nz65 := -9+b;
 frmMain.nz66 := -9+b;
 frmMain.nz67 := -10+b;
 frmMain.nz68 := -10+b;
 frmMain.nz69 := -11+b;
 frmMain.nz70 := -11+b;


  ///3
 ///
 ///
 frmMain.nz71 := -2+b;
 frmMain.nz72 :=-2+b;
 frmMain.nz73 := -3+b;
 frmMain.nz74 :=  -3+b;
 frmMain.nz75 := -4+b;
 frmMain.nz76 := -4+b;
 frmMain.nz77 := -5+b;
 frmMain.nz78 := -5+b;
 frmMain.nz79 := -6+b;
 frmMain.nz80 := -6+b;
 frmMain.nz81 := -7+b;
 frmMain.nz82 := -7+b;
 frmMain.nz83 := -8+b;
 frmMain.nz84 := -8+b;
 frmMain.nz85 := -9+b;
 frmMain.nz86 := -9+b;
 frmMain.nz87 := -10+b;
 frmMain.nz88 := -10+b;
 frmMain.nz89 := -11+b;
 frmMain.nz90 := -2+b;

frmMain.nz94 :=1+b;
frmMain.nz95 :=1+b;  //цифры
frmMain.nz96 :=1+b;  //цифры
frmMain.nz97 :=1+b;  //цифры
frmMain.nz98 := 1+b;  //цифры
frmMain.nz99 := 1+b;  //цифры
frmMain.nz100 := 1+b;  //цифры
frmMain.nz101 := 1+b;  //цифры
frmMain.nz102 := 1+b;  //цифры
frmMain.nz103 := 1+b;  //цифры

frmMain.nz104 := -0+b;  //буквы
frmMain.nz105 := -2+b;  //буквы
frmMain.nz106 := -4+b;  //буквы
frmMain.nz107 := -6+b;  //буквы
frmMain.nz108 := -8+b;  //буквы
frmMain.nz109 := -10+b;  //буквы
frmMain.nz110 := -12+b;  //буквы
frmMain.nz111 := -14+b;  //буквы
frmMain.nz112 := -16+b;  //буквы
frmMain.nz113 := -18+b;  //буквы

frmMain.nz114 := -4+b;  //корабль
frmMain.nz115 := -18+b;  //цифры
frmMain.nz116 :=-18+b;  //цифры
frmMain.nz117 :=-18+b;  //цифры
frmMain.nz118 :=-18+b;  //цифры
frmMain.nz119 := -18+b;  //цифры
frmMain.nz120 := -18+b;  //цифры
frmMain.nz121 := -18+b;  //цифры
frmMain.nz122 := -18+b;  //цифры
frmMain.nz123 := -18+b;  //цифры
frmMain.nz124 := -18+b;  //цифры
frmMain.nz125 := -16+b;
frmMain.nz126 := -14+b;
frmMain.nz127 := -12+b;
frmMain.nz128 := -16+b;
frmMain.nz129 := -16+b;
frmMain.nz130 := -16+b;
frmMain.nz131 := -16+b;
frmMain.nz132 := -16+b;
frmMain.nz133 := -16+b;
frmMain.nz134 := -16+b;
frmMain.nz135 := -16+b;
frmMain.nz136 := -14+b;
frmMain.nz137 := -14+b;
frmMain.nz138 := -14+b;
frmMain.nz139 := -14+b;
frmMain.nz140 := -14+b;
frmMain.nz141 := -15+b;
frmMain.nz142 := -15+b;
frmMain.nz143 := -15+b;
frmMain.nz144 := -15+b;
frmMain.nz145 := -15+b;
frmMain.nz146 := -15+b;
frmMain.nz147 := -15+b;
frmMain.nz148 := -15+b;
frmMain.nz149 := -14+b;
frmMain.nz150 := -14+b;
frmMain.nz151 := -12+b;
frmMain.nz152 := -12+b;
frmMain.nz153 := -13+b;
frmMain.nz154 := -13+b;
frmMain.nz155 := -13+b;
frmMain.nz156 := -6+b;
frmMain.nz157 := -12+b;
frmMain.nz158 := -12+b;
frmMain.nz159 := -12+b;
frmMain.nz160 := -12+b;
frmMain.nz161 := -10+b;
frmMain.nz162 := -10+b;
frmMain.nz163 := -10+b;
frmMain.nz164 := -10+b;
frmMain.nz165 := -8+b;
frmMain.nz166 := -8+b;
frmMain.nz167 := -8+b;
frmMain.nz168 := -8+b;
frmMain.nz169 := -6+b;
frmMain.nz170 := -6+b;
frmMain.nz171 := -6+b;
frmMain.nz172 := -6+b;
frmMain.nz173 := -4+b;
frmMain.nz174 := -4+b;
frmMain.nz175 := -4+b;
frmMain.nz176 := -4+b;
frmMain.nz177 := -2+b;
frmMain.nz178 := -2+b;
frmMain.nz179 := -2+b;
frmMain.nz180 := -2+b;
 frmMain.nz181 := -3+b;
 frmMain.nz182 := -3+b;
 frmMain.nz183 := -3+b;
 frmMain.nz184 := -3+b;
 frmMain.nz185 := -5+b;
 frmMain.nz186 := -5+b;
 frmMain.nz187 := -5+b;
 frmMain.nz188 := -5+b;
 frmMain.nz189 := -7+b;
 frmMain.nz190 := -7+b;
 frmMain.nz191 := -7+b;
 frmMain.nz192 := -7+b;
 frmMain.nz193 := -9+b;
 frmMain.nz194 := -9+b;
 frmMain.nz195 := -9+b;
 frmMain.nz196 := -9+b;
 frmMain.nz197 := -11+b;
 frmMain.nz198 := -11+b;
 frmMain.nz199 := -11+b;
 frmMain.nz200 := -11+b;
 frmMain.nz201 := -13+b;
 frmMain.nz202 := -13+b;
 frmMain.nz203 := -13+b;
 frmMain.nz204 := -13+b;
 frmMain.nz205 := -4+b;  //корабль
 frmMain.nz206 := -8+b;  //Подлодка
 frmMain.nz215 := -12+b;
 frmMain.frmGL.Width:=800;
 b:=0;

 end;






 if (c=5) and (d=6) then
begin
StringGrid1.Cells[c,d]:='1';
a:=a-1;
b:=b+9;
frmMain.nx := 0+a;
  frmMain.nx1 := 0+a;
  frmMain.nx2 := 0+a;
 frmMain.nx3 := 0+a;
 frmMain.nx7 := -1+a;
 frmMain.nx8 := 1+a;
 frmMain.nx9 := -1+a;
  frmMain.nx10 := -2+a;
 frmMain.nx11 := -1+a;
 frmMain.nx12 := 1+a;
 frmMain.nx14 := 1+a;
 frmMain.nx15 := -1+a;
 frmMain.nx16 := -1+a;
 frmMain.nx17 := 1+a;
  frmMain.nx18 := -1+a;
 frmMain.nx19 := 1+a;
 frmMain.nx20 := -1+a;
 frmMain.nx21 := -1+a;
 frmMain.nx22 := 1+a;
  frmMain.nx23 := -1+a;
 frmMain.nx24 := 1+a;
  frmMain.nx25 := 1+a;
 frmMain.nx26 := -1+a;
 frmMain.nx27 := 1+a;
  frmMain.nx28 := -1+a;
  frmMain.nx29 := 1+a;
 frmMain.nx30 := -1+a;

// 1

 frmMain.nx31 := -2+a;
 frmMain.nx32 := 2+a;
 frmMain.nx33 := -2+a;
 frmMain.nx34 :=  2+a;
 frmMain.nx35 := -2+a;
 frmMain.nx36 := 2+a;
  frmMain.nx37 := -2+a;
 frmMain.nx38 := 2+a;
 frmMain.nx39 := -2+a;
 frmMain.nx40 := 2+a;
 frmMain.nx41 := -2+a;
 frmMain.nx42 := 2+a;
 frmMain.nx43 := -2+a;
 frmMain.nx44 := 2+a;
 frmMain.nx45 := -2+a;  //////////////


 //////////////////////

 frmMain.nx46 := -2+a;
 frmMain.nx47 := -2+a;
 frmMain.nx48 := 2+a;
 frmMain.nx49 := -2+a;
 frmMain.nx50 := 2+a;
 frmMain.nx51 := -3+a;
 frmMain.nx52 :=3+a;
 frmMain.nx53 := -3+a;
 frmMain.nx54 :=  3+a;
 frmMain.nx55 := -3+a;
 frmMain.nx56 := 3+a;
 frmMain.nx57 := -3+a;
 frmMain.nx58 := 3+a;
 frmMain.nx59 := -3+a;
 frmMain.nx60 := 3+a;
 frmMain.nx61 := -3+a;
 frmMain.nx62 := 3+a;
 frmMain.nx63 := -3+a;
 frmMain.nx64 := 3+a;
 frmMain.nx65 := -3+a;
 frmMain.nx66 := 3+a;
 frmMain.nx67 := -3+a;
 frmMain.nx68 := 3+a;
 frmMain.nx69 := -3+a;
 frmMain.nx70 := 3+a;


  ///3
 ///
 ///
 frmMain.nx71 := -4+a;
 frmMain.nx72 :=4+a;
 frmMain.nx73 := -4+a;
 frmMain.nx74 :=  4+a;
 frmMain.nx75 := -4+a;
 frmMain.nx76 := 4+a;
 frmMain.nx77 := -4+a;
 frmMain.nx78 := 4+a;
 frmMain.nx79 := -4+a;
 frmMain.nx80 := 4+a;
 frmMain.nx81 := -4+a;
 frmMain.nx82 := 4+a;
 frmMain.nx83 := -4+a;
 frmMain.nx84 := 4+a;
 frmMain.nx85 := -4+a;
 frmMain.nx86 := 4+a;
 frmMain.nx87 := -4+a;
 frmMain.nx88 := 4+a;
 frmMain.nx89 := -4+a;
 frmMain.nx90 := -2+a;

frmMain.nx94 :=0+a;
frmMain.nx95 :=-2+a;  //цифры
frmMain.nx96 :=-4+a;  //цифры
frmMain.nx97 :=-6+a;  //цифры
frmMain.nx98 := 2+a;  //цифры
frmMain.nx99 := 4+a;  //цифры
frmMain.nx100 := 6+a;  //цифры
frmMain.nx101 := 8+a;  //цифры
frmMain.nx102 := 10+a;  //цифры
frmMain.nx103 := 12+a;  //цифры

frmMain.nx104 := -8+a;  //буквы
frmMain.nx105 := -8+a;  //буквы
frmMain.nx106 := -8+a;  //буквы
frmMain.nx107 := -8+a;  //буквы
frmMain.nx108 := -8+a;  //буквы
frmMain.nx109 := -8+a;  //буквы
frmMain.nx110 := -8+a;  //буквы
frmMain.nx111 := -8+a;  //буквы
frmMain.nx112 := -8+a;  //буквы
frmMain.nx113 := -8+a;  //буквы

frmMain.nx114 := -6+a;  //корабль
frmMain.nx115 := 0+a;  //цифры
frmMain.nx116 :=-2+a;  //цифры
frmMain.nx117 :=-4+a;  //цифры
frmMain.nx118 :=-6+a;  //цифры
frmMain.nx119 := 2+a;  //цифры
frmMain.nx120 := 4+a;  //цифры
frmMain.nx121 := 6+a;  //цифры
frmMain.nx122 := 8+a;  //цифры
frmMain.nx123 := 10+a;  //цифры
frmMain.nx124 := 12+a;  //цифры
frmMain.nx125 := 0+a;
frmMain.nx126 := 0+a;
frmMain.nx127 := 0+a;
frmMain.nx128 := 2+a;
frmMain.nx129 := -2+a;
frmMain.nx130 := -4+a;
frmMain.nx131 := 4+a;
frmMain.nx132 := -6+a;
frmMain.nx133 := 6+a;
frmMain.nx134 := 8+a;
frmMain.nx135 := -8+a;
frmMain.nx136 := -2+a;
frmMain.nx137 := 2+a;
frmMain.nx138 := -4+a;
frmMain.nx139 := 4+a;
frmMain.nx140 := -2+a;
frmMain.nx141 := 2+a;
frmMain.nx142 := 0+a;
frmMain.nx143 := 2+a;
frmMain.nx144 := -2+a;
frmMain.nx145 := -4+a;
frmMain.nx146 := 4+a;
frmMain.nx147 := 6+a;
frmMain.nx148 := -6+a;
frmMain.nx149 := -6+a;
frmMain.nx150 := 6+a;
frmMain.nx151 := 2+a;
frmMain.nx152 := -2+a;
frmMain.nx153 := 2+a;
frmMain.nx154 := -2+a;
frmMain.nx155 := 0+a;
frmMain.nx156 := 0+a;
frmMain.nx157 := 4+a;
frmMain.nx158 := -4+a;
frmMain.nx159 := -6+a;
frmMain.nx160 := 6+a;
frmMain.nx161 := 4+a;
frmMain.nx162 := -4+a;
frmMain.nx163 := -6+a;
frmMain.nx164 := 6+a;
frmMain.nx165 := 4+a;
frmMain.nx166 := -4+a;
frmMain.nx167 := -6+a;
frmMain.nx168 := 6+a;
frmMain.nx169 := 4+a;
frmMain.nx170 := -4+a;
frmMain.nx171 := -6+a;
frmMain.nx172 := 6+a;
frmMain.nx173 := 4+a;
frmMain.nx174 := -4+a;
frmMain.nx175 := -6+a;
frmMain.nx176 := 6+a;
frmMain.nx177 := 4+a;
frmMain.nx178 := -4+a;
frmMain.nx179 := -6+a;
frmMain.nx180 := 6+a;
 frmMain.nx181 := 4+a;
 frmMain.nx182 := -4+a;
 frmMain.nx183 := -6+a;
 frmMain.nx184 := 6+a;
 frmMain.nx185 := 4+a;
 frmMain.nx186 := -4+a;
 frmMain.nx187 := -6+a;
 frmMain.nx188 := 6+a;
 frmMain.nx189 := -4+a;
 frmMain.nx190 := 4+a;
 frmMain.nx191 := -6+a;
 frmMain.nx192 := 6+a;
 frmMain.nx193 := -4+a;
 frmMain.nx194 := 4+a;
 frmMain.nx195 := -6+a;
 frmMain.nx196 := 6+a;
 frmMain.nx197 := -4+a;
 frmMain.nx198 := 4+a;
 frmMain.nx199 := -6+a;
 frmMain.nx200 := 6+a;
 frmMain.nx201 := -4+a;
 frmMain.nx202 := 4+a;
 frmMain.nx203 := -6+a;
 frmMain.nx204 := 6+a;
 frmMain.nx205 := 6+a;  //корабль
 frmMain.nx206 := 6+a;  //Подлодка
 frmMain.nx215 := -6+a;
 frmMain.frmGL.Width:=800;
 a:=0;
 frmMain.nz := 0+b;
  frmMain.nz1 := 0+b;
  frmMain.nz2 := 0+b;
 frmMain.nz3 := 1+b;
 frmMain.nz7 := 0+b;
 frmMain.nz8 := 2+b;
 frmMain.nz9 := 2+b;
  frmMain.nz10 := -2+b;
 frmMain.nz11 := -2+b;
 frmMain.nz12 := -2+b;
 frmMain.nz14 := -3+b;
 frmMain.nz15 := -3+b;
 frmMain.nz16 := -4+b;
 frmMain.nz17 := -4+b;
  frmMain.nz18 := -5+b;
 frmMain.nz19 := -5+b;
 frmMain.nz20 := -6+b;
 frmMain.nz21 := -7+b;
 frmMain.nz22 := -7+b;
  frmMain.nz23 := -8+b;
 frmMain.nz24 := -8+b;
  frmMain.nz25 := -9+b;
 frmMain.nz26 := -9+b;
 frmMain.nz27 := -10+b;
  frmMain.nz28 := -10+b;
  frmMain.nz29 := -11+b;
 frmMain.nz30 := -11+b;

// 1

 frmMain.nz31 := -2+b;
 frmMain.nz32 := -2+b;
 frmMain.nz33 := -3+b;
 frmMain.nz34 := -3+b;
 frmMain.nz35 := -4+b;
 frmMain.nz36 := -4+b;
  frmMain.nz37 := -5+b;
 frmMain.nz38 := -5+b;
 frmMain.nz39 := -6+b;
 frmMain.nz40 := -6+b;
 frmMain.nz41 := -7+b;
 frmMain.nz42 := -7+b;
 frmMain.nz43 := -8+b;
 frmMain.nz44 := -8+b;
 frmMain.nz45 := -9+b;  //////////////


 //////////////////////

 frmMain.nz46 := -9+b;
 frmMain.nz47 := -9+b;
 frmMain.nz48 := -10+b;
 frmMain.nz49 := -11+b;
 frmMain.nz50 := -11+b;
 frmMain.nz51 := -2+b;
 frmMain.nz52 :=-2+b;
 frmMain.nz53 := -3+b;
 frmMain.nz54 :=  3+b;
 frmMain.nz55 := -3+b;
 frmMain.nz56 := -4+b;
 frmMain.nz57 := -5+b;
 frmMain.nz58 := -5+b;
 frmMain.nz59 := -6+b;
 frmMain.nz60 := -6+b;
 frmMain.nz61 := -7+b;
 frmMain.nz62 := -7+b;
 frmMain.nz63 := -8+b;
 frmMain.nz64 := -8+b;
 frmMain.nz65 := -9+b;
 frmMain.nz66 := -9+b;
 frmMain.nz67 := -10+b;
 frmMain.nz68 := -10+b;
 frmMain.nz69 := -11+b;
 frmMain.nz70 := -11+b;


  ///3
 ///
 ///
 frmMain.nz71 := -2+b;
 frmMain.nz72 :=-2+b;
 frmMain.nz73 := -3+b;
 frmMain.nz74 :=  -3+b;
 frmMain.nz75 := -4+b;
 frmMain.nz76 := -4+b;
 frmMain.nz77 := -5+b;
 frmMain.nz78 := -5+b;
 frmMain.nz79 := -6+b;
 frmMain.nz80 := -6+b;
 frmMain.nz81 := -7+b;
 frmMain.nz82 := -7+b;
 frmMain.nz83 := -8+b;
 frmMain.nz84 := -8+b;
 frmMain.nz85 := -9+b;
 frmMain.nz86 := -9+b;
 frmMain.nz87 := -10+b;
 frmMain.nz88 := -10+b;
 frmMain.nz89 := -11+b;
 frmMain.nz90 := -2+b;

frmMain.nz94 :=1+b;
frmMain.nz95 :=1+b;  //цифры
frmMain.nz96 :=1+b;  //цифры
frmMain.nz97 :=1+b;  //цифры
frmMain.nz98 := 1+b;  //цифры
frmMain.nz99 := 1+b;  //цифры
frmMain.nz100 := 1+b;  //цифры
frmMain.nz101 := 1+b;  //цифры
frmMain.nz102 := 1+b;  //цифры
frmMain.nz103 := 1+b;  //цифры

frmMain.nz104 := -0+b;  //буквы
frmMain.nz105 := -2+b;  //буквы
frmMain.nz106 := -4+b;  //буквы
frmMain.nz107 := -6+b;  //буквы
frmMain.nz108 := -8+b;  //буквы
frmMain.nz109 := -10+b;  //буквы
frmMain.nz110 := -12+b;  //буквы
frmMain.nz111 := -14+b;  //буквы
frmMain.nz112 := -16+b;  //буквы
frmMain.nz113 := -18+b;  //буквы

frmMain.nz114 := -4+b;  //корабль
frmMain.nz115 := -18+b;  //цифры
frmMain.nz116 :=-18+b;  //цифры
frmMain.nz117 :=-18+b;  //цифры
frmMain.nz118 :=-18+b;  //цифры
frmMain.nz119 := -18+b;  //цифры
frmMain.nz120 := -18+b;  //цифры
frmMain.nz121 := -18+b;  //цифры
frmMain.nz122 := -18+b;  //цифры
frmMain.nz123 := -18+b;  //цифры
frmMain.nz124 := -18+b;  //цифры
frmMain.nz125 := -16+b;
frmMain.nz126 := -14+b;
frmMain.nz127 := -12+b;
frmMain.nz128 := -16+b;
frmMain.nz129 := -16+b;
frmMain.nz130 := -16+b;
frmMain.nz131 := -16+b;
frmMain.nz132 := -16+b;
frmMain.nz133 := -16+b;
frmMain.nz134 := -16+b;
frmMain.nz135 := -16+b;
frmMain.nz136 := -14+b;
frmMain.nz137 := -14+b;
frmMain.nz138 := -14+b;
frmMain.nz139 := -14+b;
frmMain.nz140 := -14+b;
frmMain.nz141 := -15+b;
frmMain.nz142 := -15+b;
frmMain.nz143 := -15+b;
frmMain.nz144 := -15+b;
frmMain.nz145 := -15+b;
frmMain.nz146 := -15+b;
frmMain.nz147 := -15+b;
frmMain.nz148 := -15+b;
frmMain.nz149 := -14+b;
frmMain.nz150 := -14+b;
frmMain.nz151 := -12+b;
frmMain.nz152 := -12+b;
frmMain.nz153 := -13+b;
frmMain.nz154 := -13+b;
frmMain.nz155 := -13+b;
frmMain.nz156 := -6+b;
frmMain.nz157 := -12+b;
frmMain.nz158 := -12+b;
frmMain.nz159 := -12+b;
frmMain.nz160 := -12+b;
frmMain.nz161 := -10+b;
frmMain.nz162 := -10+b;
frmMain.nz163 := -10+b;
frmMain.nz164 := -10+b;
frmMain.nz165 := -8+b;
frmMain.nz166 := -8+b;
frmMain.nz167 := -8+b;
frmMain.nz168 := -8+b;
frmMain.nz169 := -6+b;
frmMain.nz170 := -6+b;
frmMain.nz171 := -6+b;
frmMain.nz172 := -6+b;
frmMain.nz173 := -4+b;
frmMain.nz174 := -4+b;
frmMain.nz175 := -4+b;
frmMain.nz176 := -4+b;
frmMain.nz177 := -2+b;
frmMain.nz178 := -2+b;
frmMain.nz179 := -2+b;
frmMain.nz180 := -2+b;
 frmMain.nz181 := -3+b;
 frmMain.nz182 := -3+b;
 frmMain.nz183 := -3+b;
 frmMain.nz184 := -3+b;
 frmMain.nz185 := -5+b;
 frmMain.nz186 := -5+b;
 frmMain.nz187 := -5+b;
 frmMain.nz188 := -5+b;
 frmMain.nz189 := -7+b;
 frmMain.nz190 := -7+b;
 frmMain.nz191 := -7+b;
 frmMain.nz192 := -7+b;
 frmMain.nz193 := -9+b;
 frmMain.nz194 := -9+b;
 frmMain.nz195 := -9+b;
 frmMain.nz196 := -9+b;
 frmMain.nz197 := -11+b;
 frmMain.nz198 := -11+b;
 frmMain.nz199 := -11+b;
 frmMain.nz200 := -11+b;
 frmMain.nz201 := -13+b;
 frmMain.nz202 := -13+b;
 frmMain.nz203 := -13+b;
 frmMain.nz204 := -13+b;
 frmMain.nz205 := -4+b;  //корабль
 frmMain.nz206 := -8+b;  //Подлодка
 frmMain.nz215 := -12+b;
 frmMain.frmGL.Width:=800;
 b:=0;

 end;





 if (c=5) and (d=5) then
begin
StringGrid1.Cells[c,d]:='1';
a:=a-1;
b:=b+11;
frmMain.nx := 0+a;
  frmMain.nx1 := 0+a;
  frmMain.nx2 := 0+a;
 frmMain.nx3 := 0+a;
 frmMain.nx7 := -1+a;
 frmMain.nx8 := 1+a;
 frmMain.nx9 := -1+a;
  frmMain.nx10 := -2+a;
 frmMain.nx11 := -1+a;
 frmMain.nx12 := 1+a;
 frmMain.nx14 := 1+a;
 frmMain.nx15 := -1+a;
 frmMain.nx16 := -1+a;
 frmMain.nx17 := 1+a;
  frmMain.nx18 := -1+a;
 frmMain.nx19 := 1+a;
 frmMain.nx20 := -1+a;
 frmMain.nx21 := -1+a;
 frmMain.nx22 := 1+a;
  frmMain.nx23 := -1+a;
 frmMain.nx24 := 1+a;
  frmMain.nx25 := 1+a;
 frmMain.nx26 := -1+a;
 frmMain.nx27 := 1+a;
  frmMain.nx28 := -1+a;
  frmMain.nx29 := 1+a;
 frmMain.nx30 := -1+a;

// 1

 frmMain.nx31 := -2+a;
 frmMain.nx32 := 2+a;
 frmMain.nx33 := -2+a;
 frmMain.nx34 :=  2+a;
 frmMain.nx35 := -2+a;
 frmMain.nx36 := 2+a;
  frmMain.nx37 := -2+a;
 frmMain.nx38 := 2+a;
 frmMain.nx39 := -2+a;
 frmMain.nx40 := 2+a;
 frmMain.nx41 := -2+a;
 frmMain.nx42 := 2+a;
 frmMain.nx43 := -2+a;
 frmMain.nx44 := 2+a;
 frmMain.nx45 := -2+a;  //////////////


 //////////////////////

 frmMain.nx46 := -2+a;
 frmMain.nx47 := -2+a;
 frmMain.nx48 := 2+a;
 frmMain.nx49 := -2+a;
 frmMain.nx50 := 2+a;
 frmMain.nx51 := -3+a;
 frmMain.nx52 :=3+a;
 frmMain.nx53 := -3+a;
 frmMain.nx54 :=  3+a;
 frmMain.nx55 := -3+a;
 frmMain.nx56 := 3+a;
 frmMain.nx57 := -3+a;
 frmMain.nx58 := 3+a;
 frmMain.nx59 := -3+a;
 frmMain.nx60 := 3+a;
 frmMain.nx61 := -3+a;
 frmMain.nx62 := 3+a;
 frmMain.nx63 := -3+a;
 frmMain.nx64 := 3+a;
 frmMain.nx65 := -3+a;
 frmMain.nx66 := 3+a;
 frmMain.nx67 := -3+a;
 frmMain.nx68 := 3+a;
 frmMain.nx69 := -3+a;
 frmMain.nx70 := 3+a;


  ///3
 ///
 ///
 frmMain.nx71 := -4+a;
 frmMain.nx72 :=4+a;
 frmMain.nx73 := -4+a;
 frmMain.nx74 :=  4+a;
 frmMain.nx75 := -4+a;
 frmMain.nx76 := 4+a;
 frmMain.nx77 := -4+a;
 frmMain.nx78 := 4+a;
 frmMain.nx79 := -4+a;
 frmMain.nx80 := 4+a;
 frmMain.nx81 := -4+a;
 frmMain.nx82 := 4+a;
 frmMain.nx83 := -4+a;
 frmMain.nx84 := 4+a;
 frmMain.nx85 := -4+a;
 frmMain.nx86 := 4+a;
 frmMain.nx87 := -4+a;
 frmMain.nx88 := 4+a;
 frmMain.nx89 := -4+a;
 frmMain.nx90 := -2+a;

frmMain.nx94 :=0+a;
frmMain.nx95 :=-2+a;  //цифры
frmMain.nx96 :=-4+a;  //цифры
frmMain.nx97 :=-6+a;  //цифры
frmMain.nx98 := 2+a;  //цифры
frmMain.nx99 := 4+a;  //цифры
frmMain.nx100 := 6+a;  //цифры
frmMain.nx101 := 8+a;  //цифры
frmMain.nx102 := 10+a;  //цифры
frmMain.nx103 := 12+a;  //цифры

frmMain.nx104 := -8+a;  //буквы
frmMain.nx105 := -8+a;  //буквы
frmMain.nx106 := -8+a;  //буквы
frmMain.nx107 := -8+a;  //буквы
frmMain.nx108 := -8+a;  //буквы
frmMain.nx109 := -8+a;  //буквы
frmMain.nx110 := -8+a;  //буквы
frmMain.nx111 := -8+a;  //буквы
frmMain.nx112 := -8+a;  //буквы
frmMain.nx113 := -8+a;  //буквы

frmMain.nx114 := -6+a;  //корабль
frmMain.nx115 := 0+a;  //цифры
frmMain.nx116 :=-2+a;  //цифры
frmMain.nx117 :=-4+a;  //цифры
frmMain.nx118 :=-6+a;  //цифры
frmMain.nx119 := 2+a;  //цифры
frmMain.nx120 := 4+a;  //цифры
frmMain.nx121 := 6+a;  //цифры
frmMain.nx122 := 8+a;  //цифры
frmMain.nx123 := 10+a;  //цифры
frmMain.nx124 := 12+a;  //цифры
frmMain.nx125 := 0+a;
frmMain.nx126 := 0+a;
frmMain.nx127 := 0+a;
frmMain.nx128 := 2+a;
frmMain.nx129 := -2+a;
frmMain.nx130 := -4+a;
frmMain.nx131 := 4+a;
frmMain.nx132 := -6+a;
frmMain.nx133 := 6+a;
frmMain.nx134 := 8+a;
frmMain.nx135 := -8+a;
frmMain.nx136 := -2+a;
frmMain.nx137 := 2+a;
frmMain.nx138 := -4+a;
frmMain.nx139 := 4+a;
frmMain.nx140 := -2+a;
frmMain.nx141 := 2+a;
frmMain.nx142 := 0+a;
frmMain.nx143 := 2+a;
frmMain.nx144 := -2+a;
frmMain.nx145 := -4+a;
frmMain.nx146 := 4+a;
frmMain.nx147 := 6+a;
frmMain.nx148 := -6+a;
frmMain.nx149 := -6+a;
frmMain.nx150 := 6+a;
frmMain.nx151 := 2+a;
frmMain.nx152 := -2+a;
frmMain.nx153 := 2+a;
frmMain.nx154 := -2+a;
frmMain.nx155 := 0+a;
frmMain.nx156 := 0+a;
frmMain.nx157 := 4+a;
frmMain.nx158 := -4+a;
frmMain.nx159 := -6+a;
frmMain.nx160 := 6+a;
frmMain.nx161 := 4+a;
frmMain.nx162 := -4+a;
frmMain.nx163 := -6+a;
frmMain.nx164 := 6+a;
frmMain.nx165 := 4+a;
frmMain.nx166 := -4+a;
frmMain.nx167 := -6+a;
frmMain.nx168 := 6+a;
frmMain.nx169 := 4+a;
frmMain.nx170 := -4+a;
frmMain.nx171 := -6+a;
frmMain.nx172 := 6+a;
frmMain.nx173 := 4+a;
frmMain.nx174 := -4+a;
frmMain.nx175 := -6+a;
frmMain.nx176 := 6+a;
frmMain.nx177 := 4+a;
frmMain.nx178 := -4+a;
frmMain.nx179 := -6+a;
frmMain.nx180 := 6+a;
 frmMain.nx181 := 4+a;
 frmMain.nx182 := -4+a;
 frmMain.nx183 := -6+a;
 frmMain.nx184 := 6+a;
 frmMain.nx185 := 4+a;
 frmMain.nx186 := -4+a;
 frmMain.nx187 := -6+a;
 frmMain.nx188 := 6+a;
 frmMain.nx189 := -4+a;
 frmMain.nx190 := 4+a;
 frmMain.nx191 := -6+a;
 frmMain.nx192 := 6+a;
 frmMain.nx193 := -4+a;
 frmMain.nx194 := 4+a;
 frmMain.nx195 := -6+a;
 frmMain.nx196 := 6+a;
 frmMain.nx197 := -4+a;
 frmMain.nx198 := 4+a;
 frmMain.nx199 := -6+a;
 frmMain.nx200 := 6+a;
 frmMain.nx201 := -4+a;
 frmMain.nx202 := 4+a;
 frmMain.nx203 := -6+a;
 frmMain.nx204 := 6+a;
 frmMain.nx205 := 6+a;  //корабль
 frmMain.nx206 := 6+a;  //Подлодка
 frmMain.nx215 := -6+a;
 frmMain.frmGL.Width:=800;
 a:=0;
 frmMain.nz := 0+b;
  frmMain.nz1 := 0+b;
  frmMain.nz2 := 0+b;
 frmMain.nz3 := 1+b;
 frmMain.nz7 := 0+b;
 frmMain.nz8 := 2+b;
 frmMain.nz9 := 2+b;
  frmMain.nz10 := -2+b;
 frmMain.nz11 := -2+b;
 frmMain.nz12 := -2+b;
 frmMain.nz14 := -3+b;
 frmMain.nz15 := -3+b;
 frmMain.nz16 := -4+b;
 frmMain.nz17 := -4+b;
  frmMain.nz18 := -5+b;
 frmMain.nz19 := -5+b;
 frmMain.nz20 := -6+b;
 frmMain.nz21 := -7+b;
 frmMain.nz22 := -7+b;
  frmMain.nz23 := -8+b;
 frmMain.nz24 := -8+b;
  frmMain.nz25 := -9+b;
 frmMain.nz26 := -9+b;
 frmMain.nz27 := -10+b;
  frmMain.nz28 := -10+b;
  frmMain.nz29 := -11+b;
 frmMain.nz30 := -11+b;

// 1

 frmMain.nz31 := -2+b;
 frmMain.nz32 := -2+b;
 frmMain.nz33 := -3+b;
 frmMain.nz34 := -3+b;
 frmMain.nz35 := -4+b;
 frmMain.nz36 := -4+b;
  frmMain.nz37 := -5+b;
 frmMain.nz38 := -5+b;
 frmMain.nz39 := -6+b;
 frmMain.nz40 := -6+b;
 frmMain.nz41 := -7+b;
 frmMain.nz42 := -7+b;
 frmMain.nz43 := -8+b;
 frmMain.nz44 := -8+b;
 frmMain.nz45 := -9+b;  //////////////


 //////////////////////

 frmMain.nz46 := -9+b;
 frmMain.nz47 := -9+b;
 frmMain.nz48 := -10+b;
 frmMain.nz49 := -11+b;
 frmMain.nz50 := -11+b;
 frmMain.nz51 := -2+b;
 frmMain.nz52 :=-2+b;
 frmMain.nz53 := -3+b;
 frmMain.nz54 :=  3+b;
 frmMain.nz55 := -3+b;
 frmMain.nz56 := -4+b;
 frmMain.nz57 := -5+b;
 frmMain.nz58 := -5+b;
 frmMain.nz59 := -6+b;
 frmMain.nz60 := -6+b;
 frmMain.nz61 := -7+b;
 frmMain.nz62 := -7+b;
 frmMain.nz63 := -8+b;
 frmMain.nz64 := -8+b;
 frmMain.nz65 := -9+b;
 frmMain.nz66 := -9+b;
 frmMain.nz67 := -10+b;
 frmMain.nz68 := -10+b;
 frmMain.nz69 := -11+b;
 frmMain.nz70 := -11+b;


  ///3
 ///
 ///
 frmMain.nz71 := -2+b;
 frmMain.nz72 :=-2+b;
 frmMain.nz73 := -3+b;
 frmMain.nz74 :=  -3+b;
 frmMain.nz75 := -4+b;
 frmMain.nz76 := -4+b;
 frmMain.nz77 := -5+b;
 frmMain.nz78 := -5+b;
 frmMain.nz79 := -6+b;
 frmMain.nz80 := -6+b;
 frmMain.nz81 := -7+b;
 frmMain.nz82 := -7+b;
 frmMain.nz83 := -8+b;
 frmMain.nz84 := -8+b;
 frmMain.nz85 := -9+b;
 frmMain.nz86 := -9+b;
 frmMain.nz87 := -10+b;
 frmMain.nz88 := -10+b;
 frmMain.nz89 := -11+b;
 frmMain.nz90 := -2+b;

frmMain.nz94 :=1+b;
frmMain.nz95 :=1+b;  //цифры
frmMain.nz96 :=1+b;  //цифры
frmMain.nz97 :=1+b;  //цифры
frmMain.nz98 := 1+b;  //цифры
frmMain.nz99 := 1+b;  //цифры
frmMain.nz100 := 1+b;  //цифры
frmMain.nz101 := 1+b;  //цифры
frmMain.nz102 := 1+b;  //цифры
frmMain.nz103 := 1+b;  //цифры

frmMain.nz104 := -0+b;  //буквы
frmMain.nz105 := -2+b;  //буквы
frmMain.nz106 := -4+b;  //буквы
frmMain.nz107 := -6+b;  //буквы
frmMain.nz108 := -8+b;  //буквы
frmMain.nz109 := -10+b;  //буквы
frmMain.nz110 := -12+b;  //буквы
frmMain.nz111 := -14+b;  //буквы
frmMain.nz112 := -16+b;  //буквы
frmMain.nz113 := -18+b;  //буквы

frmMain.nz114 := -4+b;  //корабль
frmMain.nz115 := -18+b;  //цифры
frmMain.nz116 :=-18+b;  //цифры
frmMain.nz117 :=-18+b;  //цифры
frmMain.nz118 :=-18+b;  //цифры
frmMain.nz119 := -18+b;  //цифры
frmMain.nz120 := -18+b;  //цифры
frmMain.nz121 := -18+b;  //цифры
frmMain.nz122 := -18+b;  //цифры
frmMain.nz123 := -18+b;  //цифры
frmMain.nz124 := -18+b;  //цифры
frmMain.nz125 := -16+b;
frmMain.nz126 := -14+b;
frmMain.nz127 := -12+b;
frmMain.nz128 := -16+b;
frmMain.nz129 := -16+b;
frmMain.nz130 := -16+b;
frmMain.nz131 := -16+b;
frmMain.nz132 := -16+b;
frmMain.nz133 := -16+b;
frmMain.nz134 := -16+b;
frmMain.nz135 := -16+b;
frmMain.nz136 := -14+b;
frmMain.nz137 := -14+b;
frmMain.nz138 := -14+b;
frmMain.nz139 := -14+b;
frmMain.nz140 := -14+b;
frmMain.nz141 := -15+b;
frmMain.nz142 := -15+b;
frmMain.nz143 := -15+b;
frmMain.nz144 := -15+b;
frmMain.nz145 := -15+b;
frmMain.nz146 := -15+b;
frmMain.nz147 := -15+b;
frmMain.nz148 := -15+b;
frmMain.nz149 := -14+b;
frmMain.nz150 := -14+b;
frmMain.nz151 := -12+b;
frmMain.nz152 := -12+b;
frmMain.nz153 := -13+b;
frmMain.nz154 := -13+b;
frmMain.nz155 := -13+b;
frmMain.nz156 := -6+b;
frmMain.nz157 := -12+b;
frmMain.nz158 := -12+b;
frmMain.nz159 := -12+b;
frmMain.nz160 := -12+b;
frmMain.nz161 := -10+b;
frmMain.nz162 := -10+b;
frmMain.nz163 := -10+b;
frmMain.nz164 := -10+b;
frmMain.nz165 := -8+b;
frmMain.nz166 := -8+b;
frmMain.nz167 := -8+b;
frmMain.nz168 := -8+b;
frmMain.nz169 := -6+b;
frmMain.nz170 := -6+b;
frmMain.nz171 := -6+b;
frmMain.nz172 := -6+b;
frmMain.nz173 := -4+b;
frmMain.nz174 := -4+b;
frmMain.nz175 := -4+b;
frmMain.nz176 := -4+b;
frmMain.nz177 := -2+b;
frmMain.nz178 := -2+b;
frmMain.nz179 := -2+b;
frmMain.nz180 := -2+b;
 frmMain.nz181 := -3+b;
 frmMain.nz182 := -3+b;
 frmMain.nz183 := -3+b;
 frmMain.nz184 := -3+b;
 frmMain.nz185 := -5+b;
 frmMain.nz186 := -5+b;
 frmMain.nz187 := -5+b;
 frmMain.nz188 := -5+b;
 frmMain.nz189 := -7+b;
 frmMain.nz190 := -7+b;
 frmMain.nz191 := -7+b;
 frmMain.nz192 := -7+b;
 frmMain.nz193 := -9+b;
 frmMain.nz194 := -9+b;
 frmMain.nz195 := -9+b;
 frmMain.nz196 := -9+b;
 frmMain.nz197 := -11+b;
 frmMain.nz198 := -11+b;
 frmMain.nz199 := -11+b;
 frmMain.nz200 := -11+b;
 frmMain.nz201 := -13+b;
 frmMain.nz202 := -13+b;
 frmMain.nz203 := -13+b;
 frmMain.nz204 := -13+b;
 frmMain.nz205 := -4+b;  //корабль
 frmMain.nz206 := -8+b;  //Подлодка
 frmMain.nz215 := -12+b;
 frmMain.frmGL.Width:=800;
 b:=0;

 end;


 if (c=5) and (d=4) then
begin
StringGrid1.Cells[c,d]:='1';
a:=a-1;
b:=b+13;
frmMain.nx := 0+a;
  frmMain.nx1 := 0+a;
  frmMain.nx2 := 0+a;
 frmMain.nx3 := 0+a;
 frmMain.nx7 := -1+a;
 frmMain.nx8 := 1+a;
 frmMain.nx9 := -1+a;
  frmMain.nx10 := -2+a;
 frmMain.nx11 := -1+a;
 frmMain.nx12 := 1+a;
 frmMain.nx14 := 1+a;
 frmMain.nx15 := -1+a;
 frmMain.nx16 := -1+a;
 frmMain.nx17 := 1+a;
  frmMain.nx18 := -1+a;
 frmMain.nx19 := 1+a;
 frmMain.nx20 := -1+a;
 frmMain.nx21 := -1+a;
 frmMain.nx22 := 1+a;
  frmMain.nx23 := -1+a;
 frmMain.nx24 := 1+a;
  frmMain.nx25 := 1+a;
 frmMain.nx26 := -1+a;
 frmMain.nx27 := 1+a;
  frmMain.nx28 := -1+a;
  frmMain.nx29 := 1+a;
 frmMain.nx30 := -1+a;

// 1

 frmMain.nx31 := -2+a;
 frmMain.nx32 := 2+a;
 frmMain.nx33 := -2+a;
 frmMain.nx34 :=  2+a;
 frmMain.nx35 := -2+a;
 frmMain.nx36 := 2+a;
  frmMain.nx37 := -2+a;
 frmMain.nx38 := 2+a;
 frmMain.nx39 := -2+a;
 frmMain.nx40 := 2+a;
 frmMain.nx41 := -2+a;
 frmMain.nx42 := 2+a;
 frmMain.nx43 := -2+a;
 frmMain.nx44 := 2+a;
 frmMain.nx45 := -2+a;  //////////////


 //////////////////////

 frmMain.nx46 := -2+a;
 frmMain.nx47 := -2+a;
 frmMain.nx48 := 2+a;
 frmMain.nx49 := -2+a;
 frmMain.nx50 := 2+a;
 frmMain.nx51 := -3+a;
 frmMain.nx52 :=3+a;
 frmMain.nx53 := -3+a;
 frmMain.nx54 :=  3+a;
 frmMain.nx55 := -3+a;
 frmMain.nx56 := 3+a;
 frmMain.nx57 := -3+a;
 frmMain.nx58 := 3+a;
 frmMain.nx59 := -3+a;
 frmMain.nx60 := 3+a;
 frmMain.nx61 := -3+a;
 frmMain.nx62 := 3+a;
 frmMain.nx63 := -3+a;
 frmMain.nx64 := 3+a;
 frmMain.nx65 := -3+a;
 frmMain.nx66 := 3+a;
 frmMain.nx67 := -3+a;
 frmMain.nx68 := 3+a;
 frmMain.nx69 := -3+a;
 frmMain.nx70 := 3+a;


  ///3
 ///
 ///
 frmMain.nx71 := -4+a;
 frmMain.nx72 :=4+a;
 frmMain.nx73 := -4+a;
 frmMain.nx74 :=  4+a;
 frmMain.nx75 := -4+a;
 frmMain.nx76 := 4+a;
 frmMain.nx77 := -4+a;
 frmMain.nx78 := 4+a;
 frmMain.nx79 := -4+a;
 frmMain.nx80 := 4+a;
 frmMain.nx81 := -4+a;
 frmMain.nx82 := 4+a;
 frmMain.nx83 := -4+a;
 frmMain.nx84 := 4+a;
 frmMain.nx85 := -4+a;
 frmMain.nx86 := 4+a;
 frmMain.nx87 := -4+a;
 frmMain.nx88 := 4+a;
 frmMain.nx89 := -4+a;
 frmMain.nx90 := -2+a;

frmMain.nx94 :=0+a;
frmMain.nx95 :=-2+a;  //цифры
frmMain.nx96 :=-4+a;  //цифры
frmMain.nx97 :=-6+a;  //цифры
frmMain.nx98 := 2+a;  //цифры
frmMain.nx99 := 4+a;  //цифры
frmMain.nx100 := 6+a;  //цифры
frmMain.nx101 := 8+a;  //цифры
frmMain.nx102 := 10+a;  //цифры
frmMain.nx103 := 12+a;  //цифры

frmMain.nx104 := -8+a;  //буквы
frmMain.nx105 := -8+a;  //буквы
frmMain.nx106 := -8+a;  //буквы
frmMain.nx107 := -8+a;  //буквы
frmMain.nx108 := -8+a;  //буквы
frmMain.nx109 := -8+a;  //буквы
frmMain.nx110 := -8+a;  //буквы
frmMain.nx111 := -8+a;  //буквы
frmMain.nx112 := -8+a;  //буквы
frmMain.nx113 := -8+a;  //буквы

frmMain.nx114 := -6+a;  //корабль
frmMain.nx115 := 0+a;  //цифры
frmMain.nx116 :=-2+a;  //цифры
frmMain.nx117 :=-4+a;  //цифры
frmMain.nx118 :=-6+a;  //цифры
frmMain.nx119 := 2+a;  //цифры
frmMain.nx120 := 4+a;  //цифры
frmMain.nx121 := 6+a;  //цифры
frmMain.nx122 := 8+a;  //цифры
frmMain.nx123 := 10+a;  //цифры
frmMain.nx124 := 12+a;  //цифры
frmMain.nx125 := 0+a;
frmMain.nx126 := 0+a;
frmMain.nx127 := 0+a;
frmMain.nx128 := 2+a;
frmMain.nx129 := -2+a;
frmMain.nx130 := -4+a;
frmMain.nx131 := 4+a;
frmMain.nx132 := -6+a;
frmMain.nx133 := 6+a;
frmMain.nx134 := 8+a;
frmMain.nx135 := -8+a;
frmMain.nx136 := -2+a;
frmMain.nx137 := 2+a;
frmMain.nx138 := -4+a;
frmMain.nx139 := 4+a;
frmMain.nx140 := -2+a;
frmMain.nx141 := 2+a;
frmMain.nx142 := 0+a;
frmMain.nx143 := 2+a;
frmMain.nx144 := -2+a;
frmMain.nx145 := -4+a;
frmMain.nx146 := 4+a;
frmMain.nx147 := 6+a;
frmMain.nx148 := -6+a;
frmMain.nx149 := -6+a;
frmMain.nx150 := 6+a;
frmMain.nx151 := 2+a;
frmMain.nx152 := -2+a;
frmMain.nx153 := 2+a;
frmMain.nx154 := -2+a;
frmMain.nx155 := 0+a;
frmMain.nx156 := 0+a;
frmMain.nx157 := 4+a;
frmMain.nx158 := -4+a;
frmMain.nx159 := -6+a;
frmMain.nx160 := 6+a;
frmMain.nx161 := 4+a;
frmMain.nx162 := -4+a;
frmMain.nx163 := -6+a;
frmMain.nx164 := 6+a;
frmMain.nx165 := 4+a;
frmMain.nx166 := -4+a;
frmMain.nx167 := -6+a;
frmMain.nx168 := 6+a;
frmMain.nx169 := 4+a;
frmMain.nx170 := -4+a;
frmMain.nx171 := -6+a;
frmMain.nx172 := 6+a;
frmMain.nx173 := 4+a;
frmMain.nx174 := -4+a;
frmMain.nx175 := -6+a;
frmMain.nx176 := 6+a;
frmMain.nx177 := 4+a;
frmMain.nx178 := -4+a;
frmMain.nx179 := -6+a;
frmMain.nx180 := 6+a;
 frmMain.nx181 := 4+a;
 frmMain.nx182 := -4+a;
 frmMain.nx183 := -6+a;
 frmMain.nx184 := 6+a;
 frmMain.nx185 := 4+a;
 frmMain.nx186 := -4+a;
 frmMain.nx187 := -6+a;
 frmMain.nx188 := 6+a;
 frmMain.nx189 := -4+a;
 frmMain.nx190 := 4+a;
 frmMain.nx191 := -6+a;
 frmMain.nx192 := 6+a;
 frmMain.nx193 := -4+a;
 frmMain.nx194 := 4+a;
 frmMain.nx195 := -6+a;
 frmMain.nx196 := 6+a;
 frmMain.nx197 := -4+a;
 frmMain.nx198 := 4+a;
 frmMain.nx199 := -6+a;
 frmMain.nx200 := 6+a;
 frmMain.nx201 := -4+a;
 frmMain.nx202 := 4+a;
 frmMain.nx203 := -6+a;
 frmMain.nx204 := 6+a;
 frmMain.nx205 := 6+a;  //корабль
 frmMain.nx206 := 6+a;  //Подлодка
 frmMain.nx215 := -6+a;
 frmMain.frmGL.Width:=800;
 a:=0;
 frmMain.nz := 0+b;
  frmMain.nz1 := 0+b;
  frmMain.nz2 := 0+b;
 frmMain.nz3 := 1+b;
 frmMain.nz7 := 0+b;
 frmMain.nz8 := 2+b;
 frmMain.nz9 := 2+b;
  frmMain.nz10 := -2+b;
 frmMain.nz11 := -2+b;
 frmMain.nz12 := -2+b;
 frmMain.nz14 := -3+b;
 frmMain.nz15 := -3+b;
 frmMain.nz16 := -4+b;
 frmMain.nz17 := -4+b;
  frmMain.nz18 := -5+b;
 frmMain.nz19 := -5+b;
 frmMain.nz20 := -6+b;
 frmMain.nz21 := -7+b;
 frmMain.nz22 := -7+b;
  frmMain.nz23 := -8+b;
 frmMain.nz24 := -8+b;
  frmMain.nz25 := -9+b;
 frmMain.nz26 := -9+b;
 frmMain.nz27 := -10+b;
  frmMain.nz28 := -10+b;
  frmMain.nz29 := -11+b;
 frmMain.nz30 := -11+b;

// 1

 frmMain.nz31 := -2+b;
 frmMain.nz32 := -2+b;
 frmMain.nz33 := -3+b;
 frmMain.nz34 := -3+b;
 frmMain.nz35 := -4+b;
 frmMain.nz36 := -4+b;
  frmMain.nz37 := -5+b;
 frmMain.nz38 := -5+b;
 frmMain.nz39 := -6+b;
 frmMain.nz40 := -6+b;
 frmMain.nz41 := -7+b;
 frmMain.nz42 := -7+b;
 frmMain.nz43 := -8+b;
 frmMain.nz44 := -8+b;
 frmMain.nz45 := -9+b;  //////////////


 //////////////////////

 frmMain.nz46 := -9+b;
 frmMain.nz47 := -9+b;
 frmMain.nz48 := -10+b;
 frmMain.nz49 := -11+b;
 frmMain.nz50 := -11+b;
 frmMain.nz51 := -2+b;
 frmMain.nz52 :=-2+b;
 frmMain.nz53 := -3+b;
 frmMain.nz54 :=  3+b;
 frmMain.nz55 := -3+b;
 frmMain.nz56 := -4+b;
 frmMain.nz57 := -5+b;
 frmMain.nz58 := -5+b;
 frmMain.nz59 := -6+b;
 frmMain.nz60 := -6+b;
 frmMain.nz61 := -7+b;
 frmMain.nz62 := -7+b;
 frmMain.nz63 := -8+b;
 frmMain.nz64 := -8+b;
 frmMain.nz65 := -9+b;
 frmMain.nz66 := -9+b;
 frmMain.nz67 := -10+b;
 frmMain.nz68 := -10+b;
 frmMain.nz69 := -11+b;
 frmMain.nz70 := -11+b;


  ///3
 ///
 ///
 frmMain.nz71 := -2+b;
 frmMain.nz72 :=-2+b;
 frmMain.nz73 := -3+b;
 frmMain.nz74 :=  -3+b;
 frmMain.nz75 := -4+b;
 frmMain.nz76 := -4+b;
 frmMain.nz77 := -5+b;
 frmMain.nz78 := -5+b;
 frmMain.nz79 := -6+b;
 frmMain.nz80 := -6+b;
 frmMain.nz81 := -7+b;
 frmMain.nz82 := -7+b;
 frmMain.nz83 := -8+b;
 frmMain.nz84 := -8+b;
 frmMain.nz85 := -9+b;
 frmMain.nz86 := -9+b;
 frmMain.nz87 := -10+b;
 frmMain.nz88 := -10+b;
 frmMain.nz89 := -11+b;
 frmMain.nz90 := -2+b;

frmMain.nz94 :=1+b;
frmMain.nz95 :=1+b;  //цифры
frmMain.nz96 :=1+b;  //цифры
frmMain.nz97 :=1+b;  //цифры
frmMain.nz98 := 1+b;  //цифры
frmMain.nz99 := 1+b;  //цифры
frmMain.nz100 := 1+b;  //цифры
frmMain.nz101 := 1+b;  //цифры
frmMain.nz102 := 1+b;  //цифры
frmMain.nz103 := 1+b;  //цифры

frmMain.nz104 := -0+b;  //буквы
frmMain.nz105 := -2+b;  //буквы
frmMain.nz106 := -4+b;  //буквы
frmMain.nz107 := -6+b;  //буквы
frmMain.nz108 := -8+b;  //буквы
frmMain.nz109 := -10+b;  //буквы
frmMain.nz110 := -12+b;  //буквы
frmMain.nz111 := -14+b;  //буквы
frmMain.nz112 := -16+b;  //буквы
frmMain.nz113 := -18+b;  //буквы

frmMain.nz114 := -4+b;  //корабль
frmMain.nz115 := -18+b;  //цифры
frmMain.nz116 :=-18+b;  //цифры
frmMain.nz117 :=-18+b;  //цифры
frmMain.nz118 :=-18+b;  //цифры
frmMain.nz119 := -18+b;  //цифры
frmMain.nz120 := -18+b;  //цифры
frmMain.nz121 := -18+b;  //цифры
frmMain.nz122 := -18+b;  //цифры
frmMain.nz123 := -18+b;  //цифры
frmMain.nz124 := -18+b;  //цифры
frmMain.nz125 := -16+b;
frmMain.nz126 := -14+b;
frmMain.nz127 := -12+b;
frmMain.nz128 := -16+b;
frmMain.nz129 := -16+b;
frmMain.nz130 := -16+b;
frmMain.nz131 := -16+b;
frmMain.nz132 := -16+b;
frmMain.nz133 := -16+b;
frmMain.nz134 := -16+b;
frmMain.nz135 := -16+b;
frmMain.nz136 := -14+b;
frmMain.nz137 := -14+b;
frmMain.nz138 := -14+b;
frmMain.nz139 := -14+b;
frmMain.nz140 := -14+b;
frmMain.nz141 := -15+b;
frmMain.nz142 := -15+b;
frmMain.nz143 := -15+b;
frmMain.nz144 := -15+b;
frmMain.nz145 := -15+b;
frmMain.nz146 := -15+b;
frmMain.nz147 := -15+b;
frmMain.nz148 := -15+b;
frmMain.nz149 := -14+b;
frmMain.nz150 := -14+b;
frmMain.nz151 := -12+b;
frmMain.nz152 := -12+b;
frmMain.nz153 := -13+b;
frmMain.nz154 := -13+b;
frmMain.nz155 := -13+b;
frmMain.nz156 := -6+b;
frmMain.nz157 := -12+b;
frmMain.nz158 := -12+b;
frmMain.nz159 := -12+b;
frmMain.nz160 := -12+b;
frmMain.nz161 := -10+b;
frmMain.nz162 := -10+b;
frmMain.nz163 := -10+b;
frmMain.nz164 := -10+b;
frmMain.nz165 := -8+b;
frmMain.nz166 := -8+b;
frmMain.nz167 := -8+b;
frmMain.nz168 := -8+b;
frmMain.nz169 := -6+b;
frmMain.nz170 := -6+b;
frmMain.nz171 := -6+b;
frmMain.nz172 := -6+b;
frmMain.nz173 := -4+b;
frmMain.nz174 := -4+b;
frmMain.nz175 := -4+b;
frmMain.nz176 := -4+b;
frmMain.nz177 := -2+b;
frmMain.nz178 := -2+b;
frmMain.nz179 := -2+b;
frmMain.nz180 := -2+b;
 frmMain.nz181 := -3+b;
 frmMain.nz182 := -3+b;
 frmMain.nz183 := -3+b;
 frmMain.nz184 := -3+b;
 frmMain.nz185 := -5+b;
 frmMain.nz186 := -5+b;
 frmMain.nz187 := -5+b;
 frmMain.nz188 := -5+b;
 frmMain.nz189 := -7+b;
 frmMain.nz190 := -7+b;
 frmMain.nz191 := -7+b;
 frmMain.nz192 := -7+b;
 frmMain.nz193 := -9+b;
 frmMain.nz194 := -9+b;
 frmMain.nz195 := -9+b;
 frmMain.nz196 := -9+b;
 frmMain.nz197 := -11+b;
 frmMain.nz198 := -11+b;
 frmMain.nz199 := -11+b;
 frmMain.nz200 := -11+b;
 frmMain.nz201 := -13+b;
 frmMain.nz202 := -13+b;
 frmMain.nz203 := -13+b;
 frmMain.nz204 := -13+b;
 frmMain.nz205 := -4+b;  //корабль
 frmMain.nz206 := -8+b;  //Подлодка
 frmMain.nz215 := -12+b;
 frmMain.frmGL.Width:=800;
 b:=0;

 end;






 if (c=5) and (d=3) then
begin
StringGrid1.Cells[c,d]:='1';
a:=a-1;
b:=b+15;
frmMain.nx := 0+a;
  frmMain.nx1 := 0+a;
  frmMain.nx2 := 0+a;
 frmMain.nx3 := 0+a;
 frmMain.nx7 := -1+a;
 frmMain.nx8 := 1+a;
 frmMain.nx9 := -1+a;
  frmMain.nx10 := -2+a;
 frmMain.nx11 := -1+a;
 frmMain.nx12 := 1+a;
 frmMain.nx14 := 1+a;
 frmMain.nx15 := -1+a;
 frmMain.nx16 := -1+a;
 frmMain.nx17 := 1+a;
  frmMain.nx18 := -1+a;
 frmMain.nx19 := 1+a;
 frmMain.nx20 := -1+a;
 frmMain.nx21 := -1+a;
 frmMain.nx22 := 1+a;
  frmMain.nx23 := -1+a;
 frmMain.nx24 := 1+a;
  frmMain.nx25 := 1+a;
 frmMain.nx26 := -1+a;
 frmMain.nx27 := 1+a;
  frmMain.nx28 := -1+a;
  frmMain.nx29 := 1+a;
 frmMain.nx30 := -1+a;

// 1

 frmMain.nx31 := -2+a;
 frmMain.nx32 := 2+a;
 frmMain.nx33 := -2+a;
 frmMain.nx34 :=  2+a;
 frmMain.nx35 := -2+a;
 frmMain.nx36 := 2+a;
  frmMain.nx37 := -2+a;
 frmMain.nx38 := 2+a;
 frmMain.nx39 := -2+a;
 frmMain.nx40 := 2+a;
 frmMain.nx41 := -2+a;
 frmMain.nx42 := 2+a;
 frmMain.nx43 := -2+a;
 frmMain.nx44 := 2+a;
 frmMain.nx45 := -2+a;  //////////////


 //////////////////////

 frmMain.nx46 := -2+a;
 frmMain.nx47 := -2+a;
 frmMain.nx48 := 2+a;
 frmMain.nx49 := -2+a;
 frmMain.nx50 := 2+a;
 frmMain.nx51 := -3+a;
 frmMain.nx52 :=3+a;
 frmMain.nx53 := -3+a;
 frmMain.nx54 :=  3+a;
 frmMain.nx55 := -3+a;
 frmMain.nx56 := 3+a;
 frmMain.nx57 := -3+a;
 frmMain.nx58 := 3+a;
 frmMain.nx59 := -3+a;
 frmMain.nx60 := 3+a;
 frmMain.nx61 := -3+a;
 frmMain.nx62 := 3+a;
 frmMain.nx63 := -3+a;
 frmMain.nx64 := 3+a;
 frmMain.nx65 := -3+a;
 frmMain.nx66 := 3+a;
 frmMain.nx67 := -3+a;
 frmMain.nx68 := 3+a;
 frmMain.nx69 := -3+a;
 frmMain.nx70 := 3+a;


  ///3
 ///
 ///
 frmMain.nx71 := -4+a;
 frmMain.nx72 :=4+a;
 frmMain.nx73 := -4+a;
 frmMain.nx74 :=  4+a;
 frmMain.nx75 := -4+a;
 frmMain.nx76 := 4+a;
 frmMain.nx77 := -4+a;
 frmMain.nx78 := 4+a;
 frmMain.nx79 := -4+a;
 frmMain.nx80 := 4+a;
 frmMain.nx81 := -4+a;
 frmMain.nx82 := 4+a;
 frmMain.nx83 := -4+a;
 frmMain.nx84 := 4+a;
 frmMain.nx85 := -4+a;
 frmMain.nx86 := 4+a;
 frmMain.nx87 := -4+a;
 frmMain.nx88 := 4+a;
 frmMain.nx89 := -4+a;
 frmMain.nx90 := -2+a;

frmMain.nx94 :=0+a;
frmMain.nx95 :=-2+a;  //цифры
frmMain.nx96 :=-4+a;  //цифры
frmMain.nx97 :=-6+a;  //цифры
frmMain.nx98 := 2+a;  //цифры
frmMain.nx99 := 4+a;  //цифры
frmMain.nx100 := 6+a;  //цифры
frmMain.nx101 := 8+a;  //цифры
frmMain.nx102 := 10+a;  //цифры
frmMain.nx103 := 12+a;  //цифры

frmMain.nx104 := -8+a;  //буквы
frmMain.nx105 := -8+a;  //буквы
frmMain.nx106 := -8+a;  //буквы
frmMain.nx107 := -8+a;  //буквы
frmMain.nx108 := -8+a;  //буквы
frmMain.nx109 := -8+a;  //буквы
frmMain.nx110 := -8+a;  //буквы
frmMain.nx111 := -8+a;  //буквы
frmMain.nx112 := -8+a;  //буквы
frmMain.nx113 := -8+a;  //буквы

frmMain.nx114 := -6+a;  //корабль
frmMain.nx115 := 0+a;  //цифры
frmMain.nx116 :=-2+a;  //цифры
frmMain.nx117 :=-4+a;  //цифры
frmMain.nx118 :=-6+a;  //цифры
frmMain.nx119 := 2+a;  //цифры
frmMain.nx120 := 4+a;  //цифры
frmMain.nx121 := 6+a;  //цифры
frmMain.nx122 := 8+a;  //цифры
frmMain.nx123 := 10+a;  //цифры
frmMain.nx124 := 12+a;  //цифры
frmMain.nx125 := 0+a;
frmMain.nx126 := 0+a;
frmMain.nx127 := 0+a;
frmMain.nx128 := 2+a;
frmMain.nx129 := -2+a;
frmMain.nx130 := -4+a;
frmMain.nx131 := 4+a;
frmMain.nx132 := -6+a;
frmMain.nx133 := 6+a;
frmMain.nx134 := 8+a;
frmMain.nx135 := -8+a;
frmMain.nx136 := -2+a;
frmMain.nx137 := 2+a;
frmMain.nx138 := -4+a;
frmMain.nx139 := 4+a;
frmMain.nx140 := -2+a;
frmMain.nx141 := 2+a;
frmMain.nx142 := 0+a;
frmMain.nx143 := 2+a;
frmMain.nx144 := -2+a;
frmMain.nx145 := -4+a;
frmMain.nx146 := 4+a;
frmMain.nx147 := 6+a;
frmMain.nx148 := -6+a;
frmMain.nx149 := -6+a;
frmMain.nx150 := 6+a;
frmMain.nx151 := 2+a;
frmMain.nx152 := -2+a;
frmMain.nx153 := 2+a;
frmMain.nx154 := -2+a;
frmMain.nx155 := 0+a;
frmMain.nx156 := 0+a;
frmMain.nx157 := 4+a;
frmMain.nx158 := -4+a;
frmMain.nx159 := -6+a;
frmMain.nx160 := 6+a;
frmMain.nx161 := 4+a;
frmMain.nx162 := -4+a;
frmMain.nx163 := -6+a;
frmMain.nx164 := 6+a;
frmMain.nx165 := 4+a;
frmMain.nx166 := -4+a;
frmMain.nx167 := -6+a;
frmMain.nx168 := 6+a;
frmMain.nx169 := 4+a;
frmMain.nx170 := -4+a;
frmMain.nx171 := -6+a;
frmMain.nx172 := 6+a;
frmMain.nx173 := 4+a;
frmMain.nx174 := -4+a;
frmMain.nx175 := -6+a;
frmMain.nx176 := 6+a;
frmMain.nx177 := 4+a;
frmMain.nx178 := -4+a;
frmMain.nx179 := -6+a;
frmMain.nx180 := 6+a;
 frmMain.nx181 := 4+a;
 frmMain.nx182 := -4+a;
 frmMain.nx183 := -6+a;
 frmMain.nx184 := 6+a;
 frmMain.nx185 := 4+a;
 frmMain.nx186 := -4+a;
 frmMain.nx187 := -6+a;
 frmMain.nx188 := 6+a;
 frmMain.nx189 := -4+a;
 frmMain.nx190 := 4+a;
 frmMain.nx191 := -6+a;
 frmMain.nx192 := 6+a;
 frmMain.nx193 := -4+a;
 frmMain.nx194 := 4+a;
 frmMain.nx195 := -6+a;
 frmMain.nx196 := 6+a;
 frmMain.nx197 := -4+a;
 frmMain.nx198 := 4+a;
 frmMain.nx199 := -6+a;
 frmMain.nx200 := 6+a;
 frmMain.nx201 := -4+a;
 frmMain.nx202 := 4+a;
 frmMain.nx203 := -6+a;
 frmMain.nx204 := 6+a;
 frmMain.nx205 := 6+a;  //корабль
 frmMain.nx206 := 6+a;  //Подлодка
 frmMain.nx215 := -6+a;
 frmMain.frmGL.Width:=800;
 a:=0;
 frmMain.nz := 0+b;
  frmMain.nz1 := 0+b;
  frmMain.nz2 := 0+b;
 frmMain.nz3 := 1+b;
 frmMain.nz7 := 0+b;
 frmMain.nz8 := 2+b;
 frmMain.nz9 := 2+b;
  frmMain.nz10 := -2+b;
 frmMain.nz11 := -2+b;
 frmMain.nz12 := -2+b;
 frmMain.nz14 := -3+b;
 frmMain.nz15 := -3+b;
 frmMain.nz16 := -4+b;
 frmMain.nz17 := -4+b;
  frmMain.nz18 := -5+b;
 frmMain.nz19 := -5+b;
 frmMain.nz20 := -6+b;
 frmMain.nz21 := -7+b;
 frmMain.nz22 := -7+b;
  frmMain.nz23 := -8+b;
 frmMain.nz24 := -8+b;
  frmMain.nz25 := -9+b;
 frmMain.nz26 := -9+b;
 frmMain.nz27 := -10+b;
  frmMain.nz28 := -10+b;
  frmMain.nz29 := -11+b;
 frmMain.nz30 := -11+b;

// 1

 frmMain.nz31 := -2+b;
 frmMain.nz32 := -2+b;
 frmMain.nz33 := -3+b;
 frmMain.nz34 := -3+b;
 frmMain.nz35 := -4+b;
 frmMain.nz36 := -4+b;
  frmMain.nz37 := -5+b;
 frmMain.nz38 := -5+b;
 frmMain.nz39 := -6+b;
 frmMain.nz40 := -6+b;
 frmMain.nz41 := -7+b;
 frmMain.nz42 := -7+b;
 frmMain.nz43 := -8+b;
 frmMain.nz44 := -8+b;
 frmMain.nz45 := -9+b;  //////////////


 //////////////////////

 frmMain.nz46 := -9+b;
 frmMain.nz47 := -9+b;
 frmMain.nz48 := -10+b;
 frmMain.nz49 := -11+b;
 frmMain.nz50 := -11+b;
 frmMain.nz51 := -2+b;
 frmMain.nz52 :=-2+b;
 frmMain.nz53 := -3+b;
 frmMain.nz54 :=  3+b;
 frmMain.nz55 := -3+b;
 frmMain.nz56 := -4+b;
 frmMain.nz57 := -5+b;
 frmMain.nz58 := -5+b;
 frmMain.nz59 := -6+b;
 frmMain.nz60 := -6+b;
 frmMain.nz61 := -7+b;
 frmMain.nz62 := -7+b;
 frmMain.nz63 := -8+b;
 frmMain.nz64 := -8+b;
 frmMain.nz65 := -9+b;
 frmMain.nz66 := -9+b;
 frmMain.nz67 := -10+b;
 frmMain.nz68 := -10+b;
 frmMain.nz69 := -11+b;
 frmMain.nz70 := -11+b;


  ///3
 ///
 ///
 frmMain.nz71 := -2+b;
 frmMain.nz72 :=-2+b;
 frmMain.nz73 := -3+b;
 frmMain.nz74 :=  -3+b;
 frmMain.nz75 := -4+b;
 frmMain.nz76 := -4+b;
 frmMain.nz77 := -5+b;
 frmMain.nz78 := -5+b;
 frmMain.nz79 := -6+b;
 frmMain.nz80 := -6+b;
 frmMain.nz81 := -7+b;
 frmMain.nz82 := -7+b;
 frmMain.nz83 := -8+b;
 frmMain.nz84 := -8+b;
 frmMain.nz85 := -9+b;
 frmMain.nz86 := -9+b;
 frmMain.nz87 := -10+b;
 frmMain.nz88 := -10+b;
 frmMain.nz89 := -11+b;
 frmMain.nz90 := -2+b;

frmMain.nz94 :=1+b;
frmMain.nz95 :=1+b;  //цифры
frmMain.nz96 :=1+b;  //цифры
frmMain.nz97 :=1+b;  //цифры
frmMain.nz98 := 1+b;  //цифры
frmMain.nz99 := 1+b;  //цифры
frmMain.nz100 := 1+b;  //цифры
frmMain.nz101 := 1+b;  //цифры
frmMain.nz102 := 1+b;  //цифры
frmMain.nz103 := 1+b;  //цифры

frmMain.nz104 := -0+b;  //буквы
frmMain.nz105 := -2+b;  //буквы
frmMain.nz106 := -4+b;  //буквы
frmMain.nz107 := -6+b;  //буквы
frmMain.nz108 := -8+b;  //буквы
frmMain.nz109 := -10+b;  //буквы
frmMain.nz110 := -12+b;  //буквы
frmMain.nz111 := -14+b;  //буквы
frmMain.nz112 := -16+b;  //буквы
frmMain.nz113 := -18+b;  //буквы

frmMain.nz114 := -4+b;  //корабль
frmMain.nz115 := -18+b;  //цифры
frmMain.nz116 :=-18+b;  //цифры
frmMain.nz117 :=-18+b;  //цифры
frmMain.nz118 :=-18+b;  //цифры
frmMain.nz119 := -18+b;  //цифры
frmMain.nz120 := -18+b;  //цифры
frmMain.nz121 := -18+b;  //цифры
frmMain.nz122 := -18+b;  //цифры
frmMain.nz123 := -18+b;  //цифры
frmMain.nz124 := -18+b;  //цифры
frmMain.nz125 := -16+b;
frmMain.nz126 := -14+b;
frmMain.nz127 := -12+b;
frmMain.nz128 := -16+b;
frmMain.nz129 := -16+b;
frmMain.nz130 := -16+b;
frmMain.nz131 := -16+b;
frmMain.nz132 := -16+b;
frmMain.nz133 := -16+b;
frmMain.nz134 := -16+b;
frmMain.nz135 := -16+b;
frmMain.nz136 := -14+b;
frmMain.nz137 := -14+b;
frmMain.nz138 := -14+b;
frmMain.nz139 := -14+b;
frmMain.nz140 := -14+b;
frmMain.nz141 := -15+b;
frmMain.nz142 := -15+b;
frmMain.nz143 := -15+b;
frmMain.nz144 := -15+b;
frmMain.nz145 := -15+b;
frmMain.nz146 := -15+b;
frmMain.nz147 := -15+b;
frmMain.nz148 := -15+b;
frmMain.nz149 := -14+b;
frmMain.nz150 := -14+b;
frmMain.nz151 := -12+b;
frmMain.nz152 := -12+b;
frmMain.nz153 := -13+b;
frmMain.nz154 := -13+b;
frmMain.nz155 := -13+b;
frmMain.nz156 := -6+b;
frmMain.nz157 := -12+b;
frmMain.nz158 := -12+b;
frmMain.nz159 := -12+b;
frmMain.nz160 := -12+b;
frmMain.nz161 := -10+b;
frmMain.nz162 := -10+b;
frmMain.nz163 := -10+b;
frmMain.nz164 := -10+b;
frmMain.nz165 := -8+b;
frmMain.nz166 := -8+b;
frmMain.nz167 := -8+b;
frmMain.nz168 := -8+b;
frmMain.nz169 := -6+b;
frmMain.nz170 := -6+b;
frmMain.nz171 := -6+b;
frmMain.nz172 := -6+b;
frmMain.nz173 := -4+b;
frmMain.nz174 := -4+b;
frmMain.nz175 := -4+b;
frmMain.nz176 := -4+b;
frmMain.nz177 := -2+b;
frmMain.nz178 := -2+b;
frmMain.nz179 := -2+b;
frmMain.nz180 := -2+b;
 frmMain.nz181 := -3+b;
 frmMain.nz182 := -3+b;
 frmMain.nz183 := -3+b;
 frmMain.nz184 := -3+b;
 frmMain.nz185 := -5+b;
 frmMain.nz186 := -5+b;
 frmMain.nz187 := -5+b;
 frmMain.nz188 := -5+b;
 frmMain.nz189 := -7+b;
 frmMain.nz190 := -7+b;
 frmMain.nz191 := -7+b;
 frmMain.nz192 := -7+b;
 frmMain.nz193 := -9+b;
 frmMain.nz194 := -9+b;
 frmMain.nz195 := -9+b;
 frmMain.nz196 := -9+b;
 frmMain.nz197 := -11+b;
 frmMain.nz198 := -11+b;
 frmMain.nz199 := -11+b;
 frmMain.nz200 := -11+b;
 frmMain.nz201 := -13+b;
 frmMain.nz202 := -13+b;
 frmMain.nz203 := -13+b;
 frmMain.nz204 := -13+b;
 frmMain.nz205 := -4+b;  //корабль
 frmMain.nz206 := -8+b;  //Подлодка
 frmMain.nz215 := -12+b;
 frmMain.frmGL.Width:=800;
 b:=0;

 end;





 if (c=5) and (d=2) then
begin
StringGrid1.Cells[c,d]:='1';
a:=a-1;
b:=b+17;
frmMain.nx := 0+a;
  frmMain.nx1 := 0+a;
  frmMain.nx2 := 0+a;
 frmMain.nx3 := 0+a;
 frmMain.nx7 := -1+a;
 frmMain.nx8 := 1+a;
 frmMain.nx9 := -1+a;
  frmMain.nx10 := -2+a;
 frmMain.nx11 := -1+a;
 frmMain.nx12 := 1+a;
 frmMain.nx14 := 1+a;
 frmMain.nx15 := -1+a;
 frmMain.nx16 := -1+a;
 frmMain.nx17 := 1+a;
  frmMain.nx18 := -1+a;
 frmMain.nx19 := 1+a;
 frmMain.nx20 := -1+a;
 frmMain.nx21 := -1+a;
 frmMain.nx22 := 1+a;
  frmMain.nx23 := -1+a;
 frmMain.nx24 := 1+a;
  frmMain.nx25 := 1+a;
 frmMain.nx26 := -1+a;
 frmMain.nx27 := 1+a;
  frmMain.nx28 := -1+a;
  frmMain.nx29 := 1+a;
 frmMain.nx30 := -1+a;

// 1

 frmMain.nx31 := -2+a;
 frmMain.nx32 := 2+a;
 frmMain.nx33 := -2+a;
 frmMain.nx34 :=  2+a;
 frmMain.nx35 := -2+a;
 frmMain.nx36 := 2+a;
  frmMain.nx37 := -2+a;
 frmMain.nx38 := 2+a;
 frmMain.nx39 := -2+a;
 frmMain.nx40 := 2+a;
 frmMain.nx41 := -2+a;
 frmMain.nx42 := 2+a;
 frmMain.nx43 := -2+a;
 frmMain.nx44 := 2+a;
 frmMain.nx45 := -2+a;  //////////////


 //////////////////////

 frmMain.nx46 := -2+a;
 frmMain.nx47 := -2+a;
 frmMain.nx48 := 2+a;
 frmMain.nx49 := -2+a;
 frmMain.nx50 := 2+a;
 frmMain.nx51 := -3+a;
 frmMain.nx52 :=3+a;
 frmMain.nx53 := -3+a;
 frmMain.nx54 :=  3+a;
 frmMain.nx55 := -3+a;
 frmMain.nx56 := 3+a;
 frmMain.nx57 := -3+a;
 frmMain.nx58 := 3+a;
 frmMain.nx59 := -3+a;
 frmMain.nx60 := 3+a;
 frmMain.nx61 := -3+a;
 frmMain.nx62 := 3+a;
 frmMain.nx63 := -3+a;
 frmMain.nx64 := 3+a;
 frmMain.nx65 := -3+a;
 frmMain.nx66 := 3+a;
 frmMain.nx67 := -3+a;
 frmMain.nx68 := 3+a;
 frmMain.nx69 := -3+a;
 frmMain.nx70 := 3+a;


  ///3
 ///
 ///
 frmMain.nx71 := -4+a;
 frmMain.nx72 :=4+a;
 frmMain.nx73 := -4+a;
 frmMain.nx74 :=  4+a;
 frmMain.nx75 := -4+a;
 frmMain.nx76 := 4+a;
 frmMain.nx77 := -4+a;
 frmMain.nx78 := 4+a;
 frmMain.nx79 := -4+a;
 frmMain.nx80 := 4+a;
 frmMain.nx81 := -4+a;
 frmMain.nx82 := 4+a;
 frmMain.nx83 := -4+a;
 frmMain.nx84 := 4+a;
 frmMain.nx85 := -4+a;
 frmMain.nx86 := 4+a;
 frmMain.nx87 := -4+a;
 frmMain.nx88 := 4+a;
 frmMain.nx89 := -4+a;
 frmMain.nx90 := -2+a;

frmMain.nx94 :=0+a;
frmMain.nx95 :=-2+a;  //цифры
frmMain.nx96 :=-4+a;  //цифры
frmMain.nx97 :=-6+a;  //цифры
frmMain.nx98 := 2+a;  //цифры
frmMain.nx99 := 4+a;  //цифры
frmMain.nx100 := 6+a;  //цифры
frmMain.nx101 := 8+a;  //цифры
frmMain.nx102 := 10+a;  //цифры
frmMain.nx103 := 12+a;  //цифры

frmMain.nx104 := -8+a;  //буквы
frmMain.nx105 := -8+a;  //буквы
frmMain.nx106 := -8+a;  //буквы
frmMain.nx107 := -8+a;  //буквы
frmMain.nx108 := -8+a;  //буквы
frmMain.nx109 := -8+a;  //буквы
frmMain.nx110 := -8+a;  //буквы
frmMain.nx111 := -8+a;  //буквы
frmMain.nx112 := -8+a;  //буквы
frmMain.nx113 := -8+a;  //буквы

frmMain.nx114 := -6+a;  //корабль
frmMain.nx115 := 0+a;  //цифры
frmMain.nx116 :=-2+a;  //цифры
frmMain.nx117 :=-4+a;  //цифры
frmMain.nx118 :=-6+a;  //цифры
frmMain.nx119 := 2+a;  //цифры
frmMain.nx120 := 4+a;  //цифры
frmMain.nx121 := 6+a;  //цифры
frmMain.nx122 := 8+a;  //цифры
frmMain.nx123 := 10+a;  //цифры
frmMain.nx124 := 12+a;  //цифры
frmMain.nx125 := 0+a;
frmMain.nx126 := 0+a;
frmMain.nx127 := 0+a;
frmMain.nx128 := 2+a;
frmMain.nx129 := -2+a;
frmMain.nx130 := -4+a;
frmMain.nx131 := 4+a;
frmMain.nx132 := -6+a;
frmMain.nx133 := 6+a;
frmMain.nx134 := 8+a;
frmMain.nx135 := -8+a;
frmMain.nx136 := -2+a;
frmMain.nx137 := 2+a;
frmMain.nx138 := -4+a;
frmMain.nx139 := 4+a;
frmMain.nx140 := -2+a;
frmMain.nx141 := 2+a;
frmMain.nx142 := 0+a;
frmMain.nx143 := 2+a;
frmMain.nx144 := -2+a;
frmMain.nx145 := -4+a;
frmMain.nx146 := 4+a;
frmMain.nx147 := 6+a;
frmMain.nx148 := -6+a;
frmMain.nx149 := -6+a;
frmMain.nx150 := 6+a;
frmMain.nx151 := 2+a;
frmMain.nx152 := -2+a;
frmMain.nx153 := 2+a;
frmMain.nx154 := -2+a;
frmMain.nx155 := 0+a;
frmMain.nx156 := 0+a;
frmMain.nx157 := 4+a;
frmMain.nx158 := -4+a;
frmMain.nx159 := -6+a;
frmMain.nx160 := 6+a;
frmMain.nx161 := 4+a;
frmMain.nx162 := -4+a;
frmMain.nx163 := -6+a;
frmMain.nx164 := 6+a;
frmMain.nx165 := 4+a;
frmMain.nx166 := -4+a;
frmMain.nx167 := -6+a;
frmMain.nx168 := 6+a;
frmMain.nx169 := 4+a;
frmMain.nx170 := -4+a;
frmMain.nx171 := -6+a;
frmMain.nx172 := 6+a;
frmMain.nx173 := 4+a;
frmMain.nx174 := -4+a;
frmMain.nx175 := -6+a;
frmMain.nx176 := 6+a;
frmMain.nx177 := 4+a;
frmMain.nx178 := -4+a;
frmMain.nx179 := -6+a;
frmMain.nx180 := 6+a;
 frmMain.nx181 := 4+a;
 frmMain.nx182 := -4+a;
 frmMain.nx183 := -6+a;
 frmMain.nx184 := 6+a;
 frmMain.nx185 := 4+a;
 frmMain.nx186 := -4+a;
 frmMain.nx187 := -6+a;
 frmMain.nx188 := 6+a;
 frmMain.nx189 := -4+a;
 frmMain.nx190 := 4+a;
 frmMain.nx191 := -6+a;
 frmMain.nx192 := 6+a;
 frmMain.nx193 := -4+a;
 frmMain.nx194 := 4+a;
 frmMain.nx195 := -6+a;
 frmMain.nx196 := 6+a;
 frmMain.nx197 := -4+a;
 frmMain.nx198 := 4+a;
 frmMain.nx199 := -6+a;
 frmMain.nx200 := 6+a;
 frmMain.nx201 := -4+a;
 frmMain.nx202 := 4+a;
 frmMain.nx203 := -6+a;
 frmMain.nx204 := 6+a;
 frmMain.nx205 := 6+a;  //корабль
 frmMain.nx206 := 6+a;  //Подлодка
 frmMain.nx215 := -6+a;
 frmMain.frmGL.Width:=800;
 a:=0;
 frmMain.nz := 0+b;
  frmMain.nz1 := 0+b;
  frmMain.nz2 := 0+b;
 frmMain.nz3 := 1+b;
 frmMain.nz7 := 0+b;
 frmMain.nz8 := 2+b;
 frmMain.nz9 := 2+b;
  frmMain.nz10 := -2+b;
 frmMain.nz11 := -2+b;
 frmMain.nz12 := -2+b;
 frmMain.nz14 := -3+b;
 frmMain.nz15 := -3+b;
 frmMain.nz16 := -4+b;
 frmMain.nz17 := -4+b;
  frmMain.nz18 := -5+b;
 frmMain.nz19 := -5+b;
 frmMain.nz20 := -6+b;
 frmMain.nz21 := -7+b;
 frmMain.nz22 := -7+b;
  frmMain.nz23 := -8+b;
 frmMain.nz24 := -8+b;
  frmMain.nz25 := -9+b;
 frmMain.nz26 := -9+b;
 frmMain.nz27 := -10+b;
  frmMain.nz28 := -10+b;
  frmMain.nz29 := -11+b;
 frmMain.nz30 := -11+b;

// 1

 frmMain.nz31 := -2+b;
 frmMain.nz32 := -2+b;
 frmMain.nz33 := -3+b;
 frmMain.nz34 := -3+b;
 frmMain.nz35 := -4+b;
 frmMain.nz36 := -4+b;
  frmMain.nz37 := -5+b;
 frmMain.nz38 := -5+b;
 frmMain.nz39 := -6+b;
 frmMain.nz40 := -6+b;
 frmMain.nz41 := -7+b;
 frmMain.nz42 := -7+b;
 frmMain.nz43 := -8+b;
 frmMain.nz44 := -8+b;
 frmMain.nz45 := -9+b;  //////////////


 //////////////////////

 frmMain.nz46 := -9+b;
 frmMain.nz47 := -9+b;
 frmMain.nz48 := -10+b;
 frmMain.nz49 := -11+b;
 frmMain.nz50 := -11+b;
 frmMain.nz51 := -2+b;
 frmMain.nz52 :=-2+b;
 frmMain.nz53 := -3+b;
 frmMain.nz54 :=  3+b;
 frmMain.nz55 := -3+b;
 frmMain.nz56 := -4+b;
 frmMain.nz57 := -5+b;
 frmMain.nz58 := -5+b;
 frmMain.nz59 := -6+b;
 frmMain.nz60 := -6+b;
 frmMain.nz61 := -7+b;
 frmMain.nz62 := -7+b;
 frmMain.nz63 := -8+b;
 frmMain.nz64 := -8+b;
 frmMain.nz65 := -9+b;
 frmMain.nz66 := -9+b;
 frmMain.nz67 := -10+b;
 frmMain.nz68 := -10+b;
 frmMain.nz69 := -11+b;
 frmMain.nz70 := -11+b;


  ///3
 ///
 ///
 frmMain.nz71 := -2+b;
 frmMain.nz72 :=-2+b;
 frmMain.nz73 := -3+b;
 frmMain.nz74 :=  -3+b;
 frmMain.nz75 := -4+b;
 frmMain.nz76 := -4+b;
 frmMain.nz77 := -5+b;
 frmMain.nz78 := -5+b;
 frmMain.nz79 := -6+b;
 frmMain.nz80 := -6+b;
 frmMain.nz81 := -7+b;
 frmMain.nz82 := -7+b;
 frmMain.nz83 := -8+b;
 frmMain.nz84 := -8+b;
 frmMain.nz85 := -9+b;
 frmMain.nz86 := -9+b;
 frmMain.nz87 := -10+b;
 frmMain.nz88 := -10+b;
 frmMain.nz89 := -11+b;
 frmMain.nz90 := -2+b;

frmMain.nz94 :=1+b;
frmMain.nz95 :=1+b;  //цифры
frmMain.nz96 :=1+b;  //цифры
frmMain.nz97 :=1+b;  //цифры
frmMain.nz98 := 1+b;  //цифры
frmMain.nz99 := 1+b;  //цифры
frmMain.nz100 := 1+b;  //цифры
frmMain.nz101 := 1+b;  //цифры
frmMain.nz102 := 1+b;  //цифры
frmMain.nz103 := 1+b;  //цифры

frmMain.nz104 := -0+b;  //буквы
frmMain.nz105 := -2+b;  //буквы
frmMain.nz106 := -4+b;  //буквы
frmMain.nz107 := -6+b;  //буквы
frmMain.nz108 := -8+b;  //буквы
frmMain.nz109 := -10+b;  //буквы
frmMain.nz110 := -12+b;  //буквы
frmMain.nz111 := -14+b;  //буквы
frmMain.nz112 := -16+b;  //буквы
frmMain.nz113 := -18+b;  //буквы

frmMain.nz114 := -4+b;  //корабль
frmMain.nz115 := -18+b;  //цифры
frmMain.nz116 :=-18+b;  //цифры
frmMain.nz117 :=-18+b;  //цифры
frmMain.nz118 :=-18+b;  //цифры
frmMain.nz119 := -18+b;  //цифры
frmMain.nz120 := -18+b;  //цифры
frmMain.nz121 := -18+b;  //цифры
frmMain.nz122 := -18+b;  //цифры
frmMain.nz123 := -18+b;  //цифры
frmMain.nz124 := -18+b;  //цифры
frmMain.nz125 := -16+b;
frmMain.nz126 := -14+b;
frmMain.nz127 := -12+b;
frmMain.nz128 := -16+b;
frmMain.nz129 := -16+b;
frmMain.nz130 := -16+b;
frmMain.nz131 := -16+b;
frmMain.nz132 := -16+b;
frmMain.nz133 := -16+b;
frmMain.nz134 := -16+b;
frmMain.nz135 := -16+b;
frmMain.nz136 := -14+b;
frmMain.nz137 := -14+b;
frmMain.nz138 := -14+b;
frmMain.nz139 := -14+b;
frmMain.nz140 := -14+b;
frmMain.nz141 := -15+b;
frmMain.nz142 := -15+b;
frmMain.nz143 := -15+b;
frmMain.nz144 := -15+b;
frmMain.nz145 := -15+b;
frmMain.nz146 := -15+b;
frmMain.nz147 := -15+b;
frmMain.nz148 := -15+b;
frmMain.nz149 := -14+b;
frmMain.nz150 := -14+b;
frmMain.nz151 := -12+b;
frmMain.nz152 := -12+b;
frmMain.nz153 := -13+b;
frmMain.nz154 := -13+b;
frmMain.nz155 := -13+b;
frmMain.nz156 := -6+b;
frmMain.nz157 := -12+b;
frmMain.nz158 := -12+b;
frmMain.nz159 := -12+b;
frmMain.nz160 := -12+b;
frmMain.nz161 := -10+b;
frmMain.nz162 := -10+b;
frmMain.nz163 := -10+b;
frmMain.nz164 := -10+b;
frmMain.nz165 := -8+b;
frmMain.nz166 := -8+b;
frmMain.nz167 := -8+b;
frmMain.nz168 := -8+b;
frmMain.nz169 := -6+b;
frmMain.nz170 := -6+b;
frmMain.nz171 := -6+b;
frmMain.nz172 := -6+b;
frmMain.nz173 := -4+b;
frmMain.nz174 := -4+b;
frmMain.nz175 := -4+b;
frmMain.nz176 := -4+b;
frmMain.nz177 := -2+b;
frmMain.nz178 := -2+b;
frmMain.nz179 := -2+b;
frmMain.nz180 := -2+b;
 frmMain.nz181 := -3+b;
 frmMain.nz182 := -3+b;
 frmMain.nz183 := -3+b;
 frmMain.nz184 := -3+b;
 frmMain.nz185 := -5+b;
 frmMain.nz186 := -5+b;
 frmMain.nz187 := -5+b;
 frmMain.nz188 := -5+b;
 frmMain.nz189 := -7+b;
 frmMain.nz190 := -7+b;
 frmMain.nz191 := -7+b;
 frmMain.nz192 := -7+b;
 frmMain.nz193 := -9+b;
 frmMain.nz194 := -9+b;
 frmMain.nz195 := -9+b;
 frmMain.nz196 := -9+b;
 frmMain.nz197 := -11+b;
 frmMain.nz198 := -11+b;
 frmMain.nz199 := -11+b;
 frmMain.nz200 := -11+b;
 frmMain.nz201 := -13+b;
 frmMain.nz202 := -13+b;
 frmMain.nz203 := -13+b;
 frmMain.nz204 := -13+b;
 frmMain.nz205 := -4+b;  //корабль
 frmMain.nz206 := -8+b;  //Подлодка
 frmMain.nz215 := -12+b;
 frmMain.frmGL.Width:=800;
 b:=0;

 end;




 if (c=5) and (d=1) then
begin
StringGrid1.Cells[c,d]:='1';
a:=a-1;
b:=b+19;
frmMain.nx := 0+a;
  frmMain.nx1 := 0+a;
  frmMain.nx2 := 0+a;
 frmMain.nx3 := 0+a;
 frmMain.nx7 := -1+a;
 frmMain.nx8 := 1+a;
 frmMain.nx9 := -1+a;
  frmMain.nx10 := -2+a;
 frmMain.nx11 := -1+a;
 frmMain.nx12 := 1+a;
 frmMain.nx14 := 1+a;
 frmMain.nx15 := -1+a;
 frmMain.nx16 := -1+a;
 frmMain.nx17 := 1+a;
  frmMain.nx18 := -1+a;
 frmMain.nx19 := 1+a;
 frmMain.nx20 := -1+a;
 frmMain.nx21 := -1+a;
 frmMain.nx22 := 1+a;
  frmMain.nx23 := -1+a;
 frmMain.nx24 := 1+a;
  frmMain.nx25 := 1+a;
 frmMain.nx26 := -1+a;
 frmMain.nx27 := 1+a;
  frmMain.nx28 := -1+a;
  frmMain.nx29 := 1+a;
 frmMain.nx30 := -1+a;

// 1

 frmMain.nx31 := -2+a;
 frmMain.nx32 := 2+a;
 frmMain.nx33 := -2+a;
 frmMain.nx34 :=  2+a;
 frmMain.nx35 := -2+a;
 frmMain.nx36 := 2+a;
  frmMain.nx37 := -2+a;
 frmMain.nx38 := 2+a;
 frmMain.nx39 := -2+a;
 frmMain.nx40 := 2+a;
 frmMain.nx41 := -2+a;
 frmMain.nx42 := 2+a;
 frmMain.nx43 := -2+a;
 frmMain.nx44 := 2+a;
 frmMain.nx45 := -2+a;  //////////////


 //////////////////////

 frmMain.nx46 := -2+a;
 frmMain.nx47 := -2+a;
 frmMain.nx48 := 2+a;
 frmMain.nx49 := -2+a;
 frmMain.nx50 := 2+a;
 frmMain.nx51 := -3+a;
 frmMain.nx52 :=3+a;
 frmMain.nx53 := -3+a;
 frmMain.nx54 :=  3+a;
 frmMain.nx55 := -3+a;
 frmMain.nx56 := 3+a;
 frmMain.nx57 := -3+a;
 frmMain.nx58 := 3+a;
 frmMain.nx59 := -3+a;
 frmMain.nx60 := 3+a;
 frmMain.nx61 := -3+a;
 frmMain.nx62 := 3+a;
 frmMain.nx63 := -3+a;
 frmMain.nx64 := 3+a;
 frmMain.nx65 := -3+a;
 frmMain.nx66 := 3+a;
 frmMain.nx67 := -3+a;
 frmMain.nx68 := 3+a;
 frmMain.nx69 := -3+a;
 frmMain.nx70 := 3+a;


  ///3
 ///
 ///
 frmMain.nx71 := -4+a;
 frmMain.nx72 :=4+a;
 frmMain.nx73 := -4+a;
 frmMain.nx74 :=  4+a;
 frmMain.nx75 := -4+a;
 frmMain.nx76 := 4+a;
 frmMain.nx77 := -4+a;
 frmMain.nx78 := 4+a;
 frmMain.nx79 := -4+a;
 frmMain.nx80 := 4+a;
 frmMain.nx81 := -4+a;
 frmMain.nx82 := 4+a;
 frmMain.nx83 := -4+a;
 frmMain.nx84 := 4+a;
 frmMain.nx85 := -4+a;
 frmMain.nx86 := 4+a;
 frmMain.nx87 := -4+a;
 frmMain.nx88 := 4+a;
 frmMain.nx89 := -4+a;
 frmMain.nx90 := -2+a;

frmMain.nx94 :=0+a;
frmMain.nx95 :=-2+a;  //цифры
frmMain.nx96 :=-4+a;  //цифры
frmMain.nx97 :=-6+a;  //цифры
frmMain.nx98 := 2+a;  //цифры
frmMain.nx99 := 4+a;  //цифры
frmMain.nx100 := 6+a;  //цифры
frmMain.nx101 := 8+a;  //цифры
frmMain.nx102 := 10+a;  //цифры
frmMain.nx103 := 12+a;  //цифры

frmMain.nx104 := -8+a;  //буквы
frmMain.nx105 := -8+a;  //буквы
frmMain.nx106 := -8+a;  //буквы
frmMain.nx107 := -8+a;  //буквы
frmMain.nx108 := -8+a;  //буквы
frmMain.nx109 := -8+a;  //буквы
frmMain.nx110 := -8+a;  //буквы
frmMain.nx111 := -8+a;  //буквы
frmMain.nx112 := -8+a;  //буквы
frmMain.nx113 := -8+a;  //буквы

frmMain.nx114 := -6+a;  //корабль
frmMain.nx115 := 0+a;  //цифры
frmMain.nx116 :=-2+a;  //цифры
frmMain.nx117 :=-4+a;  //цифры
frmMain.nx118 :=-6+a;  //цифры
frmMain.nx119 := 2+a;  //цифры
frmMain.nx120 := 4+a;  //цифры
frmMain.nx121 := 6+a;  //цифры
frmMain.nx122 := 8+a;  //цифры
frmMain.nx123 := 10+a;  //цифры
frmMain.nx124 := 12+a;  //цифры
frmMain.nx125 := 0+a;
frmMain.nx126 := 0+a;
frmMain.nx127 := 0+a;
frmMain.nx128 := 2+a;
frmMain.nx129 := -2+a;
frmMain.nx130 := -4+a;
frmMain.nx131 := 4+a;
frmMain.nx132 := -6+a;
frmMain.nx133 := 6+a;
frmMain.nx134 := 8+a;
frmMain.nx135 := -8+a;
frmMain.nx136 := -2+a;
frmMain.nx137 := 2+a;
frmMain.nx138 := -4+a;
frmMain.nx139 := 4+a;
frmMain.nx140 := -2+a;
frmMain.nx141 := 2+a;
frmMain.nx142 := 0+a;
frmMain.nx143 := 2+a;
frmMain.nx144 := -2+a;
frmMain.nx145 := -4+a;
frmMain.nx146 := 4+a;
frmMain.nx147 := 6+a;
frmMain.nx148 := -6+a;
frmMain.nx149 := -6+a;
frmMain.nx150 := 6+a;
frmMain.nx151 := 2+a;
frmMain.nx152 := -2+a;
frmMain.nx153 := 2+a;
frmMain.nx154 := -2+a;
frmMain.nx155 := 0+a;
frmMain.nx156 := 0+a;
frmMain.nx157 := 4+a;
frmMain.nx158 := -4+a;
frmMain.nx159 := -6+a;
frmMain.nx160 := 6+a;
frmMain.nx161 := 4+a;
frmMain.nx162 := -4+a;
frmMain.nx163 := -6+a;
frmMain.nx164 := 6+a;
frmMain.nx165 := 4+a;
frmMain.nx166 := -4+a;
frmMain.nx167 := -6+a;
frmMain.nx168 := 6+a;
frmMain.nx169 := 4+a;
frmMain.nx170 := -4+a;
frmMain.nx171 := -6+a;
frmMain.nx172 := 6+a;
frmMain.nx173 := 4+a;
frmMain.nx174 := -4+a;
frmMain.nx175 := -6+a;
frmMain.nx176 := 6+a;
frmMain.nx177 := 4+a;
frmMain.nx178 := -4+a;
frmMain.nx179 := -6+a;
frmMain.nx180 := 6+a;
 frmMain.nx181 := 4+a;
 frmMain.nx182 := -4+a;
 frmMain.nx183 := -6+a;
 frmMain.nx184 := 6+a;
 frmMain.nx185 := 4+a;
 frmMain.nx186 := -4+a;
 frmMain.nx187 := -6+a;
 frmMain.nx188 := 6+a;
 frmMain.nx189 := -4+a;
 frmMain.nx190 := 4+a;
 frmMain.nx191 := -6+a;
 frmMain.nx192 := 6+a;
 frmMain.nx193 := -4+a;
 frmMain.nx194 := 4+a;
 frmMain.nx195 := -6+a;
 frmMain.nx196 := 6+a;
 frmMain.nx197 := -4+a;
 frmMain.nx198 := 4+a;
 frmMain.nx199 := -6+a;
 frmMain.nx200 := 6+a;
 frmMain.nx201 := -4+a;
 frmMain.nx202 := 4+a;
 frmMain.nx203 := -6+a;
 frmMain.nx204 := 6+a;
 frmMain.nx205 := 6+a;  //корабль
 frmMain.nx206 := 6+a;  //Подлодка
 frmMain.nx215 := -6+a;
 frmMain.frmGL.Width:=800;
 a:=0;
 frmMain.nz := 0+b;
  frmMain.nz1 := 0+b;
  frmMain.nz2 := 0+b;
 frmMain.nz3 := 1+b;
 frmMain.nz7 := 0+b;
 frmMain.nz8 := 2+b;
 frmMain.nz9 := 2+b;
  frmMain.nz10 := -2+b;
 frmMain.nz11 := -2+b;
 frmMain.nz12 := -2+b;
 frmMain.nz14 := -3+b;
 frmMain.nz15 := -3+b;
 frmMain.nz16 := -4+b;
 frmMain.nz17 := -4+b;
  frmMain.nz18 := -5+b;
 frmMain.nz19 := -5+b;
 frmMain.nz20 := -6+b;
 frmMain.nz21 := -7+b;
 frmMain.nz22 := -7+b;
  frmMain.nz23 := -8+b;
 frmMain.nz24 := -8+b;
  frmMain.nz25 := -9+b;
 frmMain.nz26 := -9+b;
 frmMain.nz27 := -10+b;
  frmMain.nz28 := -10+b;
  frmMain.nz29 := -11+b;
 frmMain.nz30 := -11+b;

// 1

 frmMain.nz31 := -2+b;
 frmMain.nz32 := -2+b;
 frmMain.nz33 := -3+b;
 frmMain.nz34 := -3+b;
 frmMain.nz35 := -4+b;
 frmMain.nz36 := -4+b;
  frmMain.nz37 := -5+b;
 frmMain.nz38 := -5+b;
 frmMain.nz39 := -6+b;
 frmMain.nz40 := -6+b;
 frmMain.nz41 := -7+b;
 frmMain.nz42 := -7+b;
 frmMain.nz43 := -8+b;
 frmMain.nz44 := -8+b;
 frmMain.nz45 := -9+b;  //////////////


 //////////////////////

 frmMain.nz46 := -9+b;
 frmMain.nz47 := -9+b;
 frmMain.nz48 := -10+b;
 frmMain.nz49 := -11+b;
 frmMain.nz50 := -11+b;
 frmMain.nz51 := -2+b;
 frmMain.nz52 :=-2+b;
 frmMain.nz53 := -3+b;
 frmMain.nz54 :=  3+b;
 frmMain.nz55 := -3+b;
 frmMain.nz56 := -4+b;
 frmMain.nz57 := -5+b;
 frmMain.nz58 := -5+b;
 frmMain.nz59 := -6+b;
 frmMain.nz60 := -6+b;
 frmMain.nz61 := -7+b;
 frmMain.nz62 := -7+b;
 frmMain.nz63 := -8+b;
 frmMain.nz64 := -8+b;
 frmMain.nz65 := -9+b;
 frmMain.nz66 := -9+b;
 frmMain.nz67 := -10+b;
 frmMain.nz68 := -10+b;
 frmMain.nz69 := -11+b;
 frmMain.nz70 := -11+b;


  ///3
 ///
 ///
 frmMain.nz71 := -2+b;
 frmMain.nz72 :=-2+b;
 frmMain.nz73 := -3+b;
 frmMain.nz74 :=  -3+b;
 frmMain.nz75 := -4+b;
 frmMain.nz76 := -4+b;
 frmMain.nz77 := -5+b;
 frmMain.nz78 := -5+b;
 frmMain.nz79 := -6+b;
 frmMain.nz80 := -6+b;
 frmMain.nz81 := -7+b;
 frmMain.nz82 := -7+b;
 frmMain.nz83 := -8+b;
 frmMain.nz84 := -8+b;
 frmMain.nz85 := -9+b;
 frmMain.nz86 := -9+b;
 frmMain.nz87 := -10+b;
 frmMain.nz88 := -10+b;
 frmMain.nz89 := -11+b;
 frmMain.nz90 := -2+b;

frmMain.nz94 :=1+b;
frmMain.nz95 :=1+b;  //цифры
frmMain.nz96 :=1+b;  //цифры
frmMain.nz97 :=1+b;  //цифры
frmMain.nz98 := 1+b;  //цифры
frmMain.nz99 := 1+b;  //цифры
frmMain.nz100 := 1+b;  //цифры
frmMain.nz101 := 1+b;  //цифры
frmMain.nz102 := 1+b;  //цифры
frmMain.nz103 := 1+b;  //цифры

frmMain.nz104 := -0+b;  //буквы
frmMain.nz105 := -2+b;  //буквы
frmMain.nz106 := -4+b;  //буквы
frmMain.nz107 := -6+b;  //буквы
frmMain.nz108 := -8+b;  //буквы
frmMain.nz109 := -10+b;  //буквы
frmMain.nz110 := -12+b;  //буквы
frmMain.nz111 := -14+b;  //буквы
frmMain.nz112 := -16+b;  //буквы
frmMain.nz113 := -18+b;  //буквы

frmMain.nz114 := -4+b;  //корабль
frmMain.nz115 := -18+b;  //цифры
frmMain.nz116 :=-18+b;  //цифры
frmMain.nz117 :=-18+b;  //цифры
frmMain.nz118 :=-18+b;  //цифры
frmMain.nz119 := -18+b;  //цифры
frmMain.nz120 := -18+b;  //цифры
frmMain.nz121 := -18+b;  //цифры
frmMain.nz122 := -18+b;  //цифры
frmMain.nz123 := -18+b;  //цифры
frmMain.nz124 := -18+b;  //цифры
frmMain.nz125 := -16+b;
frmMain.nz126 := -14+b;
frmMain.nz127 := -12+b;
frmMain.nz128 := -16+b;
frmMain.nz129 := -16+b;
frmMain.nz130 := -16+b;
frmMain.nz131 := -16+b;
frmMain.nz132 := -16+b;
frmMain.nz133 := -16+b;
frmMain.nz134 := -16+b;
frmMain.nz135 := -16+b;
frmMain.nz136 := -14+b;
frmMain.nz137 := -14+b;
frmMain.nz138 := -14+b;
frmMain.nz139 := -14+b;
frmMain.nz140 := -14+b;
frmMain.nz141 := -15+b;
frmMain.nz142 := -15+b;
frmMain.nz143 := -15+b;
frmMain.nz144 := -15+b;
frmMain.nz145 := -15+b;
frmMain.nz146 := -15+b;
frmMain.nz147 := -15+b;
frmMain.nz148 := -15+b;
frmMain.nz149 := -14+b;
frmMain.nz150 := -14+b;
frmMain.nz151 := -12+b;
frmMain.nz152 := -12+b;
frmMain.nz153 := -13+b;
frmMain.nz154 := -13+b;
frmMain.nz155 := -13+b;
frmMain.nz156 := -6+b;
frmMain.nz157 := -12+b;
frmMain.nz158 := -12+b;
frmMain.nz159 := -12+b;
frmMain.nz160 := -12+b;
frmMain.nz161 := -10+b;
frmMain.nz162 := -10+b;
frmMain.nz163 := -10+b;
frmMain.nz164 := -10+b;
frmMain.nz165 := -8+b;
frmMain.nz166 := -8+b;
frmMain.nz167 := -8+b;
frmMain.nz168 := -8+b;
frmMain.nz169 := -6+b;
frmMain.nz170 := -6+b;
frmMain.nz171 := -6+b;
frmMain.nz172 := -6+b;
frmMain.nz173 := -4+b;
frmMain.nz174 := -4+b;
frmMain.nz175 := -4+b;
frmMain.nz176 := -4+b;
frmMain.nz177 := -2+b;
frmMain.nz178 := -2+b;
frmMain.nz179 := -2+b;
frmMain.nz180 := -2+b;
 frmMain.nz181 := -3+b;
 frmMain.nz182 := -3+b;
 frmMain.nz183 := -3+b;
 frmMain.nz184 := -3+b;
 frmMain.nz185 := -5+b;
 frmMain.nz186 := -5+b;
 frmMain.nz187 := -5+b;
 frmMain.nz188 := -5+b;
 frmMain.nz189 := -7+b;
 frmMain.nz190 := -7+b;
 frmMain.nz191 := -7+b;
 frmMain.nz192 := -7+b;
 frmMain.nz193 := -9+b;
 frmMain.nz194 := -9+b;
 frmMain.nz195 := -9+b;
 frmMain.nz196 := -9+b;
 frmMain.nz197 := -11+b;
 frmMain.nz198 := -11+b;
 frmMain.nz199 := -11+b;
 frmMain.nz200 := -11+b;
 frmMain.nz201 := -13+b;
 frmMain.nz202 := -13+b;
 frmMain.nz203 := -13+b;
 frmMain.nz204 := -13+b;
 frmMain.nz205 := -4+b;  //корабль
 frmMain.nz206 := -8+b;  //Подлодка
 frmMain.nz215 := -12+b;
 frmMain.frmGL.Width:=800;
 b:=0;

 end;





 if (c=6) and (d=1) then
begin
StringGrid1.Cells[c,d]:='1';
a:=a-3;
b:=b+19;
frmMain.nx := 0+a;
  frmMain.nx1 := 0+a;
  frmMain.nx2 := 0+a;
 frmMain.nx3 := 0+a;
 frmMain.nx7 := -1+a;
 frmMain.nx8 := 1+a;
 frmMain.nx9 := -1+a;
  frmMain.nx10 := -2+a;
 frmMain.nx11 := -1+a;
 frmMain.nx12 := 1+a;
 frmMain.nx14 := 1+a;
 frmMain.nx15 := -1+a;
 frmMain.nx16 := -1+a;
 frmMain.nx17 := 1+a;
  frmMain.nx18 := -1+a;
 frmMain.nx19 := 1+a;
 frmMain.nx20 := -1+a;
 frmMain.nx21 := -1+a;
 frmMain.nx22 := 1+a;
  frmMain.nx23 := -1+a;
 frmMain.nx24 := 1+a;
  frmMain.nx25 := 1+a;
 frmMain.nx26 := -1+a;
 frmMain.nx27 := 1+a;
  frmMain.nx28 := -1+a;
  frmMain.nx29 := 1+a;
 frmMain.nx30 := -1+a;

// 1

 frmMain.nx31 := -2+a;
 frmMain.nx32 := 2+a;
 frmMain.nx33 := -2+a;
 frmMain.nx34 :=  2+a;
 frmMain.nx35 := -2+a;
 frmMain.nx36 := 2+a;
  frmMain.nx37 := -2+a;
 frmMain.nx38 := 2+a;
 frmMain.nx39 := -2+a;
 frmMain.nx40 := 2+a;
 frmMain.nx41 := -2+a;
 frmMain.nx42 := 2+a;
 frmMain.nx43 := -2+a;
 frmMain.nx44 := 2+a;
 frmMain.nx45 := -2+a;  //////////////


 //////////////////////

 frmMain.nx46 := -2+a;
 frmMain.nx47 := -2+a;
 frmMain.nx48 := 2+a;
 frmMain.nx49 := -2+a;
 frmMain.nx50 := 2+a;
 frmMain.nx51 := -3+a;
 frmMain.nx52 :=3+a;
 frmMain.nx53 := -3+a;
 frmMain.nx54 :=  3+a;
 frmMain.nx55 := -3+a;
 frmMain.nx56 := 3+a;
 frmMain.nx57 := -3+a;
 frmMain.nx58 := 3+a;
 frmMain.nx59 := -3+a;
 frmMain.nx60 := 3+a;
 frmMain.nx61 := -3+a;
 frmMain.nx62 := 3+a;
 frmMain.nx63 := -3+a;
 frmMain.nx64 := 3+a;
 frmMain.nx65 := -3+a;
 frmMain.nx66 := 3+a;
 frmMain.nx67 := -3+a;
 frmMain.nx68 := 3+a;
 frmMain.nx69 := -3+a;
 frmMain.nx70 := 3+a;


  ///3
 ///
 ///
 frmMain.nx71 := -4+a;
 frmMain.nx72 :=4+a;
 frmMain.nx73 := -4+a;
 frmMain.nx74 :=  4+a;
 frmMain.nx75 := -4+a;
 frmMain.nx76 := 4+a;
 frmMain.nx77 := -4+a;
 frmMain.nx78 := 4+a;
 frmMain.nx79 := -4+a;
 frmMain.nx80 := 4+a;
 frmMain.nx81 := -4+a;
 frmMain.nx82 := 4+a;
 frmMain.nx83 := -4+a;
 frmMain.nx84 := 4+a;
 frmMain.nx85 := -4+a;
 frmMain.nx86 := 4+a;
 frmMain.nx87 := -4+a;
 frmMain.nx88 := 4+a;
 frmMain.nx89 := -4+a;
 frmMain.nx90 := -2+a;

frmMain.nx94 :=0+a;
frmMain.nx95 :=-2+a;  //цифры
frmMain.nx96 :=-4+a;  //цифры
frmMain.nx97 :=-6+a;  //цифры
frmMain.nx98 := 2+a;  //цифры
frmMain.nx99 := 4+a;  //цифры
frmMain.nx100 := 6+a;  //цифры
frmMain.nx101 := 8+a;  //цифры
frmMain.nx102 := 10+a;  //цифры
frmMain.nx103 := 12+a;  //цифры

frmMain.nx104 := -8+a;  //буквы
frmMain.nx105 := -8+a;  //буквы
frmMain.nx106 := -8+a;  //буквы
frmMain.nx107 := -8+a;  //буквы
frmMain.nx108 := -8+a;  //буквы
frmMain.nx109 := -8+a;  //буквы
frmMain.nx110 := -8+a;  //буквы
frmMain.nx111 := -8+a;  //буквы
frmMain.nx112 := -8+a;  //буквы
frmMain.nx113 := -8+a;  //буквы

frmMain.nx114 := -6+a;  //корабль
frmMain.nx115 := 0+a;  //цифры
frmMain.nx116 :=-2+a;  //цифры
frmMain.nx117 :=-4+a;  //цифры
frmMain.nx118 :=-6+a;  //цифры
frmMain.nx119 := 2+a;  //цифры
frmMain.nx120 := 4+a;  //цифры
frmMain.nx121 := 6+a;  //цифры
frmMain.nx122 := 8+a;  //цифры
frmMain.nx123 := 10+a;  //цифры
frmMain.nx124 := 12+a;  //цифры
frmMain.nx125 := 0+a;
frmMain.nx126 := 0+a;
frmMain.nx127 := 0+a;
frmMain.nx128 := 2+a;
frmMain.nx129 := -2+a;
frmMain.nx130 := -4+a;
frmMain.nx131 := 4+a;
frmMain.nx132 := -6+a;
frmMain.nx133 := 6+a;
frmMain.nx134 := 8+a;
frmMain.nx135 := -8+a;
frmMain.nx136 := -2+a;
frmMain.nx137 := 2+a;
frmMain.nx138 := -4+a;
frmMain.nx139 := 4+a;
frmMain.nx140 := -2+a;
frmMain.nx141 := 2+a;
frmMain.nx142 := 0+a;
frmMain.nx143 := 2+a;
frmMain.nx144 := -2+a;
frmMain.nx145 := -4+a;
frmMain.nx146 := 4+a;
frmMain.nx147 := 6+a;
frmMain.nx148 := -6+a;
frmMain.nx149 := -6+a;
frmMain.nx150 := 6+a;
frmMain.nx151 := 2+a;
frmMain.nx152 := -2+a;
frmMain.nx153 := 2+a;
frmMain.nx154 := -2+a;
frmMain.nx155 := 0+a;
frmMain.nx156 := 0+a;
frmMain.nx157 := 4+a;
frmMain.nx158 := -4+a;
frmMain.nx159 := -6+a;
frmMain.nx160 := 6+a;
frmMain.nx161 := 4+a;
frmMain.nx162 := -4+a;
frmMain.nx163 := -6+a;
frmMain.nx164 := 6+a;
frmMain.nx165 := 4+a;
frmMain.nx166 := -4+a;
frmMain.nx167 := -6+a;
frmMain.nx168 := 6+a;
frmMain.nx169 := 4+a;
frmMain.nx170 := -4+a;
frmMain.nx171 := -6+a;
frmMain.nx172 := 6+a;
frmMain.nx173 := 4+a;
frmMain.nx174 := -4+a;
frmMain.nx175 := -6+a;
frmMain.nx176 := 6+a;
frmMain.nx177 := 4+a;
frmMain.nx178 := -4+a;
frmMain.nx179 := -6+a;
frmMain.nx180 := 6+a;
 frmMain.nx181 := 4+a;
 frmMain.nx182 := -4+a;
 frmMain.nx183 := -6+a;
 frmMain.nx184 := 6+a;
 frmMain.nx185 := 4+a;
 frmMain.nx186 := -4+a;
 frmMain.nx187 := -6+a;
 frmMain.nx188 := 6+a;
 frmMain.nx189 := -4+a;
 frmMain.nx190 := 4+a;
 frmMain.nx191 := -6+a;
 frmMain.nx192 := 6+a;
 frmMain.nx193 := -4+a;
 frmMain.nx194 := 4+a;
 frmMain.nx195 := -6+a;
 frmMain.nx196 := 6+a;
 frmMain.nx197 := -4+a;
 frmMain.nx198 := 4+a;
 frmMain.nx199 := -6+a;
 frmMain.nx200 := 6+a;
 frmMain.nx201 := -4+a;
 frmMain.nx202 := 4+a;
 frmMain.nx203 := -6+a;
 frmMain.nx204 := 6+a;
 frmMain.nx205 := 6+a;  //корабль
 frmMain.nx206 := 6+a;  //Подлодка
 frmMain.nx215 := -6+a;
 frmMain.frmGL.Width:=800;
 a:=0;
 frmMain.nz := 0+b;
  frmMain.nz1 := 0+b;
  frmMain.nz2 := 0+b;
 frmMain.nz3 := 1+b;
 frmMain.nz7 := 0+b;
 frmMain.nz8 := 2+b;
 frmMain.nz9 := 2+b;
  frmMain.nz10 := -2+b;
 frmMain.nz11 := -2+b;
 frmMain.nz12 := -2+b;
 frmMain.nz14 := -3+b;
 frmMain.nz15 := -3+b;
 frmMain.nz16 := -4+b;
 frmMain.nz17 := -4+b;
  frmMain.nz18 := -5+b;
 frmMain.nz19 := -5+b;
 frmMain.nz20 := -6+b;
 frmMain.nz21 := -7+b;
 frmMain.nz22 := -7+b;
  frmMain.nz23 := -8+b;
 frmMain.nz24 := -8+b;
  frmMain.nz25 := -9+b;
 frmMain.nz26 := -9+b;
 frmMain.nz27 := -10+b;
  frmMain.nz28 := -10+b;
  frmMain.nz29 := -11+b;
 frmMain.nz30 := -11+b;

// 1

 frmMain.nz31 := -2+b;
 frmMain.nz32 := -2+b;
 frmMain.nz33 := -3+b;
 frmMain.nz34 := -3+b;
 frmMain.nz35 := -4+b;
 frmMain.nz36 := -4+b;
  frmMain.nz37 := -5+b;
 frmMain.nz38 := -5+b;
 frmMain.nz39 := -6+b;
 frmMain.nz40 := -6+b;
 frmMain.nz41 := -7+b;
 frmMain.nz42 := -7+b;
 frmMain.nz43 := -8+b;
 frmMain.nz44 := -8+b;
 frmMain.nz45 := -9+b;  //////////////


 //////////////////////

 frmMain.nz46 := -9+b;
 frmMain.nz47 := -9+b;
 frmMain.nz48 := -10+b;
 frmMain.nz49 := -11+b;
 frmMain.nz50 := -11+b;
 frmMain.nz51 := -2+b;
 frmMain.nz52 :=-2+b;
 frmMain.nz53 := -3+b;
 frmMain.nz54 :=  3+b;
 frmMain.nz55 := -3+b;
 frmMain.nz56 := -4+b;
 frmMain.nz57 := -5+b;
 frmMain.nz58 := -5+b;
 frmMain.nz59 := -6+b;
 frmMain.nz60 := -6+b;
 frmMain.nz61 := -7+b;
 frmMain.nz62 := -7+b;
 frmMain.nz63 := -8+b;
 frmMain.nz64 := -8+b;
 frmMain.nz65 := -9+b;
 frmMain.nz66 := -9+b;
 frmMain.nz67 := -10+b;
 frmMain.nz68 := -10+b;
 frmMain.nz69 := -11+b;
 frmMain.nz70 := -11+b;


  ///3
 ///
 ///
 frmMain.nz71 := -2+b;
 frmMain.nz72 :=-2+b;
 frmMain.nz73 := -3+b;
 frmMain.nz74 :=  -3+b;
 frmMain.nz75 := -4+b;
 frmMain.nz76 := -4+b;
 frmMain.nz77 := -5+b;
 frmMain.nz78 := -5+b;
 frmMain.nz79 := -6+b;
 frmMain.nz80 := -6+b;
 frmMain.nz81 := -7+b;
 frmMain.nz82 := -7+b;
 frmMain.nz83 := -8+b;
 frmMain.nz84 := -8+b;
 frmMain.nz85 := -9+b;
 frmMain.nz86 := -9+b;
 frmMain.nz87 := -10+b;
 frmMain.nz88 := -10+b;
 frmMain.nz89 := -11+b;
 frmMain.nz90 := -2+b;

frmMain.nz94 :=1+b;
frmMain.nz95 :=1+b;  //цифры
frmMain.nz96 :=1+b;  //цифры
frmMain.nz97 :=1+b;  //цифры
frmMain.nz98 := 1+b;  //цифры
frmMain.nz99 := 1+b;  //цифры
frmMain.nz100 := 1+b;  //цифры
frmMain.nz101 := 1+b;  //цифры
frmMain.nz102 := 1+b;  //цифры
frmMain.nz103 := 1+b;  //цифры

frmMain.nz104 := -0+b;  //буквы
frmMain.nz105 := -2+b;  //буквы
frmMain.nz106 := -4+b;  //буквы
frmMain.nz107 := -6+b;  //буквы
frmMain.nz108 := -8+b;  //буквы
frmMain.nz109 := -10+b;  //буквы
frmMain.nz110 := -12+b;  //буквы
frmMain.nz111 := -14+b;  //буквы
frmMain.nz112 := -16+b;  //буквы
frmMain.nz113 := -18+b;  //буквы

frmMain.nz114 := -4+b;  //корабль
frmMain.nz115 := -18+b;  //цифры
frmMain.nz116 :=-18+b;  //цифры
frmMain.nz117 :=-18+b;  //цифры
frmMain.nz118 :=-18+b;  //цифры
frmMain.nz119 := -18+b;  //цифры
frmMain.nz120 := -18+b;  //цифры
frmMain.nz121 := -18+b;  //цифры
frmMain.nz122 := -18+b;  //цифры
frmMain.nz123 := -18+b;  //цифры
frmMain.nz124 := -18+b;  //цифры
frmMain.nz125 := -16+b;
frmMain.nz126 := -14+b;
frmMain.nz127 := -12+b;
frmMain.nz128 := -16+b;
frmMain.nz129 := -16+b;
frmMain.nz130 := -16+b;
frmMain.nz131 := -16+b;
frmMain.nz132 := -16+b;
frmMain.nz133 := -16+b;
frmMain.nz134 := -16+b;
frmMain.nz135 := -16+b;
frmMain.nz136 := -14+b;
frmMain.nz137 := -14+b;
frmMain.nz138 := -14+b;
frmMain.nz139 := -14+b;
frmMain.nz140 := -14+b;
frmMain.nz141 := -15+b;
frmMain.nz142 := -15+b;
frmMain.nz143 := -15+b;
frmMain.nz144 := -15+b;
frmMain.nz145 := -15+b;
frmMain.nz146 := -15+b;
frmMain.nz147 := -15+b;
frmMain.nz148 := -15+b;
frmMain.nz149 := -14+b;
frmMain.nz150 := -14+b;
frmMain.nz151 := -12+b;
frmMain.nz152 := -12+b;
frmMain.nz153 := -13+b;
frmMain.nz154 := -13+b;
frmMain.nz155 := -13+b;
frmMain.nz156 := -6+b;
frmMain.nz157 := -12+b;
frmMain.nz158 := -12+b;
frmMain.nz159 := -12+b;
frmMain.nz160 := -12+b;
frmMain.nz161 := -10+b;
frmMain.nz162 := -10+b;
frmMain.nz163 := -10+b;
frmMain.nz164 := -10+b;
frmMain.nz165 := -8+b;
frmMain.nz166 := -8+b;
frmMain.nz167 := -8+b;
frmMain.nz168 := -8+b;
frmMain.nz169 := -6+b;
frmMain.nz170 := -6+b;
frmMain.nz171 := -6+b;
frmMain.nz172 := -6+b;
frmMain.nz173 := -4+b;
frmMain.nz174 := -4+b;
frmMain.nz175 := -4+b;
frmMain.nz176 := -4+b;
frmMain.nz177 := -2+b;
frmMain.nz178 := -2+b;
frmMain.nz179 := -2+b;
frmMain.nz180 := -2+b;
 frmMain.nz181 := -3+b;
 frmMain.nz182 := -3+b;
 frmMain.nz183 := -3+b;
 frmMain.nz184 := -3+b;
 frmMain.nz185 := -5+b;
 frmMain.nz186 := -5+b;
 frmMain.nz187 := -5+b;
 frmMain.nz188 := -5+b;
 frmMain.nz189 := -7+b;
 frmMain.nz190 := -7+b;
 frmMain.nz191 := -7+b;
 frmMain.nz192 := -7+b;
 frmMain.nz193 := -9+b;
 frmMain.nz194 := -9+b;
 frmMain.nz195 := -9+b;
 frmMain.nz196 := -9+b;
 frmMain.nz197 := -11+b;
 frmMain.nz198 := -11+b;
 frmMain.nz199 := -11+b;
 frmMain.nz200 := -11+b;
 frmMain.nz201 := -13+b;
 frmMain.nz202 := -13+b;
 frmMain.nz203 := -13+b;
 frmMain.nz204 := -13+b;
 frmMain.nz205 := -4+b;  //корабль
 frmMain.nz206 := -8+b;  //Подлодка
 frmMain.nz215 := -12+b;
 frmMain.frmGL.Width:=800;
 b:=0;

 end;






  if (c=6) and (d=2) then
begin
StringGrid1.Cells[c,d]:='1';
a:=a-3;
b:=b+17;
frmMain.nx := 0+a;
  frmMain.nx1 := 0+a;
  frmMain.nx2 := 0+a;
 frmMain.nx3 := 0+a;
 frmMain.nx7 := -1+a;
 frmMain.nx8 := 1+a;
 frmMain.nx9 := -1+a;
  frmMain.nx10 := -2+a;
 frmMain.nx11 := -1+a;
 frmMain.nx12 := 1+a;
 frmMain.nx14 := 1+a;
 frmMain.nx15 := -1+a;
 frmMain.nx16 := -1+a;
 frmMain.nx17 := 1+a;
  frmMain.nx18 := -1+a;
 frmMain.nx19 := 1+a;
 frmMain.nx20 := -1+a;
 frmMain.nx21 := -1+a;
 frmMain.nx22 := 1+a;
  frmMain.nx23 := -1+a;
 frmMain.nx24 := 1+a;
  frmMain.nx25 := 1+a;
 frmMain.nx26 := -1+a;
 frmMain.nx27 := 1+a;
  frmMain.nx28 := -1+a;
  frmMain.nx29 := 1+a;
 frmMain.nx30 := -1+a;

// 1

 frmMain.nx31 := -2+a;
 frmMain.nx32 := 2+a;
 frmMain.nx33 := -2+a;
 frmMain.nx34 :=  2+a;
 frmMain.nx35 := -2+a;
 frmMain.nx36 := 2+a;
  frmMain.nx37 := -2+a;
 frmMain.nx38 := 2+a;
 frmMain.nx39 := -2+a;
 frmMain.nx40 := 2+a;
 frmMain.nx41 := -2+a;
 frmMain.nx42 := 2+a;
 frmMain.nx43 := -2+a;
 frmMain.nx44 := 2+a;
 frmMain.nx45 := -2+a;  //////////////


 //////////////////////

 frmMain.nx46 := -2+a;
 frmMain.nx47 := -2+a;
 frmMain.nx48 := 2+a;
 frmMain.nx49 := -2+a;
 frmMain.nx50 := 2+a;
 frmMain.nx51 := -3+a;
 frmMain.nx52 :=3+a;
 frmMain.nx53 := -3+a;
 frmMain.nx54 :=  3+a;
 frmMain.nx55 := -3+a;
 frmMain.nx56 := 3+a;
 frmMain.nx57 := -3+a;
 frmMain.nx58 := 3+a;
 frmMain.nx59 := -3+a;
 frmMain.nx60 := 3+a;
 frmMain.nx61 := -3+a;
 frmMain.nx62 := 3+a;
 frmMain.nx63 := -3+a;
 frmMain.nx64 := 3+a;
 frmMain.nx65 := -3+a;
 frmMain.nx66 := 3+a;
 frmMain.nx67 := -3+a;
 frmMain.nx68 := 3+a;
 frmMain.nx69 := -3+a;
 frmMain.nx70 := 3+a;


  ///3
 ///
 ///
 frmMain.nx71 := -4+a;
 frmMain.nx72 :=4+a;
 frmMain.nx73 := -4+a;
 frmMain.nx74 :=  4+a;
 frmMain.nx75 := -4+a;
 frmMain.nx76 := 4+a;
 frmMain.nx77 := -4+a;
 frmMain.nx78 := 4+a;
 frmMain.nx79 := -4+a;
 frmMain.nx80 := 4+a;
 frmMain.nx81 := -4+a;
 frmMain.nx82 := 4+a;
 frmMain.nx83 := -4+a;
 frmMain.nx84 := 4+a;
 frmMain.nx85 := -4+a;
 frmMain.nx86 := 4+a;
 frmMain.nx87 := -4+a;
 frmMain.nx88 := 4+a;
 frmMain.nx89 := -4+a;
 frmMain.nx90 := -2+a;

frmMain.nx94 :=0+a;
frmMain.nx95 :=-2+a;  //цифры
frmMain.nx96 :=-4+a;  //цифры
frmMain.nx97 :=-6+a;  //цифры
frmMain.nx98 := 2+a;  //цифры
frmMain.nx99 := 4+a;  //цифры
frmMain.nx100 := 6+a;  //цифры
frmMain.nx101 := 8+a;  //цифры
frmMain.nx102 := 10+a;  //цифры
frmMain.nx103 := 12+a;  //цифры

frmMain.nx104 := -8+a;  //буквы
frmMain.nx105 := -8+a;  //буквы
frmMain.nx106 := -8+a;  //буквы
frmMain.nx107 := -8+a;  //буквы
frmMain.nx108 := -8+a;  //буквы
frmMain.nx109 := -8+a;  //буквы
frmMain.nx110 := -8+a;  //буквы
frmMain.nx111 := -8+a;  //буквы
frmMain.nx112 := -8+a;  //буквы
frmMain.nx113 := -8+a;  //буквы

frmMain.nx114 := -6+a;  //корабль
frmMain.nx115 := 0+a;  //цифры
frmMain.nx116 :=-2+a;  //цифры
frmMain.nx117 :=-4+a;  //цифры
frmMain.nx118 :=-6+a;  //цифры
frmMain.nx119 := 2+a;  //цифры
frmMain.nx120 := 4+a;  //цифры
frmMain.nx121 := 6+a;  //цифры
frmMain.nx122 := 8+a;  //цифры
frmMain.nx123 := 10+a;  //цифры
frmMain.nx124 := 12+a;  //цифры
frmMain.nx125 := 0+a;
frmMain.nx126 := 0+a;
frmMain.nx127 := 0+a;
frmMain.nx128 := 2+a;
frmMain.nx129 := -2+a;
frmMain.nx130 := -4+a;
frmMain.nx131 := 4+a;
frmMain.nx132 := -6+a;
frmMain.nx133 := 6+a;
frmMain.nx134 := 8+a;
frmMain.nx135 := -8+a;
frmMain.nx136 := -2+a;
frmMain.nx137 := 2+a;
frmMain.nx138 := -4+a;
frmMain.nx139 := 4+a;
frmMain.nx140 := -2+a;
frmMain.nx141 := 2+a;
frmMain.nx142 := 0+a;
frmMain.nx143 := 2+a;
frmMain.nx144 := -2+a;
frmMain.nx145 := -4+a;
frmMain.nx146 := 4+a;
frmMain.nx147 := 6+a;
frmMain.nx148 := -6+a;
frmMain.nx149 := -6+a;
frmMain.nx150 := 6+a;
frmMain.nx151 := 2+a;
frmMain.nx152 := -2+a;
frmMain.nx153 := 2+a;
frmMain.nx154 := -2+a;
frmMain.nx155 := 0+a;
frmMain.nx156 := 0+a;
frmMain.nx157 := 4+a;
frmMain.nx158 := -4+a;
frmMain.nx159 := -6+a;
frmMain.nx160 := 6+a;
frmMain.nx161 := 4+a;
frmMain.nx162 := -4+a;
frmMain.nx163 := -6+a;
frmMain.nx164 := 6+a;
frmMain.nx165 := 4+a;
frmMain.nx166 := -4+a;
frmMain.nx167 := -6+a;
frmMain.nx168 := 6+a;
frmMain.nx169 := 4+a;
frmMain.nx170 := -4+a;
frmMain.nx171 := -6+a;
frmMain.nx172 := 6+a;
frmMain.nx173 := 4+a;
frmMain.nx174 := -4+a;
frmMain.nx175 := -6+a;
frmMain.nx176 := 6+a;
frmMain.nx177 := 4+a;
frmMain.nx178 := -4+a;
frmMain.nx179 := -6+a;
frmMain.nx180 := 6+a;
 frmMain.nx181 := 4+a;
 frmMain.nx182 := -4+a;
 frmMain.nx183 := -6+a;
 frmMain.nx184 := 6+a;
 frmMain.nx185 := 4+a;
 frmMain.nx186 := -4+a;
 frmMain.nx187 := -6+a;
 frmMain.nx188 := 6+a;
 frmMain.nx189 := -4+a;
 frmMain.nx190 := 4+a;
 frmMain.nx191 := -6+a;
 frmMain.nx192 := 6+a;
 frmMain.nx193 := -4+a;
 frmMain.nx194 := 4+a;
 frmMain.nx195 := -6+a;
 frmMain.nx196 := 6+a;
 frmMain.nx197 := -4+a;
 frmMain.nx198 := 4+a;
 frmMain.nx199 := -6+a;
 frmMain.nx200 := 6+a;
 frmMain.nx201 := -4+a;
 frmMain.nx202 := 4+a;
 frmMain.nx203 := -6+a;
 frmMain.nx204 := 6+a;
 frmMain.nx205 := 6+a;  //корабль
 frmMain.nx206 := 6+a;  //Подлодка
 frmMain.nx215 := -6+a;
 frmMain.frmGL.Width:=800;
 a:=0;
 frmMain.nz := 0+b;
  frmMain.nz1 := 0+b;
  frmMain.nz2 := 0+b;
 frmMain.nz3 := 1+b;
 frmMain.nz7 := 0+b;
 frmMain.nz8 := 2+b;
 frmMain.nz9 := 2+b;
  frmMain.nz10 := -2+b;
 frmMain.nz11 := -2+b;
 frmMain.nz12 := -2+b;
 frmMain.nz14 := -3+b;
 frmMain.nz15 := -3+b;
 frmMain.nz16 := -4+b;
 frmMain.nz17 := -4+b;
  frmMain.nz18 := -5+b;
 frmMain.nz19 := -5+b;
 frmMain.nz20 := -6+b;
 frmMain.nz21 := -7+b;
 frmMain.nz22 := -7+b;
  frmMain.nz23 := -8+b;
 frmMain.nz24 := -8+b;
  frmMain.nz25 := -9+b;
 frmMain.nz26 := -9+b;
 frmMain.nz27 := -10+b;
  frmMain.nz28 := -10+b;
  frmMain.nz29 := -11+b;
 frmMain.nz30 := -11+b;

// 1

 frmMain.nz31 := -2+b;
 frmMain.nz32 := -2+b;
 frmMain.nz33 := -3+b;
 frmMain.nz34 := -3+b;
 frmMain.nz35 := -4+b;
 frmMain.nz36 := -4+b;
  frmMain.nz37 := -5+b;
 frmMain.nz38 := -5+b;
 frmMain.nz39 := -6+b;
 frmMain.nz40 := -6+b;
 frmMain.nz41 := -7+b;
 frmMain.nz42 := -7+b;
 frmMain.nz43 := -8+b;
 frmMain.nz44 := -8+b;
 frmMain.nz45 := -9+b;  //////////////


 //////////////////////

 frmMain.nz46 := -9+b;
 frmMain.nz47 := -9+b;
 frmMain.nz48 := -10+b;
 frmMain.nz49 := -11+b;
 frmMain.nz50 := -11+b;
 frmMain.nz51 := -2+b;
 frmMain.nz52 :=-2+b;
 frmMain.nz53 := -3+b;
 frmMain.nz54 :=  3+b;
 frmMain.nz55 := -3+b;
 frmMain.nz56 := -4+b;
 frmMain.nz57 := -5+b;
 frmMain.nz58 := -5+b;
 frmMain.nz59 := -6+b;
 frmMain.nz60 := -6+b;
 frmMain.nz61 := -7+b;
 frmMain.nz62 := -7+b;
 frmMain.nz63 := -8+b;
 frmMain.nz64 := -8+b;
 frmMain.nz65 := -9+b;
 frmMain.nz66 := -9+b;
 frmMain.nz67 := -10+b;
 frmMain.nz68 := -10+b;
 frmMain.nz69 := -11+b;
 frmMain.nz70 := -11+b;


  ///3
 ///
 ///
 frmMain.nz71 := -2+b;
 frmMain.nz72 :=-2+b;
 frmMain.nz73 := -3+b;
 frmMain.nz74 :=  -3+b;
 frmMain.nz75 := -4+b;
 frmMain.nz76 := -4+b;
 frmMain.nz77 := -5+b;
 frmMain.nz78 := -5+b;
 frmMain.nz79 := -6+b;
 frmMain.nz80 := -6+b;
 frmMain.nz81 := -7+b;
 frmMain.nz82 := -7+b;
 frmMain.nz83 := -8+b;
 frmMain.nz84 := -8+b;
 frmMain.nz85 := -9+b;
 frmMain.nz86 := -9+b;
 frmMain.nz87 := -10+b;
 frmMain.nz88 := -10+b;
 frmMain.nz89 := -11+b;
 frmMain.nz90 := -2+b;

frmMain.nz94 :=1+b;
frmMain.nz95 :=1+b;  //цифры
frmMain.nz96 :=1+b;  //цифры
frmMain.nz97 :=1+b;  //цифры
frmMain.nz98 := 1+b;  //цифры
frmMain.nz99 := 1+b;  //цифры
frmMain.nz100 := 1+b;  //цифры
frmMain.nz101 := 1+b;  //цифры
frmMain.nz102 := 1+b;  //цифры
frmMain.nz103 := 1+b;  //цифры

frmMain.nz104 := -0+b;  //буквы
frmMain.nz105 := -2+b;  //буквы
frmMain.nz106 := -4+b;  //буквы
frmMain.nz107 := -6+b;  //буквы
frmMain.nz108 := -8+b;  //буквы
frmMain.nz109 := -10+b;  //буквы
frmMain.nz110 := -12+b;  //буквы
frmMain.nz111 := -14+b;  //буквы
frmMain.nz112 := -16+b;  //буквы
frmMain.nz113 := -18+b;  //буквы

frmMain.nz114 := -4+b;  //корабль
frmMain.nz115 := -18+b;  //цифры
frmMain.nz116 :=-18+b;  //цифры
frmMain.nz117 :=-18+b;  //цифры
frmMain.nz118 :=-18+b;  //цифры
frmMain.nz119 := -18+b;  //цифры
frmMain.nz120 := -18+b;  //цифры
frmMain.nz121 := -18+b;  //цифры
frmMain.nz122 := -18+b;  //цифры
frmMain.nz123 := -18+b;  //цифры
frmMain.nz124 := -18+b;  //цифры
frmMain.nz125 := -16+b;
frmMain.nz126 := -14+b;
frmMain.nz127 := -12+b;
frmMain.nz128 := -16+b;
frmMain.nz129 := -16+b;
frmMain.nz130 := -16+b;
frmMain.nz131 := -16+b;
frmMain.nz132 := -16+b;
frmMain.nz133 := -16+b;
frmMain.nz134 := -16+b;
frmMain.nz135 := -16+b;
frmMain.nz136 := -14+b;
frmMain.nz137 := -14+b;
frmMain.nz138 := -14+b;
frmMain.nz139 := -14+b;
frmMain.nz140 := -14+b;
frmMain.nz141 := -15+b;
frmMain.nz142 := -15+b;
frmMain.nz143 := -15+b;
frmMain.nz144 := -15+b;
frmMain.nz145 := -15+b;
frmMain.nz146 := -15+b;
frmMain.nz147 := -15+b;
frmMain.nz148 := -15+b;
frmMain.nz149 := -14+b;
frmMain.nz150 := -14+b;
frmMain.nz151 := -12+b;
frmMain.nz152 := -12+b;
frmMain.nz153 := -13+b;
frmMain.nz154 := -13+b;
frmMain.nz155 := -13+b;
frmMain.nz156 := -6+b;
frmMain.nz157 := -12+b;
frmMain.nz158 := -12+b;
frmMain.nz159 := -12+b;
frmMain.nz160 := -12+b;
frmMain.nz161 := -10+b;
frmMain.nz162 := -10+b;
frmMain.nz163 := -10+b;
frmMain.nz164 := -10+b;
frmMain.nz165 := -8+b;
frmMain.nz166 := -8+b;
frmMain.nz167 := -8+b;
frmMain.nz168 := -8+b;
frmMain.nz169 := -6+b;
frmMain.nz170 := -6+b;
frmMain.nz171 := -6+b;
frmMain.nz172 := -6+b;
frmMain.nz173 := -4+b;
frmMain.nz174 := -4+b;
frmMain.nz175 := -4+b;
frmMain.nz176 := -4+b;
frmMain.nz177 := -2+b;
frmMain.nz178 := -2+b;
frmMain.nz179 := -2+b;
frmMain.nz180 := -2+b;
 frmMain.nz181 := -3+b;
 frmMain.nz182 := -3+b;
 frmMain.nz183 := -3+b;
 frmMain.nz184 := -3+b;
 frmMain.nz185 := -5+b;
 frmMain.nz186 := -5+b;
 frmMain.nz187 := -5+b;
 frmMain.nz188 := -5+b;
 frmMain.nz189 := -7+b;
 frmMain.nz190 := -7+b;
 frmMain.nz191 := -7+b;
 frmMain.nz192 := -7+b;
 frmMain.nz193 := -9+b;
 frmMain.nz194 := -9+b;
 frmMain.nz195 := -9+b;
 frmMain.nz196 := -9+b;
 frmMain.nz197 := -11+b;
 frmMain.nz198 := -11+b;
 frmMain.nz199 := -11+b;
 frmMain.nz200 := -11+b;
 frmMain.nz201 := -13+b;
 frmMain.nz202 := -13+b;
 frmMain.nz203 := -13+b;
 frmMain.nz204 := -13+b;
 frmMain.nz205 := -4+b;  //корабль
 frmMain.nz206 := -8+b;  //Подлодка
 frmMain.nz215 := -12+b;
 frmMain.frmGL.Width:=800;
 b:=0;

 end;






 if (c=6) and (d=3) then
begin
StringGrid1.Cells[c,d]:='1';
a:=a-3;
b:=b+15;
frmMain.nx := 0+a;
  frmMain.nx1 := 0+a;
  frmMain.nx2 := 0+a;
 frmMain.nx3 := 0+a;
 frmMain.nx7 := -1+a;
 frmMain.nx8 := 1+a;
 frmMain.nx9 := -1+a;
  frmMain.nx10 := -2+a;
 frmMain.nx11 := -1+a;
 frmMain.nx12 := 1+a;
 frmMain.nx14 := 1+a;
 frmMain.nx15 := -1+a;
 frmMain.nx16 := -1+a;
 frmMain.nx17 := 1+a;
  frmMain.nx18 := -1+a;
 frmMain.nx19 := 1+a;
 frmMain.nx20 := -1+a;
 frmMain.nx21 := -1+a;
 frmMain.nx22 := 1+a;
  frmMain.nx23 := -1+a;
 frmMain.nx24 := 1+a;
  frmMain.nx25 := 1+a;
 frmMain.nx26 := -1+a;
 frmMain.nx27 := 1+a;
  frmMain.nx28 := -1+a;
  frmMain.nx29 := 1+a;
 frmMain.nx30 := -1+a;

// 1

 frmMain.nx31 := -2+a;
 frmMain.nx32 := 2+a;
 frmMain.nx33 := -2+a;
 frmMain.nx34 :=  2+a;
 frmMain.nx35 := -2+a;
 frmMain.nx36 := 2+a;
  frmMain.nx37 := -2+a;
 frmMain.nx38 := 2+a;
 frmMain.nx39 := -2+a;
 frmMain.nx40 := 2+a;
 frmMain.nx41 := -2+a;
 frmMain.nx42 := 2+a;
 frmMain.nx43 := -2+a;
 frmMain.nx44 := 2+a;
 frmMain.nx45 := -2+a;  //////////////


 //////////////////////

 frmMain.nx46 := -2+a;
 frmMain.nx47 := -2+a;
 frmMain.nx48 := 2+a;
 frmMain.nx49 := -2+a;
 frmMain.nx50 := 2+a;
 frmMain.nx51 := -3+a;
 frmMain.nx52 :=3+a;
 frmMain.nx53 := -3+a;
 frmMain.nx54 :=  3+a;
 frmMain.nx55 := -3+a;
 frmMain.nx56 := 3+a;
 frmMain.nx57 := -3+a;
 frmMain.nx58 := 3+a;
 frmMain.nx59 := -3+a;
 frmMain.nx60 := 3+a;
 frmMain.nx61 := -3+a;
 frmMain.nx62 := 3+a;
 frmMain.nx63 := -3+a;
 frmMain.nx64 := 3+a;
 frmMain.nx65 := -3+a;
 frmMain.nx66 := 3+a;
 frmMain.nx67 := -3+a;
 frmMain.nx68 := 3+a;
 frmMain.nx69 := -3+a;
 frmMain.nx70 := 3+a;


  ///3
 ///
 ///
 frmMain.nx71 := -4+a;
 frmMain.nx72 :=4+a;
 frmMain.nx73 := -4+a;
 frmMain.nx74 :=  4+a;
 frmMain.nx75 := -4+a;
 frmMain.nx76 := 4+a;
 frmMain.nx77 := -4+a;
 frmMain.nx78 := 4+a;
 frmMain.nx79 := -4+a;
 frmMain.nx80 := 4+a;
 frmMain.nx81 := -4+a;
 frmMain.nx82 := 4+a;
 frmMain.nx83 := -4+a;
 frmMain.nx84 := 4+a;
 frmMain.nx85 := -4+a;
 frmMain.nx86 := 4+a;
 frmMain.nx87 := -4+a;
 frmMain.nx88 := 4+a;
 frmMain.nx89 := -4+a;
 frmMain.nx90 := -2+a;

frmMain.nx94 :=0+a;
frmMain.nx95 :=-2+a;  //цифры
frmMain.nx96 :=-4+a;  //цифры
frmMain.nx97 :=-6+a;  //цифры
frmMain.nx98 := 2+a;  //цифры
frmMain.nx99 := 4+a;  //цифры
frmMain.nx100 := 6+a;  //цифры
frmMain.nx101 := 8+a;  //цифры
frmMain.nx102 := 10+a;  //цифры
frmMain.nx103 := 12+a;  //цифры

frmMain.nx104 := -8+a;  //буквы
frmMain.nx105 := -8+a;  //буквы
frmMain.nx106 := -8+a;  //буквы
frmMain.nx107 := -8+a;  //буквы
frmMain.nx108 := -8+a;  //буквы
frmMain.nx109 := -8+a;  //буквы
frmMain.nx110 := -8+a;  //буквы
frmMain.nx111 := -8+a;  //буквы
frmMain.nx112 := -8+a;  //буквы
frmMain.nx113 := -8+a;  //буквы

frmMain.nx114 := -6+a;  //корабль
frmMain.nx115 := 0+a;  //цифры
frmMain.nx116 :=-2+a;  //цифры
frmMain.nx117 :=-4+a;  //цифры
frmMain.nx118 :=-6+a;  //цифры
frmMain.nx119 := 2+a;  //цифры
frmMain.nx120 := 4+a;  //цифры
frmMain.nx121 := 6+a;  //цифры
frmMain.nx122 := 8+a;  //цифры
frmMain.nx123 := 10+a;  //цифры
frmMain.nx124 := 12+a;  //цифры
frmMain.nx125 := 0+a;
frmMain.nx126 := 0+a;
frmMain.nx127 := 0+a;
frmMain.nx128 := 2+a;
frmMain.nx129 := -2+a;
frmMain.nx130 := -4+a;
frmMain.nx131 := 4+a;
frmMain.nx132 := -6+a;
frmMain.nx133 := 6+a;
frmMain.nx134 := 8+a;
frmMain.nx135 := -8+a;
frmMain.nx136 := -2+a;
frmMain.nx137 := 2+a;
frmMain.nx138 := -4+a;
frmMain.nx139 := 4+a;
frmMain.nx140 := -2+a;
frmMain.nx141 := 2+a;
frmMain.nx142 := 0+a;
frmMain.nx143 := 2+a;
frmMain.nx144 := -2+a;
frmMain.nx145 := -4+a;
frmMain.nx146 := 4+a;
frmMain.nx147 := 6+a;
frmMain.nx148 := -6+a;
frmMain.nx149 := -6+a;
frmMain.nx150 := 6+a;
frmMain.nx151 := 2+a;
frmMain.nx152 := -2+a;
frmMain.nx153 := 2+a;
frmMain.nx154 := -2+a;
frmMain.nx155 := 0+a;
frmMain.nx156 := 0+a;
frmMain.nx157 := 4+a;
frmMain.nx158 := -4+a;
frmMain.nx159 := -6+a;
frmMain.nx160 := 6+a;
frmMain.nx161 := 4+a;
frmMain.nx162 := -4+a;
frmMain.nx163 := -6+a;
frmMain.nx164 := 6+a;
frmMain.nx165 := 4+a;
frmMain.nx166 := -4+a;
frmMain.nx167 := -6+a;
frmMain.nx168 := 6+a;
frmMain.nx169 := 4+a;
frmMain.nx170 := -4+a;
frmMain.nx171 := -6+a;
frmMain.nx172 := 6+a;
frmMain.nx173 := 4+a;
frmMain.nx174 := -4+a;
frmMain.nx175 := -6+a;
frmMain.nx176 := 6+a;
frmMain.nx177 := 4+a;
frmMain.nx178 := -4+a;
frmMain.nx179 := -6+a;
frmMain.nx180 := 6+a;
 frmMain.nx181 := 4+a;
 frmMain.nx182 := -4+a;
 frmMain.nx183 := -6+a;
 frmMain.nx184 := 6+a;
 frmMain.nx185 := 4+a;
 frmMain.nx186 := -4+a;
 frmMain.nx187 := -6+a;
 frmMain.nx188 := 6+a;
 frmMain.nx189 := -4+a;
 frmMain.nx190 := 4+a;
 frmMain.nx191 := -6+a;
 frmMain.nx192 := 6+a;
 frmMain.nx193 := -4+a;
 frmMain.nx194 := 4+a;
 frmMain.nx195 := -6+a;
 frmMain.nx196 := 6+a;
 frmMain.nx197 := -4+a;
 frmMain.nx198 := 4+a;
 frmMain.nx199 := -6+a;
 frmMain.nx200 := 6+a;
 frmMain.nx201 := -4+a;
 frmMain.nx202 := 4+a;
 frmMain.nx203 := -6+a;
 frmMain.nx204 := 6+a;
 frmMain.nx205 := 6+a;  //корабль
 frmMain.nx206 := 6+a;  //Подлодка
 frmMain.nx215 := -6+a;
 frmMain.frmGL.Width:=800;
 a:=0;
 frmMain.nz := 0+b;
  frmMain.nz1 := 0+b;
  frmMain.nz2 := 0+b;
 frmMain.nz3 := 1+b;
 frmMain.nz7 := 0+b;
 frmMain.nz8 := 2+b;
 frmMain.nz9 := 2+b;
  frmMain.nz10 := -2+b;
 frmMain.nz11 := -2+b;
 frmMain.nz12 := -2+b;
 frmMain.nz14 := -3+b;
 frmMain.nz15 := -3+b;
 frmMain.nz16 := -4+b;
 frmMain.nz17 := -4+b;
  frmMain.nz18 := -5+b;
 frmMain.nz19 := -5+b;
 frmMain.nz20 := -6+b;
 frmMain.nz21 := -7+b;
 frmMain.nz22 := -7+b;
  frmMain.nz23 := -8+b;
 frmMain.nz24 := -8+b;
  frmMain.nz25 := -9+b;
 frmMain.nz26 := -9+b;
 frmMain.nz27 := -10+b;
  frmMain.nz28 := -10+b;
  frmMain.nz29 := -11+b;
 frmMain.nz30 := -11+b;

// 1

 frmMain.nz31 := -2+b;
 frmMain.nz32 := -2+b;
 frmMain.nz33 := -3+b;
 frmMain.nz34 := -3+b;
 frmMain.nz35 := -4+b;
 frmMain.nz36 := -4+b;
  frmMain.nz37 := -5+b;
 frmMain.nz38 := -5+b;
 frmMain.nz39 := -6+b;
 frmMain.nz40 := -6+b;
 frmMain.nz41 := -7+b;
 frmMain.nz42 := -7+b;
 frmMain.nz43 := -8+b;
 frmMain.nz44 := -8+b;
 frmMain.nz45 := -9+b;  //////////////


 //////////////////////

 frmMain.nz46 := -9+b;
 frmMain.nz47 := -9+b;
 frmMain.nz48 := -10+b;
 frmMain.nz49 := -11+b;
 frmMain.nz50 := -11+b;
 frmMain.nz51 := -2+b;
 frmMain.nz52 :=-2+b;
 frmMain.nz53 := -3+b;
 frmMain.nz54 :=  3+b;
 frmMain.nz55 := -3+b;
 frmMain.nz56 := -4+b;
 frmMain.nz57 := -5+b;
 frmMain.nz58 := -5+b;
 frmMain.nz59 := -6+b;
 frmMain.nz60 := -6+b;
 frmMain.nz61 := -7+b;
 frmMain.nz62 := -7+b;
 frmMain.nz63 := -8+b;
 frmMain.nz64 := -8+b;
 frmMain.nz65 := -9+b;
 frmMain.nz66 := -9+b;
 frmMain.nz67 := -10+b;
 frmMain.nz68 := -10+b;
 frmMain.nz69 := -11+b;
 frmMain.nz70 := -11+b;


  ///3
 ///
 ///
 frmMain.nz71 := -2+b;
 frmMain.nz72 :=-2+b;
 frmMain.nz73 := -3+b;
 frmMain.nz74 :=  -3+b;
 frmMain.nz75 := -4+b;
 frmMain.nz76 := -4+b;
 frmMain.nz77 := -5+b;
 frmMain.nz78 := -5+b;
 frmMain.nz79 := -6+b;
 frmMain.nz80 := -6+b;
 frmMain.nz81 := -7+b;
 frmMain.nz82 := -7+b;
 frmMain.nz83 := -8+b;
 frmMain.nz84 := -8+b;
 frmMain.nz85 := -9+b;
 frmMain.nz86 := -9+b;
 frmMain.nz87 := -10+b;
 frmMain.nz88 := -10+b;
 frmMain.nz89 := -11+b;
 frmMain.nz90 := -2+b;

frmMain.nz94 :=1+b;
frmMain.nz95 :=1+b;  //цифры
frmMain.nz96 :=1+b;  //цифры
frmMain.nz97 :=1+b;  //цифры
frmMain.nz98 := 1+b;  //цифры
frmMain.nz99 := 1+b;  //цифры
frmMain.nz100 := 1+b;  //цифры
frmMain.nz101 := 1+b;  //цифры
frmMain.nz102 := 1+b;  //цифры
frmMain.nz103 := 1+b;  //цифры

frmMain.nz104 := -0+b;  //буквы
frmMain.nz105 := -2+b;  //буквы
frmMain.nz106 := -4+b;  //буквы
frmMain.nz107 := -6+b;  //буквы
frmMain.nz108 := -8+b;  //буквы
frmMain.nz109 := -10+b;  //буквы
frmMain.nz110 := -12+b;  //буквы
frmMain.nz111 := -14+b;  //буквы
frmMain.nz112 := -16+b;  //буквы
frmMain.nz113 := -18+b;  //буквы

frmMain.nz114 := -4+b;  //корабль
frmMain.nz115 := -18+b;  //цифры
frmMain.nz116 :=-18+b;  //цифры
frmMain.nz117 :=-18+b;  //цифры
frmMain.nz118 :=-18+b;  //цифры
frmMain.nz119 := -18+b;  //цифры
frmMain.nz120 := -18+b;  //цифры
frmMain.nz121 := -18+b;  //цифры
frmMain.nz122 := -18+b;  //цифры
frmMain.nz123 := -18+b;  //цифры
frmMain.nz124 := -18+b;  //цифры
frmMain.nz125 := -16+b;
frmMain.nz126 := -14+b;
frmMain.nz127 := -12+b;
frmMain.nz128 := -16+b;
frmMain.nz129 := -16+b;
frmMain.nz130 := -16+b;
frmMain.nz131 := -16+b;
frmMain.nz132 := -16+b;
frmMain.nz133 := -16+b;
frmMain.nz134 := -16+b;
frmMain.nz135 := -16+b;
frmMain.nz136 := -14+b;
frmMain.nz137 := -14+b;
frmMain.nz138 := -14+b;
frmMain.nz139 := -14+b;
frmMain.nz140 := -14+b;
frmMain.nz141 := -15+b;
frmMain.nz142 := -15+b;
frmMain.nz143 := -15+b;
frmMain.nz144 := -15+b;
frmMain.nz145 := -15+b;
frmMain.nz146 := -15+b;
frmMain.nz147 := -15+b;
frmMain.nz148 := -15+b;
frmMain.nz149 := -14+b;
frmMain.nz150 := -14+b;
frmMain.nz151 := -12+b;
frmMain.nz152 := -12+b;
frmMain.nz153 := -13+b;
frmMain.nz154 := -13+b;
frmMain.nz155 := -13+b;
frmMain.nz156 := -6+b;
frmMain.nz157 := -12+b;
frmMain.nz158 := -12+b;
frmMain.nz159 := -12+b;
frmMain.nz160 := -12+b;
frmMain.nz161 := -10+b;
frmMain.nz162 := -10+b;
frmMain.nz163 := -10+b;
frmMain.nz164 := -10+b;
frmMain.nz165 := -8+b;
frmMain.nz166 := -8+b;
frmMain.nz167 := -8+b;
frmMain.nz168 := -8+b;
frmMain.nz169 := -6+b;
frmMain.nz170 := -6+b;
frmMain.nz171 := -6+b;
frmMain.nz172 := -6+b;
frmMain.nz173 := -4+b;
frmMain.nz174 := -4+b;
frmMain.nz175 := -4+b;
frmMain.nz176 := -4+b;
frmMain.nz177 := -2+b;
frmMain.nz178 := -2+b;
frmMain.nz179 := -2+b;
frmMain.nz180 := -2+b;
 frmMain.nz181 := -3+b;
 frmMain.nz182 := -3+b;
 frmMain.nz183 := -3+b;
 frmMain.nz184 := -3+b;
 frmMain.nz185 := -5+b;
 frmMain.nz186 := -5+b;
 frmMain.nz187 := -5+b;
 frmMain.nz188 := -5+b;
 frmMain.nz189 := -7+b;
 frmMain.nz190 := -7+b;
 frmMain.nz191 := -7+b;
 frmMain.nz192 := -7+b;
 frmMain.nz193 := -9+b;
 frmMain.nz194 := -9+b;
 frmMain.nz195 := -9+b;
 frmMain.nz196 := -9+b;
 frmMain.nz197 := -11+b;
 frmMain.nz198 := -11+b;
 frmMain.nz199 := -11+b;
 frmMain.nz200 := -11+b;
 frmMain.nz201 := -13+b;
 frmMain.nz202 := -13+b;
 frmMain.nz203 := -13+b;
 frmMain.nz204 := -13+b;
 frmMain.nz205 := -4+b;  //корабль
 frmMain.nz206 := -8+b;  //Подлодка
 frmMain.nz215 := -12+b;
 frmMain.frmGL.Width:=800;
 b:=0;

 end;




 if (c=6) and (d=4) then
begin
StringGrid1.Cells[c,d]:='1';
a:=a-3;
b:=b+13;
frmMain.nx := 0+a;
  frmMain.nx1 := 0+a;
  frmMain.nx2 := 0+a;
 frmMain.nx3 := 0+a;
 frmMain.nx7 := -1+a;
 frmMain.nx8 := 1+a;
 frmMain.nx9 := -1+a;
  frmMain.nx10 := -2+a;
 frmMain.nx11 := -1+a;
 frmMain.nx12 := 1+a;
 frmMain.nx14 := 1+a;
 frmMain.nx15 := -1+a;
 frmMain.nx16 := -1+a;
 frmMain.nx17 := 1+a;
  frmMain.nx18 := -1+a;
 frmMain.nx19 := 1+a;
 frmMain.nx20 := -1+a;
 frmMain.nx21 := -1+a;
 frmMain.nx22 := 1+a;
  frmMain.nx23 := -1+a;
 frmMain.nx24 := 1+a;
  frmMain.nx25 := 1+a;
 frmMain.nx26 := -1+a;
 frmMain.nx27 := 1+a;
  frmMain.nx28 := -1+a;
  frmMain.nx29 := 1+a;
 frmMain.nx30 := -1+a;

// 1

 frmMain.nx31 := -2+a;
 frmMain.nx32 := 2+a;
 frmMain.nx33 := -2+a;
 frmMain.nx34 :=  2+a;
 frmMain.nx35 := -2+a;
 frmMain.nx36 := 2+a;
  frmMain.nx37 := -2+a;
 frmMain.nx38 := 2+a;
 frmMain.nx39 := -2+a;
 frmMain.nx40 := 2+a;
 frmMain.nx41 := -2+a;
 frmMain.nx42 := 2+a;
 frmMain.nx43 := -2+a;
 frmMain.nx44 := 2+a;
 frmMain.nx45 := -2+a;  //////////////


 //////////////////////

 frmMain.nx46 := -2+a;
 frmMain.nx47 := -2+a;
 frmMain.nx48 := 2+a;
 frmMain.nx49 := -2+a;
 frmMain.nx50 := 2+a;
 frmMain.nx51 := -3+a;
 frmMain.nx52 :=3+a;
 frmMain.nx53 := -3+a;
 frmMain.nx54 :=  3+a;
 frmMain.nx55 := -3+a;
 frmMain.nx56 := 3+a;
 frmMain.nx57 := -3+a;
 frmMain.nx58 := 3+a;
 frmMain.nx59 := -3+a;
 frmMain.nx60 := 3+a;
 frmMain.nx61 := -3+a;
 frmMain.nx62 := 3+a;
 frmMain.nx63 := -3+a;
 frmMain.nx64 := 3+a;
 frmMain.nx65 := -3+a;
 frmMain.nx66 := 3+a;
 frmMain.nx67 := -3+a;
 frmMain.nx68 := 3+a;
 frmMain.nx69 := -3+a;
 frmMain.nx70 := 3+a;


  ///3
 ///
 ///
 frmMain.nx71 := -4+a;
 frmMain.nx72 :=4+a;
 frmMain.nx73 := -4+a;
 frmMain.nx74 :=  4+a;
 frmMain.nx75 := -4+a;
 frmMain.nx76 := 4+a;
 frmMain.nx77 := -4+a;
 frmMain.nx78 := 4+a;
 frmMain.nx79 := -4+a;
 frmMain.nx80 := 4+a;
 frmMain.nx81 := -4+a;
 frmMain.nx82 := 4+a;
 frmMain.nx83 := -4+a;
 frmMain.nx84 := 4+a;
 frmMain.nx85 := -4+a;
 frmMain.nx86 := 4+a;
 frmMain.nx87 := -4+a;
 frmMain.nx88 := 4+a;
 frmMain.nx89 := -4+a;
 frmMain.nx90 := -2+a;

frmMain.nx94 :=0+a;
frmMain.nx95 :=-2+a;  //цифры
frmMain.nx96 :=-4+a;  //цифры
frmMain.nx97 :=-6+a;  //цифры
frmMain.nx98 := 2+a;  //цифры
frmMain.nx99 := 4+a;  //цифры
frmMain.nx100 := 6+a;  //цифры
frmMain.nx101 := 8+a;  //цифры
frmMain.nx102 := 10+a;  //цифры
frmMain.nx103 := 12+a;  //цифры

frmMain.nx104 := -8+a;  //буквы
frmMain.nx105 := -8+a;  //буквы
frmMain.nx106 := -8+a;  //буквы
frmMain.nx107 := -8+a;  //буквы
frmMain.nx108 := -8+a;  //буквы
frmMain.nx109 := -8+a;  //буквы
frmMain.nx110 := -8+a;  //буквы
frmMain.nx111 := -8+a;  //буквы
frmMain.nx112 := -8+a;  //буквы
frmMain.nx113 := -8+a;  //буквы

frmMain.nx114 := -6+a;  //корабль
frmMain.nx115 := 0+a;  //цифры
frmMain.nx116 :=-2+a;  //цифры
frmMain.nx117 :=-4+a;  //цифры
frmMain.nx118 :=-6+a;  //цифры
frmMain.nx119 := 2+a;  //цифры
frmMain.nx120 := 4+a;  //цифры
frmMain.nx121 := 6+a;  //цифры
frmMain.nx122 := 8+a;  //цифры
frmMain.nx123 := 10+a;  //цифры
frmMain.nx124 := 12+a;  //цифры
frmMain.nx125 := 0+a;
frmMain.nx126 := 0+a;
frmMain.nx127 := 0+a;
frmMain.nx128 := 2+a;
frmMain.nx129 := -2+a;
frmMain.nx130 := -4+a;
frmMain.nx131 := 4+a;
frmMain.nx132 := -6+a;
frmMain.nx133 := 6+a;
frmMain.nx134 := 8+a;
frmMain.nx135 := -8+a;
frmMain.nx136 := -2+a;
frmMain.nx137 := 2+a;
frmMain.nx138 := -4+a;
frmMain.nx139 := 4+a;
frmMain.nx140 := -2+a;
frmMain.nx141 := 2+a;
frmMain.nx142 := 0+a;
frmMain.nx143 := 2+a;
frmMain.nx144 := -2+a;
frmMain.nx145 := -4+a;
frmMain.nx146 := 4+a;
frmMain.nx147 := 6+a;
frmMain.nx148 := -6+a;
frmMain.nx149 := -6+a;
frmMain.nx150 := 6+a;
frmMain.nx151 := 2+a;
frmMain.nx152 := -2+a;
frmMain.nx153 := 2+a;
frmMain.nx154 := -2+a;
frmMain.nx155 := 0+a;
frmMain.nx156 := 0+a;
frmMain.nx157 := 4+a;
frmMain.nx158 := -4+a;
frmMain.nx159 := -6+a;
frmMain.nx160 := 6+a;
frmMain.nx161 := 4+a;
frmMain.nx162 := -4+a;
frmMain.nx163 := -6+a;
frmMain.nx164 := 6+a;
frmMain.nx165 := 4+a;
frmMain.nx166 := -4+a;
frmMain.nx167 := -6+a;
frmMain.nx168 := 6+a;
frmMain.nx169 := 4+a;
frmMain.nx170 := -4+a;
frmMain.nx171 := -6+a;
frmMain.nx172 := 6+a;
frmMain.nx173 := 4+a;
frmMain.nx174 := -4+a;
frmMain.nx175 := -6+a;
frmMain.nx176 := 6+a;
frmMain.nx177 := 4+a;
frmMain.nx178 := -4+a;
frmMain.nx179 := -6+a;
frmMain.nx180 := 6+a;
 frmMain.nx181 := 4+a;
 frmMain.nx182 := -4+a;
 frmMain.nx183 := -6+a;
 frmMain.nx184 := 6+a;
 frmMain.nx185 := 4+a;
 frmMain.nx186 := -4+a;
 frmMain.nx187 := -6+a;
 frmMain.nx188 := 6+a;
 frmMain.nx189 := -4+a;
 frmMain.nx190 := 4+a;
 frmMain.nx191 := -6+a;
 frmMain.nx192 := 6+a;
 frmMain.nx193 := -4+a;
 frmMain.nx194 := 4+a;
 frmMain.nx195 := -6+a;
 frmMain.nx196 := 6+a;
 frmMain.nx197 := -4+a;
 frmMain.nx198 := 4+a;
 frmMain.nx199 := -6+a;
 frmMain.nx200 := 6+a;
 frmMain.nx201 := -4+a;
 frmMain.nx202 := 4+a;
 frmMain.nx203 := -6+a;
 frmMain.nx204 := 6+a;
 frmMain.nx205 := 6+a;  //корабль
 frmMain.nx206 := 6+a;  //Подлодка
 frmMain.nx215 := -6+a;
 frmMain.frmGL.Width:=800;
 a:=0;
 frmMain.nz := 0+b;
  frmMain.nz1 := 0+b;
  frmMain.nz2 := 0+b;
 frmMain.nz3 := 1+b;
 frmMain.nz7 := 0+b;
 frmMain.nz8 := 2+b;
 frmMain.nz9 := 2+b;
  frmMain.nz10 := -2+b;
 frmMain.nz11 := -2+b;
 frmMain.nz12 := -2+b;
 frmMain.nz14 := -3+b;
 frmMain.nz15 := -3+b;
 frmMain.nz16 := -4+b;
 frmMain.nz17 := -4+b;
  frmMain.nz18 := -5+b;
 frmMain.nz19 := -5+b;
 frmMain.nz20 := -6+b;
 frmMain.nz21 := -7+b;
 frmMain.nz22 := -7+b;
  frmMain.nz23 := -8+b;
 frmMain.nz24 := -8+b;
  frmMain.nz25 := -9+b;
 frmMain.nz26 := -9+b;
 frmMain.nz27 := -10+b;
  frmMain.nz28 := -10+b;
  frmMain.nz29 := -11+b;
 frmMain.nz30 := -11+b;

// 1

 frmMain.nz31 := -2+b;
 frmMain.nz32 := -2+b;
 frmMain.nz33 := -3+b;
 frmMain.nz34 := -3+b;
 frmMain.nz35 := -4+b;
 frmMain.nz36 := -4+b;
  frmMain.nz37 := -5+b;
 frmMain.nz38 := -5+b;
 frmMain.nz39 := -6+b;
 frmMain.nz40 := -6+b;
 frmMain.nz41 := -7+b;
 frmMain.nz42 := -7+b;
 frmMain.nz43 := -8+b;
 frmMain.nz44 := -8+b;
 frmMain.nz45 := -9+b;  //////////////


 //////////////////////

 frmMain.nz46 := -9+b;
 frmMain.nz47 := -9+b;
 frmMain.nz48 := -10+b;
 frmMain.nz49 := -11+b;
 frmMain.nz50 := -11+b;
 frmMain.nz51 := -2+b;
 frmMain.nz52 :=-2+b;
 frmMain.nz53 := -3+b;
 frmMain.nz54 :=  3+b;
 frmMain.nz55 := -3+b;
 frmMain.nz56 := -4+b;
 frmMain.nz57 := -5+b;
 frmMain.nz58 := -5+b;
 frmMain.nz59 := -6+b;
 frmMain.nz60 := -6+b;
 frmMain.nz61 := -7+b;
 frmMain.nz62 := -7+b;
 frmMain.nz63 := -8+b;
 frmMain.nz64 := -8+b;
 frmMain.nz65 := -9+b;
 frmMain.nz66 := -9+b;
 frmMain.nz67 := -10+b;
 frmMain.nz68 := -10+b;
 frmMain.nz69 := -11+b;
 frmMain.nz70 := -11+b;


  ///3
 ///
 ///
 frmMain.nz71 := -2+b;
 frmMain.nz72 :=-2+b;
 frmMain.nz73 := -3+b;
 frmMain.nz74 :=  -3+b;
 frmMain.nz75 := -4+b;
 frmMain.nz76 := -4+b;
 frmMain.nz77 := -5+b;
 frmMain.nz78 := -5+b;
 frmMain.nz79 := -6+b;
 frmMain.nz80 := -6+b;
 frmMain.nz81 := -7+b;
 frmMain.nz82 := -7+b;
 frmMain.nz83 := -8+b;
 frmMain.nz84 := -8+b;
 frmMain.nz85 := -9+b;
 frmMain.nz86 := -9+b;
 frmMain.nz87 := -10+b;
 frmMain.nz88 := -10+b;
 frmMain.nz89 := -11+b;
 frmMain.nz90 := -2+b;

frmMain.nz94 :=1+b;
frmMain.nz95 :=1+b;  //цифры
frmMain.nz96 :=1+b;  //цифры
frmMain.nz97 :=1+b;  //цифры
frmMain.nz98 := 1+b;  //цифры
frmMain.nz99 := 1+b;  //цифры
frmMain.nz100 := 1+b;  //цифры
frmMain.nz101 := 1+b;  //цифры
frmMain.nz102 := 1+b;  //цифры
frmMain.nz103 := 1+b;  //цифры

frmMain.nz104 := -0+b;  //буквы
frmMain.nz105 := -2+b;  //буквы
frmMain.nz106 := -4+b;  //буквы
frmMain.nz107 := -6+b;  //буквы
frmMain.nz108 := -8+b;  //буквы
frmMain.nz109 := -10+b;  //буквы
frmMain.nz110 := -12+b;  //буквы
frmMain.nz111 := -14+b;  //буквы
frmMain.nz112 := -16+b;  //буквы
frmMain.nz113 := -18+b;  //буквы

frmMain.nz114 := -4+b;  //корабль
frmMain.nz115 := -18+b;  //цифры
frmMain.nz116 :=-18+b;  //цифры
frmMain.nz117 :=-18+b;  //цифры
frmMain.nz118 :=-18+b;  //цифры
frmMain.nz119 := -18+b;  //цифры
frmMain.nz120 := -18+b;  //цифры
frmMain.nz121 := -18+b;  //цифры
frmMain.nz122 := -18+b;  //цифры
frmMain.nz123 := -18+b;  //цифры
frmMain.nz124 := -18+b;  //цифры
frmMain.nz125 := -16+b;
frmMain.nz126 := -14+b;
frmMain.nz127 := -12+b;
frmMain.nz128 := -16+b;
frmMain.nz129 := -16+b;
frmMain.nz130 := -16+b;
frmMain.nz131 := -16+b;
frmMain.nz132 := -16+b;
frmMain.nz133 := -16+b;
frmMain.nz134 := -16+b;
frmMain.nz135 := -16+b;
frmMain.nz136 := -14+b;
frmMain.nz137 := -14+b;
frmMain.nz138 := -14+b;
frmMain.nz139 := -14+b;
frmMain.nz140 := -14+b;
frmMain.nz141 := -15+b;
frmMain.nz142 := -15+b;
frmMain.nz143 := -15+b;
frmMain.nz144 := -15+b;
frmMain.nz145 := -15+b;
frmMain.nz146 := -15+b;
frmMain.nz147 := -15+b;
frmMain.nz148 := -15+b;
frmMain.nz149 := -14+b;
frmMain.nz150 := -14+b;
frmMain.nz151 := -12+b;
frmMain.nz152 := -12+b;
frmMain.nz153 := -13+b;
frmMain.nz154 := -13+b;
frmMain.nz155 := -13+b;
frmMain.nz156 := -6+b;
frmMain.nz157 := -12+b;
frmMain.nz158 := -12+b;
frmMain.nz159 := -12+b;
frmMain.nz160 := -12+b;
frmMain.nz161 := -10+b;
frmMain.nz162 := -10+b;
frmMain.nz163 := -10+b;
frmMain.nz164 := -10+b;
frmMain.nz165 := -8+b;
frmMain.nz166 := -8+b;
frmMain.nz167 := -8+b;
frmMain.nz168 := -8+b;
frmMain.nz169 := -6+b;
frmMain.nz170 := -6+b;
frmMain.nz171 := -6+b;
frmMain.nz172 := -6+b;
frmMain.nz173 := -4+b;
frmMain.nz174 := -4+b;
frmMain.nz175 := -4+b;
frmMain.nz176 := -4+b;
frmMain.nz177 := -2+b;
frmMain.nz178 := -2+b;
frmMain.nz179 := -2+b;
frmMain.nz180 := -2+b;
 frmMain.nz181 := -3+b;
 frmMain.nz182 := -3+b;
 frmMain.nz183 := -3+b;
 frmMain.nz184 := -3+b;
 frmMain.nz185 := -5+b;
 frmMain.nz186 := -5+b;
 frmMain.nz187 := -5+b;
 frmMain.nz188 := -5+b;
 frmMain.nz189 := -7+b;
 frmMain.nz190 := -7+b;
 frmMain.nz191 := -7+b;
 frmMain.nz192 := -7+b;
 frmMain.nz193 := -9+b;
 frmMain.nz194 := -9+b;
 frmMain.nz195 := -9+b;
 frmMain.nz196 := -9+b;
 frmMain.nz197 := -11+b;
 frmMain.nz198 := -11+b;
 frmMain.nz199 := -11+b;
 frmMain.nz200 := -11+b;
 frmMain.nz201 := -13+b;
 frmMain.nz202 := -13+b;
 frmMain.nz203 := -13+b;
 frmMain.nz204 := -13+b;
 frmMain.nz205 := -4+b;  //корабль
 frmMain.nz206 := -8+b;  //Подлодка
 frmMain.nz215 := -12+b;
 frmMain.frmGL.Width:=800;
 b:=0;

 end;







 if (c=6) and (d=5) then
begin
StringGrid1.Cells[c,d]:='1';
a:=a-3;
b:=b+11;
frmMain.nx := 0+a;
  frmMain.nx1 := 0+a;
  frmMain.nx2 := 0+a;
 frmMain.nx3 := 0+a;
 frmMain.nx7 := -1+a;
 frmMain.nx8 := 1+a;
 frmMain.nx9 := -1+a;
  frmMain.nx10 := -2+a;
 frmMain.nx11 := -1+a;
 frmMain.nx12 := 1+a;
 frmMain.nx14 := 1+a;
 frmMain.nx15 := -1+a;
 frmMain.nx16 := -1+a;
 frmMain.nx17 := 1+a;
  frmMain.nx18 := -1+a;
 frmMain.nx19 := 1+a;
 frmMain.nx20 := -1+a;
 frmMain.nx21 := -1+a;
 frmMain.nx22 := 1+a;
  frmMain.nx23 := -1+a;
 frmMain.nx24 := 1+a;
  frmMain.nx25 := 1+a;
 frmMain.nx26 := -1+a;
 frmMain.nx27 := 1+a;
  frmMain.nx28 := -1+a;
  frmMain.nx29 := 1+a;
 frmMain.nx30 := -1+a;

// 1

 frmMain.nx31 := -2+a;
 frmMain.nx32 := 2+a;
 frmMain.nx33 := -2+a;
 frmMain.nx34 :=  2+a;
 frmMain.nx35 := -2+a;
 frmMain.nx36 := 2+a;
  frmMain.nx37 := -2+a;
 frmMain.nx38 := 2+a;
 frmMain.nx39 := -2+a;
 frmMain.nx40 := 2+a;
 frmMain.nx41 := -2+a;
 frmMain.nx42 := 2+a;
 frmMain.nx43 := -2+a;
 frmMain.nx44 := 2+a;
 frmMain.nx45 := -2+a;  //////////////


 //////////////////////

 frmMain.nx46 := -2+a;
 frmMain.nx47 := -2+a;
 frmMain.nx48 := 2+a;
 frmMain.nx49 := -2+a;
 frmMain.nx50 := 2+a;
 frmMain.nx51 := -3+a;
 frmMain.nx52 :=3+a;
 frmMain.nx53 := -3+a;
 frmMain.nx54 :=  3+a;
 frmMain.nx55 := -3+a;
 frmMain.nx56 := 3+a;
 frmMain.nx57 := -3+a;
 frmMain.nx58 := 3+a;
 frmMain.nx59 := -3+a;
 frmMain.nx60 := 3+a;
 frmMain.nx61 := -3+a;
 frmMain.nx62 := 3+a;
 frmMain.nx63 := -3+a;
 frmMain.nx64 := 3+a;
 frmMain.nx65 := -3+a;
 frmMain.nx66 := 3+a;
 frmMain.nx67 := -3+a;
 frmMain.nx68 := 3+a;
 frmMain.nx69 := -3+a;
 frmMain.nx70 := 3+a;


  ///3
 ///
 ///
 frmMain.nx71 := -4+a;
 frmMain.nx72 :=4+a;
 frmMain.nx73 := -4+a;
 frmMain.nx74 :=  4+a;
 frmMain.nx75 := -4+a;
 frmMain.nx76 := 4+a;
 frmMain.nx77 := -4+a;
 frmMain.nx78 := 4+a;
 frmMain.nx79 := -4+a;
 frmMain.nx80 := 4+a;
 frmMain.nx81 := -4+a;
 frmMain.nx82 := 4+a;
 frmMain.nx83 := -4+a;
 frmMain.nx84 := 4+a;
 frmMain.nx85 := -4+a;
 frmMain.nx86 := 4+a;
 frmMain.nx87 := -4+a;
 frmMain.nx88 := 4+a;
 frmMain.nx89 := -4+a;
 frmMain.nx90 := -2+a;

frmMain.nx94 :=0+a;
frmMain.nx95 :=-2+a;  //цифры
frmMain.nx96 :=-4+a;  //цифры
frmMain.nx97 :=-6+a;  //цифры
frmMain.nx98 := 2+a;  //цифры
frmMain.nx99 := 4+a;  //цифры
frmMain.nx100 := 6+a;  //цифры
frmMain.nx101 := 8+a;  //цифры
frmMain.nx102 := 10+a;  //цифры
frmMain.nx103 := 12+a;  //цифры

frmMain.nx104 := -8+a;  //буквы
frmMain.nx105 := -8+a;  //буквы
frmMain.nx106 := -8+a;  //буквы
frmMain.nx107 := -8+a;  //буквы
frmMain.nx108 := -8+a;  //буквы
frmMain.nx109 := -8+a;  //буквы
frmMain.nx110 := -8+a;  //буквы
frmMain.nx111 := -8+a;  //буквы
frmMain.nx112 := -8+a;  //буквы
frmMain.nx113 := -8+a;  //буквы

frmMain.nx114 := -6+a;  //корабль
frmMain.nx115 := 0+a;  //цифры
frmMain.nx116 :=-2+a;  //цифры
frmMain.nx117 :=-4+a;  //цифры
frmMain.nx118 :=-6+a;  //цифры
frmMain.nx119 := 2+a;  //цифры
frmMain.nx120 := 4+a;  //цифры
frmMain.nx121 := 6+a;  //цифры
frmMain.nx122 := 8+a;  //цифры
frmMain.nx123 := 10+a;  //цифры
frmMain.nx124 := 12+a;  //цифры
frmMain.nx125 := 0+a;
frmMain.nx126 := 0+a;
frmMain.nx127 := 0+a;
frmMain.nx128 := 2+a;
frmMain.nx129 := -2+a;
frmMain.nx130 := -4+a;
frmMain.nx131 := 4+a;
frmMain.nx132 := -6+a;
frmMain.nx133 := 6+a;
frmMain.nx134 := 8+a;
frmMain.nx135 := -8+a;
frmMain.nx136 := -2+a;
frmMain.nx137 := 2+a;
frmMain.nx138 := -4+a;
frmMain.nx139 := 4+a;
frmMain.nx140 := -2+a;
frmMain.nx141 := 2+a;
frmMain.nx142 := 0+a;
frmMain.nx143 := 2+a;
frmMain.nx144 := -2+a;
frmMain.nx145 := -4+a;
frmMain.nx146 := 4+a;
frmMain.nx147 := 6+a;
frmMain.nx148 := -6+a;
frmMain.nx149 := -6+a;
frmMain.nx150 := 6+a;
frmMain.nx151 := 2+a;
frmMain.nx152 := -2+a;
frmMain.nx153 := 2+a;
frmMain.nx154 := -2+a;
frmMain.nx155 := 0+a;
frmMain.nx156 := 0+a;
frmMain.nx157 := 4+a;
frmMain.nx158 := -4+a;
frmMain.nx159 := -6+a;
frmMain.nx160 := 6+a;
frmMain.nx161 := 4+a;
frmMain.nx162 := -4+a;
frmMain.nx163 := -6+a;
frmMain.nx164 := 6+a;
frmMain.nx165 := 4+a;
frmMain.nx166 := -4+a;
frmMain.nx167 := -6+a;
frmMain.nx168 := 6+a;
frmMain.nx169 := 4+a;
frmMain.nx170 := -4+a;
frmMain.nx171 := -6+a;
frmMain.nx172 := 6+a;
frmMain.nx173 := 4+a;
frmMain.nx174 := -4+a;
frmMain.nx175 := -6+a;
frmMain.nx176 := 6+a;
frmMain.nx177 := 4+a;
frmMain.nx178 := -4+a;
frmMain.nx179 := -6+a;
frmMain.nx180 := 6+a;
 frmMain.nx181 := 4+a;
 frmMain.nx182 := -4+a;
 frmMain.nx183 := -6+a;
 frmMain.nx184 := 6+a;
 frmMain.nx185 := 4+a;
 frmMain.nx186 := -4+a;
 frmMain.nx187 := -6+a;
 frmMain.nx188 := 6+a;
 frmMain.nx189 := -4+a;
 frmMain.nx190 := 4+a;
 frmMain.nx191 := -6+a;
 frmMain.nx192 := 6+a;
 frmMain.nx193 := -4+a;
 frmMain.nx194 := 4+a;
 frmMain.nx195 := -6+a;
 frmMain.nx196 := 6+a;
 frmMain.nx197 := -4+a;
 frmMain.nx198 := 4+a;
 frmMain.nx199 := -6+a;
 frmMain.nx200 := 6+a;
 frmMain.nx201 := -4+a;
 frmMain.nx202 := 4+a;
 frmMain.nx203 := -6+a;
 frmMain.nx204 := 6+a;
 frmMain.nx205 := 6+a;  //корабль
 frmMain.nx206 := 6+a;  //Подлодка
 frmMain.nx215 := -6+a;
 frmMain.frmGL.Width:=800;
 a:=0;
 frmMain.nz := 0+b;
  frmMain.nz1 := 0+b;
  frmMain.nz2 := 0+b;
 frmMain.nz3 := 1+b;
 frmMain.nz7 := 0+b;
 frmMain.nz8 := 2+b;
 frmMain.nz9 := 2+b;
  frmMain.nz10 := -2+b;
 frmMain.nz11 := -2+b;
 frmMain.nz12 := -2+b;
 frmMain.nz14 := -3+b;
 frmMain.nz15 := -3+b;
 frmMain.nz16 := -4+b;
 frmMain.nz17 := -4+b;
  frmMain.nz18 := -5+b;
 frmMain.nz19 := -5+b;
 frmMain.nz20 := -6+b;
 frmMain.nz21 := -7+b;
 frmMain.nz22 := -7+b;
  frmMain.nz23 := -8+b;
 frmMain.nz24 := -8+b;
  frmMain.nz25 := -9+b;
 frmMain.nz26 := -9+b;
 frmMain.nz27 := -10+b;
  frmMain.nz28 := -10+b;
  frmMain.nz29 := -11+b;
 frmMain.nz30 := -11+b;

// 1

 frmMain.nz31 := -2+b;
 frmMain.nz32 := -2+b;
 frmMain.nz33 := -3+b;
 frmMain.nz34 := -3+b;
 frmMain.nz35 := -4+b;
 frmMain.nz36 := -4+b;
  frmMain.nz37 := -5+b;
 frmMain.nz38 := -5+b;
 frmMain.nz39 := -6+b;
 frmMain.nz40 := -6+b;
 frmMain.nz41 := -7+b;
 frmMain.nz42 := -7+b;
 frmMain.nz43 := -8+b;
 frmMain.nz44 := -8+b;
 frmMain.nz45 := -9+b;  //////////////


 //////////////////////

 frmMain.nz46 := -9+b;
 frmMain.nz47 := -9+b;
 frmMain.nz48 := -10+b;
 frmMain.nz49 := -11+b;
 frmMain.nz50 := -11+b;
 frmMain.nz51 := -2+b;
 frmMain.nz52 :=-2+b;
 frmMain.nz53 := -3+b;
 frmMain.nz54 :=  3+b;
 frmMain.nz55 := -3+b;
 frmMain.nz56 := -4+b;
 frmMain.nz57 := -5+b;
 frmMain.nz58 := -5+b;
 frmMain.nz59 := -6+b;
 frmMain.nz60 := -6+b;
 frmMain.nz61 := -7+b;
 frmMain.nz62 := -7+b;
 frmMain.nz63 := -8+b;
 frmMain.nz64 := -8+b;
 frmMain.nz65 := -9+b;
 frmMain.nz66 := -9+b;
 frmMain.nz67 := -10+b;
 frmMain.nz68 := -10+b;
 frmMain.nz69 := -11+b;
 frmMain.nz70 := -11+b;


  ///3
 ///
 ///
 frmMain.nz71 := -2+b;
 frmMain.nz72 :=-2+b;
 frmMain.nz73 := -3+b;
 frmMain.nz74 :=  -3+b;
 frmMain.nz75 := -4+b;
 frmMain.nz76 := -4+b;
 frmMain.nz77 := -5+b;
 frmMain.nz78 := -5+b;
 frmMain.nz79 := -6+b;
 frmMain.nz80 := -6+b;
 frmMain.nz81 := -7+b;
 frmMain.nz82 := -7+b;
 frmMain.nz83 := -8+b;
 frmMain.nz84 := -8+b;
 frmMain.nz85 := -9+b;
 frmMain.nz86 := -9+b;
 frmMain.nz87 := -10+b;
 frmMain.nz88 := -10+b;
 frmMain.nz89 := -11+b;
 frmMain.nz90 := -2+b;

frmMain.nz94 :=1+b;
frmMain.nz95 :=1+b;  //цифры
frmMain.nz96 :=1+b;  //цифры
frmMain.nz97 :=1+b;  //цифры
frmMain.nz98 := 1+b;  //цифры
frmMain.nz99 := 1+b;  //цифры
frmMain.nz100 := 1+b;  //цифры
frmMain.nz101 := 1+b;  //цифры
frmMain.nz102 := 1+b;  //цифры
frmMain.nz103 := 1+b;  //цифры

frmMain.nz104 := -0+b;  //буквы
frmMain.nz105 := -2+b;  //буквы
frmMain.nz106 := -4+b;  //буквы
frmMain.nz107 := -6+b;  //буквы
frmMain.nz108 := -8+b;  //буквы
frmMain.nz109 := -10+b;  //буквы
frmMain.nz110 := -12+b;  //буквы
frmMain.nz111 := -14+b;  //буквы
frmMain.nz112 := -16+b;  //буквы
frmMain.nz113 := -18+b;  //буквы

frmMain.nz114 := -4+b;  //корабль
frmMain.nz115 := -18+b;  //цифры
frmMain.nz116 :=-18+b;  //цифры
frmMain.nz117 :=-18+b;  //цифры
frmMain.nz118 :=-18+b;  //цифры
frmMain.nz119 := -18+b;  //цифры
frmMain.nz120 := -18+b;  //цифры
frmMain.nz121 := -18+b;  //цифры
frmMain.nz122 := -18+b;  //цифры
frmMain.nz123 := -18+b;  //цифры
frmMain.nz124 := -18+b;  //цифры
frmMain.nz125 := -16+b;
frmMain.nz126 := -14+b;
frmMain.nz127 := -12+b;
frmMain.nz128 := -16+b;
frmMain.nz129 := -16+b;
frmMain.nz130 := -16+b;
frmMain.nz131 := -16+b;
frmMain.nz132 := -16+b;
frmMain.nz133 := -16+b;
frmMain.nz134 := -16+b;
frmMain.nz135 := -16+b;
frmMain.nz136 := -14+b;
frmMain.nz137 := -14+b;
frmMain.nz138 := -14+b;
frmMain.nz139 := -14+b;
frmMain.nz140 := -14+b;
frmMain.nz141 := -15+b;
frmMain.nz142 := -15+b;
frmMain.nz143 := -15+b;
frmMain.nz144 := -15+b;
frmMain.nz145 := -15+b;
frmMain.nz146 := -15+b;
frmMain.nz147 := -15+b;
frmMain.nz148 := -15+b;
frmMain.nz149 := -14+b;
frmMain.nz150 := -14+b;
frmMain.nz151 := -12+b;
frmMain.nz152 := -12+b;
frmMain.nz153 := -13+b;
frmMain.nz154 := -13+b;
frmMain.nz155 := -13+b;
frmMain.nz156 := -6+b;
frmMain.nz157 := -12+b;
frmMain.nz158 := -12+b;
frmMain.nz159 := -12+b;
frmMain.nz160 := -12+b;
frmMain.nz161 := -10+b;
frmMain.nz162 := -10+b;
frmMain.nz163 := -10+b;
frmMain.nz164 := -10+b;
frmMain.nz165 := -8+b;
frmMain.nz166 := -8+b;
frmMain.nz167 := -8+b;
frmMain.nz168 := -8+b;
frmMain.nz169 := -6+b;
frmMain.nz170 := -6+b;
frmMain.nz171 := -6+b;
frmMain.nz172 := -6+b;
frmMain.nz173 := -4+b;
frmMain.nz174 := -4+b;
frmMain.nz175 := -4+b;
frmMain.nz176 := -4+b;
frmMain.nz177 := -2+b;
frmMain.nz178 := -2+b;
frmMain.nz179 := -2+b;
frmMain.nz180 := -2+b;
 frmMain.nz181 := -3+b;
 frmMain.nz182 := -3+b;
 frmMain.nz183 := -3+b;
 frmMain.nz184 := -3+b;
 frmMain.nz185 := -5+b;
 frmMain.nz186 := -5+b;
 frmMain.nz187 := -5+b;
 frmMain.nz188 := -5+b;
 frmMain.nz189 := -7+b;
 frmMain.nz190 := -7+b;
 frmMain.nz191 := -7+b;
 frmMain.nz192 := -7+b;
 frmMain.nz193 := -9+b;
 frmMain.nz194 := -9+b;
 frmMain.nz195 := -9+b;
 frmMain.nz196 := -9+b;
 frmMain.nz197 := -11+b;
 frmMain.nz198 := -11+b;
 frmMain.nz199 := -11+b;
 frmMain.nz200 := -11+b;
 frmMain.nz201 := -13+b;
 frmMain.nz202 := -13+b;
 frmMain.nz203 := -13+b;
 frmMain.nz204 := -13+b;
 frmMain.nz205 := -4+b;  //корабль
 frmMain.nz206 := -8+b;  //Подлодка
 frmMain.nz215 := -12+b;
 frmMain.frmGL.Width:=800;
 b:=0;

 end;





 if (c=6) and (d=6) then
begin
c:=5;
StringGrid1.Cells[c,d]:='d';
c:=6;  d:=6;
StringGrid1.Cells[c,d]:='1';
a:=a-3;
b:=b+9;
podlodok:=podlodok+1;
label4.Caption:=inttostr(podlodok);
ochkofnabrano:=ochkofnabrano+300;
label6.Caption:=inttostr(ochkofnabrano);
frmMain.nx := 0+a;
  frmMain.nx1 := 0+a;
  frmMain.nx2 := 0+a;
 frmMain.nx3 := 0+a;
 frmMain.nx7 := -1+a;
 frmMain.nx8 := 1+a;
 frmMain.nx9 := -1+a;
  frmMain.nx10 := -2+a;
 frmMain.nx11 := -1+a;
 frmMain.nx12 := 1+a;
 frmMain.nx14 := 1+a;
 frmMain.nx15 := -1+a;
 frmMain.nx16 := -1+a;
 frmMain.nx17 := 1+a;
  frmMain.nx18 := -1+a;
 frmMain.nx19 := 1+a;
 frmMain.nx20 := -1+a;
 frmMain.nx21 := -1+a;
 frmMain.nx22 := 1+a;
  frmMain.nx23 := -1+a;
 frmMain.nx24 := 1+a;
  frmMain.nx25 := 1+a;
 frmMain.nx26 := -1+a;
 frmMain.nx27 := 1+a;
  frmMain.nx28 := -1+a;
  frmMain.nx29 := 1+a;
 frmMain.nx30 := -1+a;

// 1

 frmMain.nx31 := -2+a;
 frmMain.nx32 := 2+a;
 frmMain.nx33 := -2+a;
 frmMain.nx34 :=  2+a;
 frmMain.nx35 := -2+a;
 frmMain.nx36 := 2+a;
  frmMain.nx37 := -2+a;
 frmMain.nx38 := 2+a;
 frmMain.nx39 := -2+a;
 frmMain.nx40 := 2+a;
 frmMain.nx41 := -2+a;
 frmMain.nx42 := 2+a;
 frmMain.nx43 := -2+a;
 frmMain.nx44 := 2+a;
 frmMain.nx45 := -2+a;  //////////////


 //////////////////////

 frmMain.nx46 := -2+a;
 frmMain.nx47 := -2+a;
 frmMain.nx48 := 2+a;
 frmMain.nx49 := -2+a;
 frmMain.nx50 := 2+a;
 frmMain.nx51 := -3+a;
 frmMain.nx52 :=3+a;
 frmMain.nx53 := -3+a;
 frmMain.nx54 :=  3+a;
 frmMain.nx55 := -3+a;
 frmMain.nx56 := 3+a;
 frmMain.nx57 := -3+a;
 frmMain.nx58 := 3+a;
 frmMain.nx59 := -3+a;
 frmMain.nx60 := 3+a;
 frmMain.nx61 := -3+a;
 frmMain.nx62 := 3+a;
 frmMain.nx63 := -3+a;
 frmMain.nx64 := 3+a;
 frmMain.nx65 := -3+a;
 frmMain.nx66 := 3+a;
 frmMain.nx67 := -3+a;
 frmMain.nx68 := 3+a;
 frmMain.nx69 := -3+a;
 frmMain.nx70 := 3+a;


  ///3
 ///
 ///
 frmMain.nx71 := -4+a;
 frmMain.nx72 :=4+a;
 frmMain.nx73 := -4+a;
 frmMain.nx74 :=  4+a;
 frmMain.nx75 := -4+a;
 frmMain.nx76 := 4+a;
 frmMain.nx77 := -4+a;
 frmMain.nx78 := 4+a;
 frmMain.nx79 := -4+a;
 frmMain.nx80 := 4+a;
 frmMain.nx81 := -4+a;
 frmMain.nx82 := 4+a;
 frmMain.nx83 := -4+a;
 frmMain.nx84 := 4+a;
 frmMain.nx85 := -4+a;
 frmMain.nx86 := 4+a;
 frmMain.nx87 := -4+a;
 frmMain.nx88 := 4+a;
 frmMain.nx89 := -4+a;
 frmMain.nx90 := -2+a;

frmMain.nx94 :=0+a;
frmMain.nx95 :=-2+a;  //цифры
frmMain.nx96 :=-4+a;  //цифры
frmMain.nx97 :=-6+a;  //цифры
frmMain.nx98 := 2+a;  //цифры
frmMain.nx99 := 4+a;  //цифры
frmMain.nx100 := 6+a;  //цифры
frmMain.nx101 := 8+a;  //цифры
frmMain.nx102 := 10+a;  //цифры
frmMain.nx103 := 12+a;  //цифры

frmMain.nx104 := -8+a;  //буквы
frmMain.nx105 := -8+a;  //буквы
frmMain.nx106 := -8+a;  //буквы
frmMain.nx107 := -8+a;  //буквы
frmMain.nx108 := -8+a;  //буквы
frmMain.nx109 := -8+a;  //буквы
frmMain.nx110 := -8+a;  //буквы
frmMain.nx111 := -8+a;  //буквы
frmMain.nx112 := -8+a;  //буквы
frmMain.nx113 := -8+a;  //буквы

frmMain.nx114 := -6+a;  //корабль
frmMain.nx115 := 0+a;  //цифры
frmMain.nx116 :=-2+a;  //цифры
frmMain.nx117 :=-4+a;  //цифры
frmMain.nx118 :=-6+a;  //цифры
frmMain.nx119 := 2+a;  //цифры
frmMain.nx120 := 4+a;  //цифры
frmMain.nx121 := 6+a;  //цифры
frmMain.nx122 := 8+a;  //цифры
frmMain.nx123 := 10+a;  //цифры
frmMain.nx124 := 12+a;  //цифры
frmMain.nx125 := 0+a;
frmMain.nx126 := 0+a;
frmMain.nx127 := 0+a;
frmMain.nx128 := 2+a;
frmMain.nx129 := -2+a;
frmMain.nx130 := -4+a;
frmMain.nx131 := 4+a;
frmMain.nx132 := -6+a;
frmMain.nx133 := 6+a;
frmMain.nx134 := 8+a;
frmMain.nx135 := -8+a;
frmMain.nx136 := -2+a;
frmMain.nx137 := 2+a;
frmMain.nx138 := -4+a;
frmMain.nx139 := 4+a;
frmMain.nx140 := -2+a;
frmMain.nx141 := 2+a;
frmMain.nx142 := 0+a;
frmMain.nx143 := 2+a;
frmMain.nx144 := -2+a;
frmMain.nx145 := -4+a;
frmMain.nx146 := 4+a;
frmMain.nx147 := 6+a;
frmMain.nx148 := -6+a;
frmMain.nx149 := -6+a;
frmMain.nx150 := 6+a;
frmMain.nx151 := 2+a;
frmMain.nx152 := -2+a;
frmMain.nx153 := 2+a;
frmMain.nx154 := -2+a;
frmMain.nx155 := 0+a;
frmMain.nx156 := 0+a;
frmMain.nx157 := 4+a;
frmMain.nx158 := -4+a;
frmMain.nx159 := -6+a;
frmMain.nx160 := 6+a;
frmMain.nx161 := 4+a;
frmMain.nx162 := -4+a;
frmMain.nx163 := -6+a;
frmMain.nx164 := 6+a;
frmMain.nx165 := 4+a;
frmMain.nx166 := -4+a;
frmMain.nx167 := -6+a;
frmMain.nx168 := 6+a;
frmMain.nx169 := 4+a;
frmMain.nx170 := -4+a;
frmMain.nx171 := -6+a;
frmMain.nx172 := 6+a;
frmMain.nx173 := 4+a;
frmMain.nx174 := -4+a;
frmMain.nx175 := -6+a;
frmMain.nx176 := 6+a;
frmMain.nx177 := 4+a;
frmMain.nx178 := -4+a;
frmMain.nx179 := -6+a;
frmMain.nx180 := 6+a;
 frmMain.nx181 := 4+a;
 frmMain.nx182 := -4+a;
 frmMain.nx183 := -6+a;
 frmMain.nx184 := 6+a;
 frmMain.nx185 := 4+a;
 frmMain.nx186 := -4+a;
 frmMain.nx187 := -6+a;
 frmMain.nx188 := 6+a;
 frmMain.nx189 := -4+a;
 frmMain.nx190 := 4+a;
 frmMain.nx191 := -6+a;
 frmMain.nx192 := 6+a;
 frmMain.nx193 := -4+a;
 frmMain.nx194 := 4+a;
 frmMain.nx195 := -6+a;
 frmMain.nx196 := 6+a;
 frmMain.nx197 := -4+a;
 frmMain.nx198 := 4+a;
 frmMain.nx199 := -6+a;
 frmMain.nx200 := 6+a;
 frmMain.nx201 := -4+a;
 frmMain.nx202 := 4+a;
 frmMain.nx203 := -6+a;
 frmMain.nx204 := 6+a;
 frmMain.nx205 := 6+a;  //корабль
 frmMain.nx206 := 6+a;  //Подлодка
 frmMain.nx215 := -6+a;
 frmMain.frmGL.Width:=800;
 a:=0;
 frmMain.nz := 0+b;
  frmMain.nz1 := 0+b;
  frmMain.nz2 := 0+b;
 frmMain.nz3 := 1+b;
 frmMain.nz7 := 0+b;
 frmMain.nz8 := 2+b;
 frmMain.nz9 := 2+b;
  frmMain.nz10 := -2+b;
 frmMain.nz11 := -2+b;
 frmMain.nz12 := -2+b;
 frmMain.nz14 := -3+b;
 frmMain.nz15 := -3+b;
 frmMain.nz16 := -4+b;
 frmMain.nz17 := -4+b;
  frmMain.nz18 := -5+b;
 frmMain.nz19 := -5+b;
 frmMain.nz20 := -6+b;
 frmMain.nz21 := -7+b;
 frmMain.nz22 := -7+b;
  frmMain.nz23 := -8+b;
 frmMain.nz24 := -8+b;
  frmMain.nz25 := -9+b;
 frmMain.nz26 := -9+b;
 frmMain.nz27 := -10+b;
  frmMain.nz28 := -10+b;
  frmMain.nz29 := -11+b;
 frmMain.nz30 := -11+b;

// 1

 frmMain.nz31 := -2+b;
 frmMain.nz32 := -2+b;
 frmMain.nz33 := -3+b;
 frmMain.nz34 := -3+b;
 frmMain.nz35 := -4+b;
 frmMain.nz36 := -4+b;
  frmMain.nz37 := -5+b;
 frmMain.nz38 := -5+b;
 frmMain.nz39 := -6+b;
 frmMain.nz40 := -6+b;
 frmMain.nz41 := -7+b;
 frmMain.nz42 := -7+b;
 frmMain.nz43 := -8+b;
 frmMain.nz44 := -8+b;
 frmMain.nz45 := -9+b;  //////////////


 //////////////////////

 frmMain.nz46 := -9+b;
 frmMain.nz47 := -9+b;
 frmMain.nz48 := -10+b;
 frmMain.nz49 := -11+b;
 frmMain.nz50 := -11+b;
 frmMain.nz51 := -2+b;
 frmMain.nz52 :=-2+b;
 frmMain.nz53 := -3+b;
 frmMain.nz54 :=  3+b;
 frmMain.nz55 := -3+b;
 frmMain.nz56 := -4+b;
 frmMain.nz57 := -5+b;
 frmMain.nz58 := -5+b;
 frmMain.nz59 := -6+b;
 frmMain.nz60 := -6+b;
 frmMain.nz61 := -7+b;
 frmMain.nz62 := -7+b;
 frmMain.nz63 := -8+b;
 frmMain.nz64 := -8+b;
 frmMain.nz65 := -9+b;
 frmMain.nz66 := -9+b;
 frmMain.nz67 := -10+b;
 frmMain.nz68 := -10+b;
 frmMain.nz69 := -11+b;
 frmMain.nz70 := -11+b;


  ///3
 ///
 ///
 frmMain.nz71 := -2+b;
 frmMain.nz72 :=-2+b;
 frmMain.nz73 := -3+b;
 frmMain.nz74 :=  -3+b;
 frmMain.nz75 := -4+b;
 frmMain.nz76 := -4+b;
 frmMain.nz77 := -5+b;
 frmMain.nz78 := -5+b;
 frmMain.nz79 := -6+b;
 frmMain.nz80 := -6+b;
 frmMain.nz81 := -7+b;
 frmMain.nz82 := -7+b;
 frmMain.nz83 := -8+b;
 frmMain.nz84 := -8+b;
 frmMain.nz85 := -9+b;
 frmMain.nz86 := -9+b;
 frmMain.nz87 := -10+b;
 frmMain.nz88 := -10+b;
 frmMain.nz89 := -11+b;
 frmMain.nz90 := -2+b;

frmMain.nz94 :=1+b;
frmMain.nz95 :=1+b;  //цифры
frmMain.nz96 :=1+b;  //цифры
frmMain.nz97 :=1+b;  //цифры
frmMain.nz98 := 1+b;  //цифры
frmMain.nz99 := 1+b;  //цифры
frmMain.nz100 := 1+b;  //цифры
frmMain.nz101 := 1+b;  //цифры
frmMain.nz102 := 1+b;  //цифры
frmMain.nz103 := 1+b;  //цифры

frmMain.nz104 := -0+b;  //буквы
frmMain.nz105 := -2+b;  //буквы
frmMain.nz106 := -4+b;  //буквы
frmMain.nz107 := -6+b;  //буквы
frmMain.nz108 := -8+b;  //буквы
frmMain.nz109 := -10+b;  //буквы
frmMain.nz110 := -12+b;  //буквы
frmMain.nz111 := -14+b;  //буквы
frmMain.nz112 := -16+b;  //буквы
frmMain.nz113 := -18+b;  //буквы

frmMain.nz114 := -4+b;  //корабль
frmMain.nz115 := -18+b;  //цифры
frmMain.nz116 :=-18+b;  //цифры
frmMain.nz117 :=-18+b;  //цифры
frmMain.nz118 :=-18+b;  //цифры
frmMain.nz119 := -18+b;  //цифры
frmMain.nz120 := -18+b;  //цифры
frmMain.nz121 := -18+b;  //цифры
frmMain.nz122 := -18+b;  //цифры
frmMain.nz123 := -18+b;  //цифры
frmMain.nz124 := -18+b;  //цифры
frmMain.nz125 := -16+b;
frmMain.nz126 := -14+b;
frmMain.nz127 := -12+b;
frmMain.nz128 := -16+b;
frmMain.nz129 := -16+b;
frmMain.nz130 := -16+b;
frmMain.nz131 := -16+b;
frmMain.nz132 := -16+b;
frmMain.nz133 := -16+b;
frmMain.nz134 := -16+b;
frmMain.nz135 := -16+b;
frmMain.nz136 := -14+b;
frmMain.nz137 := -14+b;
frmMain.nz138 := -14+b;
frmMain.nz139 := -14+b;
frmMain.nz140 := -14+b;
frmMain.nz141 := -15+b;
frmMain.nz142 := -15+b;
frmMain.nz143 := -15+b;
frmMain.nz144 := -15+b;
frmMain.nz145 := -15+b;
frmMain.nz146 := -15+b;
frmMain.nz147 := -15+b;
frmMain.nz148 := -15+b;
frmMain.nz149 := -14+b;
frmMain.nz150 := -14+b;
frmMain.nz151 := -12+b;
frmMain.nz152 := -12+b;
frmMain.nz153 := -13+b;
frmMain.nz154 := -13+b;
frmMain.nz155 := -13+b;
frmMain.nz156 := -6+b;
frmMain.nz157 := -12+b;
frmMain.nz158 := -12+b;
frmMain.nz159 := -12+b;
frmMain.nz160 := -12+b;
frmMain.nz161 := -10+b;
frmMain.nz162 := -10+b;
frmMain.nz163 := -10+b;
frmMain.nz164 := -10+b;
frmMain.nz165 := -8+b;
frmMain.nz166 := -8+b;
frmMain.nz167 := -8+b;
frmMain.nz168 := -8+b;
frmMain.nz169 := -6+b;
frmMain.nz170 := -6+b;
frmMain.nz171 := -6+b;
frmMain.nz172 := -6+b;
frmMain.nz173 := -4+b;
frmMain.nz174 := -4+b;
frmMain.nz175 := -4+b;
frmMain.nz176 := -4+b;
frmMain.nz177 := -2+b;
frmMain.nz178 := -2+b;
frmMain.nz179 := -2+b;
frmMain.nz180 := -2+b;
 frmMain.nz181 := -3+b;
 frmMain.nz182 := -3+b;
 frmMain.nz183 := -3+b;
 frmMain.nz184 := -3+b;
 frmMain.nz185 := -5+b;
 frmMain.nz186 := -5+b;
 frmMain.nz187 := -5+b;
 frmMain.nz188 := -5+b;
 frmMain.nz189 := -7+b;
 frmMain.nz190 := -7+b;
 frmMain.nz191 := -7+b;
 frmMain.nz192 := -7+b;
 frmMain.nz193 := -9+b;
 frmMain.nz194 := -9+b;
 frmMain.nz195 := -9+b;
 frmMain.nz196 := -9+b;
 frmMain.nz197 := -11+b;
 frmMain.nz198 := -11+b;
 frmMain.nz199 := -11+b;
 frmMain.nz200 := -11+b;
 frmMain.nz201 := -13+b;
 frmMain.nz202 := -13+b;
 frmMain.nz203 := -13+b;
 frmMain.nz204 := -13+b;
 frmMain.nz205 := -4+b;  //корабль
 frmMain.nz206 := -8+b;  //Подлодка
 frmMain.nz215 := -12+b;
 frmMain.frmGL.Width:=800;
 b:=0;

 end;


 if (c=6) and (d=7) then
begin
StringGrid1.Cells[c,d]:='d';
a:=a-3;
b:=b+11;
frmMain.nx := 0+a;
  frmMain.nx1 := 0+a;
  frmMain.nx2 := 0+a;
 frmMain.nx3 := 0+a;
 frmMain.nx7 := -1+a;
 frmMain.nx8 := 1+a;
 frmMain.nx9 := -1+a;
  frmMain.nx10 := -2+a;
 frmMain.nx11 := -1+a;
 frmMain.nx12 := 1+a;
 frmMain.nx14 := 1+a;
 frmMain.nx15 := -1+a;
 frmMain.nx16 := -1+a;
 frmMain.nx17 := 1+a;
  frmMain.nx18 := -1+a;
 frmMain.nx19 := 1+a;
 frmMain.nx20 := -1+a;
 frmMain.nx21 := -1+a;
 frmMain.nx22 := 1+a;
  frmMain.nx23 := -1+a;
 frmMain.nx24 := 1+a;
  frmMain.nx25 := 1+a;
 frmMain.nx26 := -1+a;
 frmMain.nx27 := 1+a;
  frmMain.nx28 := -1+a;
  frmMain.nx29 := 1+a;
 frmMain.nx30 := -1+a;

// 1

 frmMain.nx31 := -2+a;
 frmMain.nx32 := 2+a;
 frmMain.nx33 := -2+a;
 frmMain.nx34 :=  2+a;
 frmMain.nx35 := -2+a;
 frmMain.nx36 := 2+a;
  frmMain.nx37 := -2+a;
 frmMain.nx38 := 2+a;
 frmMain.nx39 := -2+a;
 frmMain.nx40 := 2+a;
 frmMain.nx41 := -2+a;
 frmMain.nx42 := 2+a;
 frmMain.nx43 := -2+a;
 frmMain.nx44 := 2+a;
 frmMain.nx45 := -2+a;  //////////////


 //////////////////////

 frmMain.nx46 := -2+a;
 frmMain.nx47 := -2+a;
 frmMain.nx48 := 2+a;
 frmMain.nx49 := -2+a;
 frmMain.nx50 := 2+a;
 frmMain.nx51 := -3+a;
 frmMain.nx52 :=3+a;
 frmMain.nx53 := -3+a;
 frmMain.nx54 :=  3+a;
 frmMain.nx55 := -3+a;
 frmMain.nx56 := 3+a;
 frmMain.nx57 := -3+a;
 frmMain.nx58 := 3+a;
 frmMain.nx59 := -3+a;
 frmMain.nx60 := 3+a;
 frmMain.nx61 := -3+a;
 frmMain.nx62 := 3+a;
 frmMain.nx63 := -3+a;
 frmMain.nx64 := 3+a;
 frmMain.nx65 := -3+a;
 frmMain.nx66 := 3+a;
 frmMain.nx67 := -3+a;
 frmMain.nx68 := 3+a;
 frmMain.nx69 := -3+a;
 frmMain.nx70 := 3+a;


  ///3
 ///
 ///
 frmMain.nx71 := -4+a;
 frmMain.nx72 :=4+a;
 frmMain.nx73 := -4+a;
 frmMain.nx74 :=  4+a;
 frmMain.nx75 := -4+a;
 frmMain.nx76 := 4+a;
 frmMain.nx77 := -4+a;
 frmMain.nx78 := 4+a;
 frmMain.nx79 := -4+a;
 frmMain.nx80 := 4+a;
 frmMain.nx81 := -4+a;
 frmMain.nx82 := 4+a;
 frmMain.nx83 := -4+a;
 frmMain.nx84 := 4+a;
 frmMain.nx85 := -4+a;
 frmMain.nx86 := 4+a;
 frmMain.nx87 := -4+a;
 frmMain.nx88 := 4+a;
 frmMain.nx89 := -4+a;
 frmMain.nx90 := -2+a;

frmMain.nx94 :=0+a;
frmMain.nx95 :=-2+a;  //цифры
frmMain.nx96 :=-4+a;  //цифры
frmMain.nx97 :=-6+a;  //цифры
frmMain.nx98 := 2+a;  //цифры
frmMain.nx99 := 4+a;  //цифры
frmMain.nx100 := 6+a;  //цифры
frmMain.nx101 := 8+a;  //цифры
frmMain.nx102 := 10+a;  //цифры
frmMain.nx103 := 12+a;  //цифры

frmMain.nx104 := -8+a;  //буквы
frmMain.nx105 := -8+a;  //буквы
frmMain.nx106 := -8+a;  //буквы
frmMain.nx107 := -8+a;  //буквы
frmMain.nx108 := -8+a;  //буквы
frmMain.nx109 := -8+a;  //буквы
frmMain.nx110 := -8+a;  //буквы
frmMain.nx111 := -8+a;  //буквы
frmMain.nx112 := -8+a;  //буквы
frmMain.nx113 := -8+a;  //буквы

frmMain.nx114 := -6+a;  //корабль
frmMain.nx115 := 0+a;  //цифры
frmMain.nx116 :=-2+a;  //цифры
frmMain.nx117 :=-4+a;  //цифры
frmMain.nx118 :=-6+a;  //цифры
frmMain.nx119 := 2+a;  //цифры
frmMain.nx120 := 4+a;  //цифры
frmMain.nx121 := 6+a;  //цифры
frmMain.nx122 := 8+a;  //цифры
frmMain.nx123 := 10+a;  //цифры
frmMain.nx124 := 12+a;  //цифры
frmMain.nx125 := 0+a;
frmMain.nx126 := 0+a;
frmMain.nx127 := 0+a;
frmMain.nx128 := 2+a;
frmMain.nx129 := -2+a;
frmMain.nx130 := -4+a;
frmMain.nx131 := 4+a;
frmMain.nx132 := -6+a;
frmMain.nx133 := 6+a;
frmMain.nx134 := 8+a;
frmMain.nx135 := -8+a;
frmMain.nx136 := -2+a;
frmMain.nx137 := 2+a;
frmMain.nx138 := -4+a;
frmMain.nx139 := 4+a;
frmMain.nx140 := -2+a;
frmMain.nx141 := 2+a;
frmMain.nx142 := 0+a;
frmMain.nx143 := 2+a;
frmMain.nx144 := -2+a;
frmMain.nx145 := -4+a;
frmMain.nx146 := 4+a;
frmMain.nx147 := 6+a;
frmMain.nx148 := -6+a;
frmMain.nx149 := -6+a;
frmMain.nx150 := 6+a;
frmMain.nx151 := 2+a;
frmMain.nx152 := -2+a;
frmMain.nx153 := 2+a;
frmMain.nx154 := -2+a;
frmMain.nx155 := 0+a;
frmMain.nx156 := 0+a;
frmMain.nx157 := 4+a;
frmMain.nx158 := -4+a;
frmMain.nx159 := -6+a;
frmMain.nx160 := 6+a;
frmMain.nx161 := 4+a;
frmMain.nx162 := -4+a;
frmMain.nx163 := -6+a;
frmMain.nx164 := 6+a;
frmMain.nx165 := 4+a;
frmMain.nx166 := -4+a;
frmMain.nx167 := -6+a;
frmMain.nx168 := 6+a;
frmMain.nx169 := 4+a;
frmMain.nx170 := -4+a;
frmMain.nx171 := -6+a;
frmMain.nx172 := 6+a;
frmMain.nx173 := 4+a;
frmMain.nx174 := -4+a;
frmMain.nx175 := -6+a;
frmMain.nx176 := 6+a;
frmMain.nx177 := 4+a;
frmMain.nx178 := -4+a;
frmMain.nx179 := -6+a;
frmMain.nx180 := 6+a;
 frmMain.nx181 := 4+a;
 frmMain.nx182 := -4+a;
 frmMain.nx183 := -6+a;
 frmMain.nx184 := 6+a;
 frmMain.nx185 := 4+a;
 frmMain.nx186 := -4+a;
 frmMain.nx187 := -6+a;
 frmMain.nx188 := 6+a;
 frmMain.nx189 := -4+a;
 frmMain.nx190 := 4+a;
 frmMain.nx191 := -6+a;
 frmMain.nx192 := 6+a;
 frmMain.nx193 := -4+a;
 frmMain.nx194 := 4+a;
 frmMain.nx195 := -6+a;
 frmMain.nx196 := 6+a;
 frmMain.nx197 := -4+a;
 frmMain.nx198 := 4+a;
 frmMain.nx199 := -6+a;
 frmMain.nx200 := 6+a;
 frmMain.nx201 := -4+a;
 frmMain.nx202 := 4+a;
 frmMain.nx203 := -6+a;
 frmMain.nx204 := 6+a;
 frmMain.nx205 := 6+a;  //корабль
 frmMain.nx206 := 6+a;  //Подлодка
 frmMain.nx215 := -6+a;
 frmMain.frmGL.Width:=800;
 a:=0;
 frmMain.nz := 0+b;
  frmMain.nz1 := 0+b;
  frmMain.nz2 := 0+b;
 frmMain.nz3 := 1+b;
 frmMain.nz7 := 0+b;
 frmMain.nz8 := 2+b;
 frmMain.nz9 := 2+b;
  frmMain.nz10 := -2+b;
 frmMain.nz11 := -2+b;
 frmMain.nz12 := -2+b;
 frmMain.nz14 := -3+b;
 frmMain.nz15 := -3+b;
 frmMain.nz16 := -4+b;
 frmMain.nz17 := -4+b;
  frmMain.nz18 := -5+b;
 frmMain.nz19 := -5+b;
 frmMain.nz20 := -6+b;
 frmMain.nz21 := -7+b;
 frmMain.nz22 := -7+b;
  frmMain.nz23 := -8+b;
 frmMain.nz24 := -8+b;
  frmMain.nz25 := -9+b;
 frmMain.nz26 := -9+b;
 frmMain.nz27 := -10+b;
  frmMain.nz28 := -10+b;
  frmMain.nz29 := -11+b;
 frmMain.nz30 := -11+b;

// 1

 frmMain.nz31 := -2+b;
 frmMain.nz32 := -2+b;
 frmMain.nz33 := -3+b;
 frmMain.nz34 := -3+b;
 frmMain.nz35 := -4+b;
 frmMain.nz36 := -4+b;
  frmMain.nz37 := -5+b;
 frmMain.nz38 := -5+b;
 frmMain.nz39 := -6+b;
 frmMain.nz40 := -6+b;
 frmMain.nz41 := -7+b;
 frmMain.nz42 := -7+b;
 frmMain.nz43 := -8+b;
 frmMain.nz44 := -8+b;
 frmMain.nz45 := -9+b;  //////////////


 //////////////////////

 frmMain.nz46 := -9+b;
 frmMain.nz47 := -9+b;
 frmMain.nz48 := -10+b;
 frmMain.nz49 := -11+b;
 frmMain.nz50 := -11+b;
 frmMain.nz51 := -2+b;
 frmMain.nz52 :=-2+b;
 frmMain.nz53 := -3+b;
 frmMain.nz54 :=  3+b;
 frmMain.nz55 := -3+b;
 frmMain.nz56 := -4+b;
 frmMain.nz57 := -5+b;
 frmMain.nz58 := -5+b;
 frmMain.nz59 := -6+b;
 frmMain.nz60 := -6+b;
 frmMain.nz61 := -7+b;
 frmMain.nz62 := -7+b;
 frmMain.nz63 := -8+b;
 frmMain.nz64 := -8+b;
 frmMain.nz65 := -9+b;
 frmMain.nz66 := -9+b;
 frmMain.nz67 := -10+b;
 frmMain.nz68 := -10+b;
 frmMain.nz69 := -11+b;
 frmMain.nz70 := -11+b;


  ///3
 ///
 ///
 frmMain.nz71 := -2+b;
 frmMain.nz72 :=-2+b;
 frmMain.nz73 := -3+b;
 frmMain.nz74 :=  -3+b;
 frmMain.nz75 := -4+b;
 frmMain.nz76 := -4+b;
 frmMain.nz77 := -5+b;
 frmMain.nz78 := -5+b;
 frmMain.nz79 := -6+b;
 frmMain.nz80 := -6+b;
 frmMain.nz81 := -7+b;
 frmMain.nz82 := -7+b;
 frmMain.nz83 := -8+b;
 frmMain.nz84 := -8+b;
 frmMain.nz85 := -9+b;
 frmMain.nz86 := -9+b;
 frmMain.nz87 := -10+b;
 frmMain.nz88 := -10+b;
 frmMain.nz89 := -11+b;
 frmMain.nz90 := -2+b;

frmMain.nz94 :=1+b;
frmMain.nz95 :=1+b;  //цифры
frmMain.nz96 :=1+b;  //цифры
frmMain.nz97 :=1+b;  //цифры
frmMain.nz98 := 1+b;  //цифры
frmMain.nz99 := 1+b;  //цифры
frmMain.nz100 := 1+b;  //цифры
frmMain.nz101 := 1+b;  //цифры
frmMain.nz102 := 1+b;  //цифры
frmMain.nz103 := 1+b;  //цифры

frmMain.nz104 := -0+b;  //буквы
frmMain.nz105 := -2+b;  //буквы
frmMain.nz106 := -4+b;  //буквы
frmMain.nz107 := -6+b;  //буквы
frmMain.nz108 := -8+b;  //буквы
frmMain.nz109 := -10+b;  //буквы
frmMain.nz110 := -12+b;  //буквы
frmMain.nz111 := -14+b;  //буквы
frmMain.nz112 := -16+b;  //буквы
frmMain.nz113 := -18+b;  //буквы

frmMain.nz114 := -4+b;  //корабль
frmMain.nz115 := -18+b;  //цифры
frmMain.nz116 :=-18+b;  //цифры
frmMain.nz117 :=-18+b;  //цифры
frmMain.nz118 :=-18+b;  //цифры
frmMain.nz119 := -18+b;  //цифры
frmMain.nz120 := -18+b;  //цифры
frmMain.nz121 := -18+b;  //цифры
frmMain.nz122 := -18+b;  //цифры
frmMain.nz123 := -18+b;  //цифры
frmMain.nz124 := -18+b;  //цифры
frmMain.nz125 := -16+b;
frmMain.nz126 := -14+b;
frmMain.nz127 := -12+b;
frmMain.nz128 := -16+b;
frmMain.nz129 := -16+b;
frmMain.nz130 := -16+b;
frmMain.nz131 := -16+b;
frmMain.nz132 := -16+b;
frmMain.nz133 := -16+b;
frmMain.nz134 := -16+b;
frmMain.nz135 := -16+b;
frmMain.nz136 := -14+b;
frmMain.nz137 := -14+b;
frmMain.nz138 := -14+b;
frmMain.nz139 := -14+b;
frmMain.nz140 := -14+b;
frmMain.nz141 := -15+b;
frmMain.nz142 := -15+b;
frmMain.nz143 := -15+b;
frmMain.nz144 := -15+b;
frmMain.nz145 := -15+b;
frmMain.nz146 := -15+b;
frmMain.nz147 := -15+b;
frmMain.nz148 := -15+b;
frmMain.nz149 := -14+b;
frmMain.nz150 := -14+b;
frmMain.nz151 := -12+b;
frmMain.nz152 := -12+b;
frmMain.nz153 := -13+b;
frmMain.nz154 := -13+b;
frmMain.nz155 := -13+b;
frmMain.nz156 := -6+b;
frmMain.nz157 := -12+b;
frmMain.nz158 := -12+b;
frmMain.nz159 := -12+b;
frmMain.nz160 := -12+b;
frmMain.nz161 := -10+b;
frmMain.nz162 := -10+b;
frmMain.nz163 := -10+b;
frmMain.nz164 := -10+b;
frmMain.nz165 := -8+b;
frmMain.nz166 := -8+b;
frmMain.nz167 := -8+b;
frmMain.nz168 := -8+b;
frmMain.nz169 := -6+b;
frmMain.nz170 := -6+b;
frmMain.nz171 := -6+b;
frmMain.nz172 := -6+b;
frmMain.nz173 := -4+b;
frmMain.nz174 := -4+b;
frmMain.nz175 := -4+b;
frmMain.nz176 := -4+b;
frmMain.nz177 := -2+b;
frmMain.nz178 := -2+b;
frmMain.nz179 := -2+b;
frmMain.nz180 := -2+b;
 frmMain.nz181 := -3+b;
 frmMain.nz182 := -3+b;
 frmMain.nz183 := -3+b;
 frmMain.nz184 := -3+b;
 frmMain.nz185 := -5+b;
 frmMain.nz186 := -5+b;
 frmMain.nz187 := -5+b;
 frmMain.nz188 := -5+b;
 frmMain.nz189 := -7+b;
 frmMain.nz190 := -7+b;
 frmMain.nz191 := -7+b;
 frmMain.nz192 := -7+b;
 frmMain.nz193 := -9+b;
 frmMain.nz194 := -9+b;
 frmMain.nz195 := -9+b;
 frmMain.nz196 := -9+b;
 frmMain.nz197 := -11+b;
 frmMain.nz198 := -11+b;
 frmMain.nz199 := -11+b;
 frmMain.nz200 := -11+b;
 frmMain.nz201 := -13+b;
 frmMain.nz202 := -13+b;
 frmMain.nz203 := -13+b;
 frmMain.nz204 := -13+b;
 frmMain.nz205 := -4+b;  //корабль
 frmMain.nz206 := -8+b;  //Подлодка
 frmMain.nz215 := -12+b;
 frmMain.frmGL.Width:=800;
 b:=0;

 end;





 if (c=6) and (d=8) then
begin
StringGrid1.Cells[c,d]:='1';
a:=a-3;
b:=b+5;
frmMain.nx := 0+a;
  frmMain.nx1 := 0+a;
  frmMain.nx2 := 0+a;
 frmMain.nx3 := 0+a;
 frmMain.nx7 := -1+a;
 frmMain.nx8 := 1+a;
 frmMain.nx9 := -1+a;
  frmMain.nx10 := -2+a;
 frmMain.nx11 := -1+a;
 frmMain.nx12 := 1+a;
 frmMain.nx14 := 1+a;
 frmMain.nx15 := -1+a;
 frmMain.nx16 := -1+a;
 frmMain.nx17 := 1+a;
  frmMain.nx18 := -1+a;
 frmMain.nx19 := 1+a;
 frmMain.nx20 := -1+a;
 frmMain.nx21 := -1+a;
 frmMain.nx22 := 1+a;
  frmMain.nx23 := -1+a;
 frmMain.nx24 := 1+a;
  frmMain.nx25 := 1+a;
 frmMain.nx26 := -1+a;
 frmMain.nx27 := 1+a;
  frmMain.nx28 := -1+a;
  frmMain.nx29 := 1+a;
 frmMain.nx30 := -1+a;

// 1

 frmMain.nx31 := -2+a;
 frmMain.nx32 := 2+a;
 frmMain.nx33 := -2+a;
 frmMain.nx34 :=  2+a;
 frmMain.nx35 := -2+a;
 frmMain.nx36 := 2+a;
  frmMain.nx37 := -2+a;
 frmMain.nx38 := 2+a;
 frmMain.nx39 := -2+a;
 frmMain.nx40 := 2+a;
 frmMain.nx41 := -2+a;
 frmMain.nx42 := 2+a;
 frmMain.nx43 := -2+a;
 frmMain.nx44 := 2+a;
 frmMain.nx45 := -2+a;  //////////////


 //////////////////////

 frmMain.nx46 := -2+a;
 frmMain.nx47 := -2+a;
 frmMain.nx48 := 2+a;
 frmMain.nx49 := -2+a;
 frmMain.nx50 := 2+a;
 frmMain.nx51 := -3+a;
 frmMain.nx52 :=3+a;
 frmMain.nx53 := -3+a;
 frmMain.nx54 :=  3+a;
 frmMain.nx55 := -3+a;
 frmMain.nx56 := 3+a;
 frmMain.nx57 := -3+a;
 frmMain.nx58 := 3+a;
 frmMain.nx59 := -3+a;
 frmMain.nx60 := 3+a;
 frmMain.nx61 := -3+a;
 frmMain.nx62 := 3+a;
 frmMain.nx63 := -3+a;
 frmMain.nx64 := 3+a;
 frmMain.nx65 := -3+a;
 frmMain.nx66 := 3+a;
 frmMain.nx67 := -3+a;
 frmMain.nx68 := 3+a;
 frmMain.nx69 := -3+a;
 frmMain.nx70 := 3+a;


  ///3
 ///
 ///
 frmMain.nx71 := -4+a;
 frmMain.nx72 :=4+a;
 frmMain.nx73 := -4+a;
 frmMain.nx74 :=  4+a;
 frmMain.nx75 := -4+a;
 frmMain.nx76 := 4+a;
 frmMain.nx77 := -4+a;
 frmMain.nx78 := 4+a;
 frmMain.nx79 := -4+a;
 frmMain.nx80 := 4+a;
 frmMain.nx81 := -4+a;
 frmMain.nx82 := 4+a;
 frmMain.nx83 := -4+a;
 frmMain.nx84 := 4+a;
 frmMain.nx85 := -4+a;
 frmMain.nx86 := 4+a;
 frmMain.nx87 := -4+a;
 frmMain.nx88 := 4+a;
 frmMain.nx89 := -4+a;
 frmMain.nx90 := -2+a;

frmMain.nx94 :=0+a;
frmMain.nx95 :=-2+a;  //цифры
frmMain.nx96 :=-4+a;  //цифры
frmMain.nx97 :=-6+a;  //цифры
frmMain.nx98 := 2+a;  //цифры
frmMain.nx99 := 4+a;  //цифры
frmMain.nx100 := 6+a;  //цифры
frmMain.nx101 := 8+a;  //цифры
frmMain.nx102 := 10+a;  //цифры
frmMain.nx103 := 12+a;  //цифры

frmMain.nx104 := -8+a;  //буквы
frmMain.nx105 := -8+a;  //буквы
frmMain.nx106 := -8+a;  //буквы
frmMain.nx107 := -8+a;  //буквы
frmMain.nx108 := -8+a;  //буквы
frmMain.nx109 := -8+a;  //буквы
frmMain.nx110 := -8+a;  //буквы
frmMain.nx111 := -8+a;  //буквы
frmMain.nx112 := -8+a;  //буквы
frmMain.nx113 := -8+a;  //буквы

frmMain.nx114 := -6+a;  //корабль
frmMain.nx115 := 0+a;  //цифры
frmMain.nx116 :=-2+a;  //цифры
frmMain.nx117 :=-4+a;  //цифры
frmMain.nx118 :=-6+a;  //цифры
frmMain.nx119 := 2+a;  //цифры
frmMain.nx120 := 4+a;  //цифры
frmMain.nx121 := 6+a;  //цифры
frmMain.nx122 := 8+a;  //цифры
frmMain.nx123 := 10+a;  //цифры
frmMain.nx124 := 12+a;  //цифры
frmMain.nx125 := 0+a;
frmMain.nx126 := 0+a;
frmMain.nx127 := 0+a;
frmMain.nx128 := 2+a;
frmMain.nx129 := -2+a;
frmMain.nx130 := -4+a;
frmMain.nx131 := 4+a;
frmMain.nx132 := -6+a;
frmMain.nx133 := 6+a;
frmMain.nx134 := 8+a;
frmMain.nx135 := -8+a;
frmMain.nx136 := -2+a;
frmMain.nx137 := 2+a;
frmMain.nx138 := -4+a;
frmMain.nx139 := 4+a;
frmMain.nx140 := -2+a;
frmMain.nx141 := 2+a;
frmMain.nx142 := 0+a;
frmMain.nx143 := 2+a;
frmMain.nx144 := -2+a;
frmMain.nx145 := -4+a;
frmMain.nx146 := 4+a;
frmMain.nx147 := 6+a;
frmMain.nx148 := -6+a;
frmMain.nx149 := -6+a;
frmMain.nx150 := 6+a;
frmMain.nx151 := 2+a;
frmMain.nx152 := -2+a;
frmMain.nx153 := 2+a;
frmMain.nx154 := -2+a;
frmMain.nx155 := 0+a;
frmMain.nx156 := 0+a;
frmMain.nx157 := 4+a;
frmMain.nx158 := -4+a;
frmMain.nx159 := -6+a;
frmMain.nx160 := 6+a;
frmMain.nx161 := 4+a;
frmMain.nx162 := -4+a;
frmMain.nx163 := -6+a;
frmMain.nx164 := 6+a;
frmMain.nx165 := 4+a;
frmMain.nx166 := -4+a;
frmMain.nx167 := -6+a;
frmMain.nx168 := 6+a;
frmMain.nx169 := 4+a;
frmMain.nx170 := -4+a;
frmMain.nx171 := -6+a;
frmMain.nx172 := 6+a;
frmMain.nx173 := 4+a;
frmMain.nx174 := -4+a;
frmMain.nx175 := -6+a;
frmMain.nx176 := 6+a;
frmMain.nx177 := 4+a;
frmMain.nx178 := -4+a;
frmMain.nx179 := -6+a;
frmMain.nx180 := 6+a;
 frmMain.nx181 := 4+a;
 frmMain.nx182 := -4+a;
 frmMain.nx183 := -6+a;
 frmMain.nx184 := 6+a;
 frmMain.nx185 := 4+a;
 frmMain.nx186 := -4+a;
 frmMain.nx187 := -6+a;
 frmMain.nx188 := 6+a;
 frmMain.nx189 := -4+a;
 frmMain.nx190 := 4+a;
 frmMain.nx191 := -6+a;
 frmMain.nx192 := 6+a;
 frmMain.nx193 := -4+a;
 frmMain.nx194 := 4+a;
 frmMain.nx195 := -6+a;
 frmMain.nx196 := 6+a;
 frmMain.nx197 := -4+a;
 frmMain.nx198 := 4+a;
 frmMain.nx199 := -6+a;
 frmMain.nx200 := 6+a;
 frmMain.nx201 := -4+a;
 frmMain.nx202 := 4+a;
 frmMain.nx203 := -6+a;
 frmMain.nx204 := 6+a;
 frmMain.nx205 := 6+a;  //корабль
 frmMain.nx206 := 6+a;  //Подлодка
 frmMain.nx215 := -6+a;
 frmMain.frmGL.Width:=800;
 a:=0;
 frmMain.nz := 0+b;
  frmMain.nz1 := 0+b;
  frmMain.nz2 := 0+b;
 frmMain.nz3 := 1+b;
 frmMain.nz7 := 0+b;
 frmMain.nz8 := 2+b;
 frmMain.nz9 := 2+b;
  frmMain.nz10 := -2+b;
 frmMain.nz11 := -2+b;
 frmMain.nz12 := -2+b;
 frmMain.nz14 := -3+b;
 frmMain.nz15 := -3+b;
 frmMain.nz16 := -4+b;
 frmMain.nz17 := -4+b;
  frmMain.nz18 := -5+b;
 frmMain.nz19 := -5+b;
 frmMain.nz20 := -6+b;
 frmMain.nz21 := -7+b;
 frmMain.nz22 := -7+b;
  frmMain.nz23 := -8+b;
 frmMain.nz24 := -8+b;
  frmMain.nz25 := -9+b;
 frmMain.nz26 := -9+b;
 frmMain.nz27 := -10+b;
  frmMain.nz28 := -10+b;
  frmMain.nz29 := -11+b;
 frmMain.nz30 := -11+b;

// 1

 frmMain.nz31 := -2+b;
 frmMain.nz32 := -2+b;
 frmMain.nz33 := -3+b;
 frmMain.nz34 := -3+b;
 frmMain.nz35 := -4+b;
 frmMain.nz36 := -4+b;
  frmMain.nz37 := -5+b;
 frmMain.nz38 := -5+b;
 frmMain.nz39 := -6+b;
 frmMain.nz40 := -6+b;
 frmMain.nz41 := -7+b;
 frmMain.nz42 := -7+b;
 frmMain.nz43 := -8+b;
 frmMain.nz44 := -8+b;
 frmMain.nz45 := -9+b;  //////////////


 //////////////////////

 frmMain.nz46 := -9+b;
 frmMain.nz47 := -9+b;
 frmMain.nz48 := -10+b;
 frmMain.nz49 := -11+b;
 frmMain.nz50 := -11+b;
 frmMain.nz51 := -2+b;
 frmMain.nz52 :=-2+b;
 frmMain.nz53 := -3+b;
 frmMain.nz54 :=  3+b;
 frmMain.nz55 := -3+b;
 frmMain.nz56 := -4+b;
 frmMain.nz57 := -5+b;
 frmMain.nz58 := -5+b;
 frmMain.nz59 := -6+b;
 frmMain.nz60 := -6+b;
 frmMain.nz61 := -7+b;
 frmMain.nz62 := -7+b;
 frmMain.nz63 := -8+b;
 frmMain.nz64 := -8+b;
 frmMain.nz65 := -9+b;
 frmMain.nz66 := -9+b;
 frmMain.nz67 := -10+b;
 frmMain.nz68 := -10+b;
 frmMain.nz69 := -11+b;
 frmMain.nz70 := -11+b;


  ///3
 ///
 ///
 frmMain.nz71 := -2+b;
 frmMain.nz72 :=-2+b;
 frmMain.nz73 := -3+b;
 frmMain.nz74 :=  -3+b;
 frmMain.nz75 := -4+b;
 frmMain.nz76 := -4+b;
 frmMain.nz77 := -5+b;
 frmMain.nz78 := -5+b;
 frmMain.nz79 := -6+b;
 frmMain.nz80 := -6+b;
 frmMain.nz81 := -7+b;
 frmMain.nz82 := -7+b;
 frmMain.nz83 := -8+b;
 frmMain.nz84 := -8+b;
 frmMain.nz85 := -9+b;
 frmMain.nz86 := -9+b;
 frmMain.nz87 := -10+b;
 frmMain.nz88 := -10+b;
 frmMain.nz89 := -11+b;
 frmMain.nz90 := -2+b;

frmMain.nz94 :=1+b;
frmMain.nz95 :=1+b;  //цифры
frmMain.nz96 :=1+b;  //цифры
frmMain.nz97 :=1+b;  //цифры
frmMain.nz98 := 1+b;  //цифры
frmMain.nz99 := 1+b;  //цифры
frmMain.nz100 := 1+b;  //цифры
frmMain.nz101 := 1+b;  //цифры
frmMain.nz102 := 1+b;  //цифры
frmMain.nz103 := 1+b;  //цифры

frmMain.nz104 := -0+b;  //буквы
frmMain.nz105 := -2+b;  //буквы
frmMain.nz106 := -4+b;  //буквы
frmMain.nz107 := -6+b;  //буквы
frmMain.nz108 := -8+b;  //буквы
frmMain.nz109 := -10+b;  //буквы
frmMain.nz110 := -12+b;  //буквы
frmMain.nz111 := -14+b;  //буквы
frmMain.nz112 := -16+b;  //буквы
frmMain.nz113 := -18+b;  //буквы

frmMain.nz114 := -4+b;  //корабль
frmMain.nz115 := -18+b;  //цифры
frmMain.nz116 :=-18+b;  //цифры
frmMain.nz117 :=-18+b;  //цифры
frmMain.nz118 :=-18+b;  //цифры
frmMain.nz119 := -18+b;  //цифры
frmMain.nz120 := -18+b;  //цифры
frmMain.nz121 := -18+b;  //цифры
frmMain.nz122 := -18+b;  //цифры
frmMain.nz123 := -18+b;  //цифры
frmMain.nz124 := -18+b;  //цифры
frmMain.nz125 := -16+b;
frmMain.nz126 := -14+b;
frmMain.nz127 := -12+b;
frmMain.nz128 := -16+b;
frmMain.nz129 := -16+b;
frmMain.nz130 := -16+b;
frmMain.nz131 := -16+b;
frmMain.nz132 := -16+b;
frmMain.nz133 := -16+b;
frmMain.nz134 := -16+b;
frmMain.nz135 := -16+b;
frmMain.nz136 := -14+b;
frmMain.nz137 := -14+b;
frmMain.nz138 := -14+b;
frmMain.nz139 := -14+b;
frmMain.nz140 := -14+b;
frmMain.nz141 := -15+b;
frmMain.nz142 := -15+b;
frmMain.nz143 := -15+b;
frmMain.nz144 := -15+b;
frmMain.nz145 := -15+b;
frmMain.nz146 := -15+b;
frmMain.nz147 := -15+b;
frmMain.nz148 := -15+b;
frmMain.nz149 := -14+b;
frmMain.nz150 := -14+b;
frmMain.nz151 := -12+b;
frmMain.nz152 := -12+b;
frmMain.nz153 := -13+b;
frmMain.nz154 := -13+b;
frmMain.nz155 := -13+b;
frmMain.nz156 := -6+b;
frmMain.nz157 := -12+b;
frmMain.nz158 := -12+b;
frmMain.nz159 := -12+b;
frmMain.nz160 := -12+b;
frmMain.nz161 := -10+b;
frmMain.nz162 := -10+b;
frmMain.nz163 := -10+b;
frmMain.nz164 := -10+b;
frmMain.nz165 := -8+b;
frmMain.nz166 := -8+b;
frmMain.nz167 := -8+b;
frmMain.nz168 := -8+b;
frmMain.nz169 := -6+b;
frmMain.nz170 := -6+b;
frmMain.nz171 := -6+b;
frmMain.nz172 := -6+b;
frmMain.nz173 := -4+b;
frmMain.nz174 := -4+b;
frmMain.nz175 := -4+b;
frmMain.nz176 := -4+b;
frmMain.nz177 := -2+b;
frmMain.nz178 := -2+b;
frmMain.nz179 := -2+b;
frmMain.nz180 := -2+b;
 frmMain.nz181 := -3+b;
 frmMain.nz182 := -3+b;
 frmMain.nz183 := -3+b;
 frmMain.nz184 := -3+b;
 frmMain.nz185 := - 5+b;
 frmMain.nz186 := -5+b;
 frmMain.nz187 := -5+b;
 frmMain.nz188 := -5+b;
 frmMain.nz189 := -7+b;
 frmMain.nz190 := -7+b;
 frmMain.nz191 := -7+b;
 frmMain.nz192 := -7+b;
 frmMain.nz193 := -9+b;
 frmMain.nz194 := -9+b;
 frmMain.nz195 := -9+b;
 frmMain.nz196 := -9+b;
 frmMain.nz197 := -11+b;
 frmMain.nz198 := -11+b;
 frmMain.nz199 := -11+b;
 frmMain.nz200 := -11+b;
 frmMain.nz201 := -13+b;
 frmMain.nz202 := -13+b;
 frmMain.nz203 := -13+b;
 frmMain.nz204 := -13+b;
 frmMain.nz205 := -4+b;  //корабль
 frmMain.nz206 := -8+b;  //Подлодка
 frmMain.nz215 := -12+b;
 frmMain.frmGL.Width:=800;
 b:=0;

 end;



  if (c=6) and (d=9) then
begin
StringGrid1.Cells[c,d]:='1';
a:=a-3;
b:=b+3;
frmMain.nx := 0+a;
  frmMain.nx1 := 0+a;
  frmMain.nx2 := 0+a;
 frmMain.nx3 := 0+a;
 frmMain.nx7 := -1+a;
 frmMain.nx8 := 1+a;
 frmMain.nx9 := -1+a;
  frmMain.nx10 := -2+a;
 frmMain.nx11 := -1+a;
 frmMain.nx12 := 1+a;
 frmMain.nx14 := 1+a;
 frmMain.nx15 := -1+a;
 frmMain.nx16 := -1+a;
 frmMain.nx17 := 1+a;
  frmMain.nx18 := -1+a;
 frmMain.nx19 := 1+a;
 frmMain.nx20 := -1+a;
 frmMain.nx21 := -1+a;
 frmMain.nx22 := 1+a;
  frmMain.nx23 := -1+a;
 frmMain.nx24 := 1+a;
  frmMain.nx25 := 1+a;
 frmMain.nx26 := -1+a;
 frmMain.nx27 := 1+a;
  frmMain.nx28 := -1+a;
  frmMain.nx29 := 1+a;
 frmMain.nx30 := -1+a;

// 1

 frmMain.nx31 := -2+a;
 frmMain.nx32 := 2+a;
 frmMain.nx33 := -2+a;
 frmMain.nx34 :=  2+a;
 frmMain.nx35 := -2+a;
 frmMain.nx36 := 2+a;
  frmMain.nx37 := -2+a;
 frmMain.nx38 := 2+a;
 frmMain.nx39 := -2+a;
 frmMain.nx40 := 2+a;
 frmMain.nx41 := -2+a;
 frmMain.nx42 := 2+a;
 frmMain.nx43 := -2+a;
 frmMain.nx44 := 2+a;
 frmMain.nx45 := -2+a;  //////////////


 //////////////////////

 frmMain.nx46 := -2+a;
 frmMain.nx47 := -2+a;
 frmMain.nx48 := 2+a;
 frmMain.nx49 := -2+a;
 frmMain.nx50 := 2+a;
 frmMain.nx51 := -3+a;
 frmMain.nx52 :=3+a;
 frmMain.nx53 := -3+a;
 frmMain.nx54 :=  3+a;
 frmMain.nx55 := -3+a;
 frmMain.nx56 := 3+a;
 frmMain.nx57 := -3+a;
 frmMain.nx58 := 3+a;
 frmMain.nx59 := -3+a;
 frmMain.nx60 := 3+a;
 frmMain.nx61 := -3+a;
 frmMain.nx62 := 3+a;
 frmMain.nx63 := -3+a;
 frmMain.nx64 := 3+a;
 frmMain.nx65 := -3+a;
 frmMain.nx66 := 3+a;
 frmMain.nx67 := -3+a;
 frmMain.nx68 := 3+a;
 frmMain.nx69 := -3+a;
 frmMain.nx70 := 3+a;


  ///3
 ///
 ///
 frmMain.nx71 := -4+a;
 frmMain.nx72 :=4+a;
 frmMain.nx73 := -4+a;
 frmMain.nx74 :=  4+a;
 frmMain.nx75 := -4+a;
 frmMain.nx76 := 4+a;
 frmMain.nx77 := -4+a;
 frmMain.nx78 := 4+a;
 frmMain.nx79 := -4+a;
 frmMain.nx80 := 4+a;
 frmMain.nx81 := -4+a;
 frmMain.nx82 := 4+a;
 frmMain.nx83 := -4+a;
 frmMain.nx84 := 4+a;
 frmMain.nx85 := -4+a;
 frmMain.nx86 := 4+a;
 frmMain.nx87 := -4+a;
 frmMain.nx88 := 4+a;
 frmMain.nx89 := -4+a;
 frmMain.nx90 := -2+a;

frmMain.nx94 :=0+a;
frmMain.nx95 :=-2+a;  //цифры
frmMain.nx96 :=-4+a;  //цифры
frmMain.nx97 :=-6+a;  //цифры
frmMain.nx98 := 2+a;  //цифры
frmMain.nx99 := 4+a;  //цифры
frmMain.nx100 := 6+a;  //цифры
frmMain.nx101 := 8+a;  //цифры
frmMain.nx102 := 10+a;  //цифры
frmMain.nx103 := 12+a;  //цифры

frmMain.nx104 := -8+a;  //буквы
frmMain.nx105 := -8+a;  //буквы
frmMain.nx106 := -8+a;  //буквы
frmMain.nx107 := -8+a;  //буквы
frmMain.nx108 := -8+a;  //буквы
frmMain.nx109 := -8+a;  //буквы
frmMain.nx110 := -8+a;  //буквы
frmMain.nx111 := -8+a;  //буквы
frmMain.nx112 := -8+a;  //буквы
frmMain.nx113 := -8+a;  //буквы

frmMain.nx114 := -6+a;  //корабль
frmMain.nx115 := 0+a;  //цифры
frmMain.nx116 :=-2+a;  //цифры
frmMain.nx117 :=-4+a;  //цифры
frmMain.nx118 :=-6+a;  //цифры
frmMain.nx119 := 2+a;  //цифры
frmMain.nx120 := 4+a;  //цифры
frmMain.nx121 := 6+a;  //цифры
frmMain.nx122 := 8+a;  //цифры
frmMain.nx123 := 10+a;  //цифры
frmMain.nx124 := 12+a;  //цифры
frmMain.nx125 := 0+a;
frmMain.nx126 := 0+a;
frmMain.nx127 := 0+a;
frmMain.nx128 := 2+a;
frmMain.nx129 := -2+a;
frmMain.nx130 := -4+a;
frmMain.nx131 := 4+a;
frmMain.nx132 := -6+a;
frmMain.nx133 := 6+a;
frmMain.nx134 := 8+a;
frmMain.nx135 := -8+a;
frmMain.nx136 := -2+a;
frmMain.nx137 := 2+a;
frmMain.nx138 := -4+a;
frmMain.nx139 := 4+a;
frmMain.nx140 := -2+a;
frmMain.nx141 := 2+a;
frmMain.nx142 := 0+a;
frmMain.nx143 := 2+a;
frmMain.nx144 := -2+a;
frmMain.nx145 := -4+a;
frmMain.nx146 := 4+a;
frmMain.nx147 := 6+a;
frmMain.nx148 := -6+a;
frmMain.nx149 := -6+a;
frmMain.nx150 := 6+a;
frmMain.nx151 := 2+a;
frmMain.nx152 := -2+a;
frmMain.nx153 := 2+a;
frmMain.nx154 := -2+a;
frmMain.nx155 := 0+a;
frmMain.nx156 := 0+a;
frmMain.nx157 := 4+a;
frmMain.nx158 := -4+a;
frmMain.nx159 := -6+a;
frmMain.nx160 := 6+a;
frmMain.nx161 := 4+a;
frmMain.nx162 := -4+a;
frmMain.nx163 := -6+a;
frmMain.nx164 := 6+a;
frmMain.nx165 := 4+a;
frmMain.nx166 := -4+a;
frmMain.nx167 := -6+a;
frmMain.nx168 := 6+a;
frmMain.nx169 := 4+a;
frmMain.nx170 := -4+a;
frmMain.nx171 := -6+a;
frmMain.nx172 := 6+a;
frmMain.nx173 := 4+a;
frmMain.nx174 := -4+a;
frmMain.nx175 := -6+a;
frmMain.nx176 := 6+a;
frmMain.nx177 := 4+a;
frmMain.nx178 := -4+a;
frmMain.nx179 := -6+a;
frmMain.nx180 := 6+a;
 frmMain.nx181 := 4+a;
 frmMain.nx182 := -4+a;
 frmMain.nx183 := -6+a;
 frmMain.nx184 := 6+a;
 frmMain.nx185 := 4+a;
 frmMain.nx186 := -4+a;
 frmMain.nx187 := -6+a;
 frmMain.nx188 := 6+a;
 frmMain.nx189 := -4+a;
 frmMain.nx190 := 4+a;
 frmMain.nx191 := -6+a;
 frmMain.nx192 := 6+a;
 frmMain.nx193 := -4+a;
 frmMain.nx194 := 4+a;
 frmMain.nx195 := -6+a;
 frmMain.nx196 := 6+a;
 frmMain.nx197 := -4+a;
 frmMain.nx198 := 4+a;
 frmMain.nx199 := -6+a;
 frmMain.nx200 := 6+a;
 frmMain.nx201 := -4+a;
 frmMain.nx202 := 4+a;
 frmMain.nx203 := -6+a;
 frmMain.nx204 := 6+a;
 frmMain.nx205 := 6+a;  //корабль
 frmMain.nx206 := 6+a;  //Подлодка
 frmMain.nx215 := -6+a;
 frmMain.frmGL.Width:=800;
 a:=0;
 frmMain.nz := 0+b;
  frmMain.nz1 := 0+b;
  frmMain.nz2 := 0+b;
 frmMain.nz3 := 1+b;
 frmMain.nz7 := 0+b;
 frmMain.nz8 := 2+b;
 frmMain.nz9 := 2+b;
  frmMain.nz10 := -2+b;
 frmMain.nz11 := -2+b;
 frmMain.nz12 := -2+b;
 frmMain.nz14 := -3+b;
 frmMain.nz15 := -3+b;
 frmMain.nz16 := -4+b;
 frmMain.nz17 := -4+b;
  frmMain.nz18 := -5+b;
 frmMain.nz19 := -5+b;
 frmMain.nz20 := -6+b;
 frmMain.nz21 := -7+b;
 frmMain.nz22 := -7+b;
  frmMain.nz23 := -8+b;
 frmMain.nz24 := -8+b;
  frmMain.nz25 := -9+b;
 frmMain.nz26 := -9+b;
 frmMain.nz27 := -10+b;
  frmMain.nz28 := -10+b;
  frmMain.nz29 := -11+b;
 frmMain.nz30 := -11+b;

// 1

 frmMain.nz31 := -2+b;
 frmMain.nz32 := -2+b;
 frmMain.nz33 := -3+b;
 frmMain.nz34 := -3+b;
 frmMain.nz35 := -4+b;
 frmMain.nz36 := -4+b;
  frmMain.nz37 := -5+b;
 frmMain.nz38 := -5+b;
 frmMain.nz39 := -6+b;
 frmMain.nz40 := -6+b;
 frmMain.nz41 := -7+b;
 frmMain.nz42 := -7+b;
 frmMain.nz43 := -8+b;
 frmMain.nz44 := -8+b;
 frmMain.nz45 := -9+b;  //////////////


 //////////////////////

 frmMain.nz46 := -9+b;
 frmMain.nz47 := -9+b;
 frmMain.nz48 := -10+b;
 frmMain.nz49 := -11+b;
 frmMain.nz50 := -11+b;
 frmMain.nz51 := -2+b;
 frmMain.nz52 :=-2+b;
 frmMain.nz53 := -3+b;
 frmMain.nz54 :=  3+b;
 frmMain.nz55 := -3+b;
 frmMain.nz56 := -4+b;
 frmMain.nz57 := -5+b;
 frmMain.nz58 := -5+b;
 frmMain.nz59 := -6+b;
 frmMain.nz60 := -6+b;
 frmMain.nz61 := -7+b;
 frmMain.nz62 := -7+b;
 frmMain.nz63 := -8+b;
 frmMain.nz64 := -8+b;
 frmMain.nz65 := -9+b;
 frmMain.nz66 := -9+b;
 frmMain.nz67 := -10+b;
 frmMain.nz68 := -10+b;
 frmMain.nz69 := -11+b;
 frmMain.nz70 := -11+b;


  ///3
 ///
 ///
 frmMain.nz71 := -2+b;
 frmMain.nz72 :=-2+b;
 frmMain.nz73 := -3+b;
 frmMain.nz74 :=  -3+b;
 frmMain.nz75 := -4+b;
 frmMain.nz76 := -4+b;
 frmMain.nz77 := -5+b;
 frmMain.nz78 := -5+b;
 frmMain.nz79 := -6+b;
 frmMain.nz80 := -6+b;
 frmMain.nz81 := -7+b;
 frmMain.nz82 := -7+b;
 frmMain.nz83 := -8+b;
 frmMain.nz84 := -8+b;
 frmMain.nz85 := -9+b;
 frmMain.nz86 := -9+b;
 frmMain.nz87 := -10+b;
 frmMain.nz88 := -10+b;
 frmMain.nz89 := -11+b;
 frmMain.nz90 := -2+b;

frmMain.nz94 :=1+b;
frmMain.nz95 :=1+b;  //цифры
frmMain.nz96 :=1+b;  //цифры
frmMain.nz97 :=1+b;  //цифры
frmMain.nz98 := 1+b;  //цифры
frmMain.nz99 := 1+b;  //цифры
frmMain.nz100 := 1+b;  //цифры
frmMain.nz101 := 1+b;  //цифры
frmMain.nz102 := 1+b;  //цифры
frmMain.nz103 := 1+b;  //цифры

frmMain.nz104 := -0+b;  //буквы
frmMain.nz105 := -2+b;  //буквы
frmMain.nz106 := -4+b;  //буквы
frmMain.nz107 := -6+b;  //буквы
frmMain.nz108 := -8+b;  //буквы
frmMain.nz109 := -10+b;  //буквы
frmMain.nz110 := -12+b;  //буквы
frmMain.nz111 := -14+b;  //буквы
frmMain.nz112 := -16+b;  //буквы
frmMain.nz113 := -18+b;  //буквы

frmMain.nz114 := -4+b;  //корабль
frmMain.nz115 := -18+b;  //цифры
frmMain.nz116 :=-18+b;  //цифры
frmMain.nz117 :=-18+b;  //цифры
frmMain.nz118 :=-18+b;  //цифры
frmMain.nz119 := -18+b;  //цифры
frmMain.nz120 := -18+b;  //цифры
frmMain.nz121 := -18+b;  //цифры
frmMain.nz122 := -18+b;  //цифры
frmMain.nz123 := -18+b;  //цифры
frmMain.nz124 := -18+b;  //цифры
frmMain.nz125 := -16+b;
frmMain.nz126 := -14+b;
frmMain.nz127 := -12+b;
frmMain.nz128 := -16+b;
frmMain.nz129 := -16+b;
frmMain.nz130 := -16+b;
frmMain.nz131 := -16+b;
frmMain.nz132 := -16+b;
frmMain.nz133 := -16+b;
frmMain.nz134 := -16+b;
frmMain.nz135 := -16+b;
frmMain.nz136 := -14+b;
frmMain.nz137 := -14+b;
frmMain.nz138 := -14+b;
frmMain.nz139 := -14+b;
frmMain.nz140 := -14+b;
frmMain.nz141 := -15+b;
frmMain.nz142 := -15+b;
frmMain.nz143 := -15+b;
frmMain.nz144 := -15+b;
frmMain.nz145 := -15+b;
frmMain.nz146 := -15+b;
frmMain.nz147 := -15+b;
frmMain.nz148 := -15+b;
frmMain.nz149 := -14+b;
frmMain.nz150 := -14+b;
frmMain.nz151 := -12+b;
frmMain.nz152 := -12+b;
frmMain.nz153 := -13+b;
frmMain.nz154 := -13+b;
frmMain.nz155 := -13+b;
frmMain.nz156 := -6+b;
frmMain.nz157 := -12+b;
frmMain.nz158 := -12+b;
frmMain.nz159 := -12+b;
frmMain.nz160 := -12+b;
frmMain.nz161 := -10+b;
frmMain.nz162 := -10+b;
frmMain.nz163 := -10+b;
frmMain.nz164 := -10+b;
frmMain.nz165 := -8+b;
frmMain.nz166 := -8+b;
frmMain.nz167 := -8+b;
frmMain.nz168 := -8+b;
frmMain.nz169 := -6+b;
frmMain.nz170 := -6+b;
frmMain.nz171 := -6+b;
frmMain.nz172 := -6+b;
frmMain.nz173 := -4+b;
frmMain.nz174 := -4+b;
frmMain.nz175 := -4+b;
frmMain.nz176 := -4+b;
frmMain.nz177 := -2+b;
frmMain.nz178 := -2+b;
frmMain.nz179 := -2+b;
frmMain.nz180 := -2+b;
 frmMain.nz181 := -3+b;
 frmMain.nz182 := -3+b;
 frmMain.nz183 := -3+b;
 frmMain.nz184 := -3+b;
 frmMain.nz185 := - 5+b;
 frmMain.nz186 := -5+b;
 frmMain.nz187 := -5+b;
 frmMain.nz188 := -5+b;
 frmMain.nz189 := -7+b;
 frmMain.nz190 := -7+b;
 frmMain.nz191 := -7+b;
 frmMain.nz192 := -7+b;
 frmMain.nz193 := -9+b;
 frmMain.nz194 := -9+b;
 frmMain.nz195 := -9+b;
 frmMain.nz196 := -9+b;
 frmMain.nz197 := -11+b;
 frmMain.nz198 := -11+b;
 frmMain.nz199 := -11+b;
 frmMain.nz200 := -11+b;
 frmMain.nz201 := -13+b;
 frmMain.nz202 := -13+b;
 frmMain.nz203 := -13+b;
 frmMain.nz204 := -13+b;
 frmMain.nz205 := -4+b;  //корабль
 frmMain.nz206 := -8+b;  //Подлодка
 frmMain.nz215 := -12+b;
 frmMain.frmGL.Width:=800;
 b:=0;

 end;







 if (c=8) and (d=9) then
begin
StringGrid1.Cells[c,d]:='1';
a:=a-5;
b:=b+3;
frmMain.nx := 0+a;
  frmMain.nx1 := 0+a;
  frmMain.nx2 := 0+a;
 frmMain.nx3 := 0+a;
 frmMain.nx7 := -1+a;
 frmMain.nx8 := 1+a;
 frmMain.nx9 := -1+a;
  frmMain.nx10 := -2+a;
 frmMain.nx11 := -1+a;
 frmMain.nx12 := 1+a;
 frmMain.nx14 := 1+a;
 frmMain.nx15 := -1+a;
 frmMain.nx16 := -1+a;
 frmMain.nx17 := 1+a;
  frmMain.nx18 := -1+a;
 frmMain.nx19 := 1+a;
 frmMain.nx20 := -1+a;
 frmMain.nx21 := -1+a;
 frmMain.nx22 := 1+a;
  frmMain.nx23 := -1+a;
 frmMain.nx24 := 1+a;
  frmMain.nx25 := 1+a;
 frmMain.nx26 := -1+a;
 frmMain.nx27 := 1+a;
  frmMain.nx28 := -1+a;
  frmMain.nx29 := 1+a;
 frmMain.nx30 := -1+a;

// 1

 frmMain.nx31 := -2+a;
 frmMain.nx32 := 2+a;
 frmMain.nx33 := -2+a;
 frmMain.nx34 :=  2+a;
 frmMain.nx35 := -2+a;
 frmMain.nx36 := 2+a;
  frmMain.nx37 := -2+a;
 frmMain.nx38 := 2+a;
 frmMain.nx39 := -2+a;
 frmMain.nx40 := 2+a;
 frmMain.nx41 := -2+a;
 frmMain.nx42 := 2+a;
 frmMain.nx43 := -2+a;
 frmMain.nx44 := 2+a;
 frmMain.nx45 := -2+a;  //////////////


 //////////////////////

 frmMain.nx46 := -2+a;
 frmMain.nx47 := -2+a;
 frmMain.nx48 := 2+a;
 frmMain.nx49 := -2+a;
 frmMain.nx50 := 2+a;
 frmMain.nx51 := -3+a;
 frmMain.nx52 :=3+a;
 frmMain.nx53 := -3+a;
 frmMain.nx54 :=  3+a;
 frmMain.nx55 := -3+a;
 frmMain.nx56 := 3+a;
 frmMain.nx57 := -3+a;
 frmMain.nx58 := 3+a;
 frmMain.nx59 := -3+a;
 frmMain.nx60 := 3+a;
 frmMain.nx61 := -3+a;
 frmMain.nx62 := 3+a;
 frmMain.nx63 := -3+a;
 frmMain.nx64 := 3+a;
 frmMain.nx65 := -3+a;
 frmMain.nx66 := 3+a;
 frmMain.nx67 := -3+a;
 frmMain.nx68 := 3+a;
 frmMain.nx69 := -3+a;
 frmMain.nx70 := 3+a;


  ///3
 ///
 ///
 frmMain.nx71 := -4+a;
 frmMain.nx72 :=4+a;
 frmMain.nx73 := -4+a;
 frmMain.nx74 :=  4+a;
 frmMain.nx75 := -4+a;
 frmMain.nx76 := 4+a;
 frmMain.nx77 := -4+a;
 frmMain.nx78 := 4+a;
 frmMain.nx79 := -4+a;
 frmMain.nx80 := 4+a;
 frmMain.nx81 := -4+a;
 frmMain.nx82 := 4+a;
 frmMain.nx83 := -4+a;
 frmMain.nx84 := 4+a;
 frmMain.nx85 := -4+a;
 frmMain.nx86 := 4+a;
 frmMain.nx87 := -4+a;
 frmMain.nx88 := 4+a;
 frmMain.nx89 := -4+a;
 frmMain.nx90 := -2+a;

frmMain.nx94 :=0+a;
frmMain.nx95 :=-2+a;  //цифры
frmMain.nx96 :=-4+a;  //цифры
frmMain.nx97 :=-6+a;  //цифры
frmMain.nx98 := 2+a;  //цифры
frmMain.nx99 := 4+a;  //цифры
frmMain.nx100 := 6+a;  //цифры
frmMain.nx101 := 8+a;  //цифры
frmMain.nx102 := 10+a;  //цифры
frmMain.nx103 := 12+a;  //цифры

frmMain.nx104 := -8+a;  //буквы
frmMain.nx105 := -8+a;  //буквы
frmMain.nx106 := -8+a;  //буквы
frmMain.nx107 := -8+a;  //буквы
frmMain.nx108 := -8+a;  //буквы
frmMain.nx109 := -8+a;  //буквы
frmMain.nx110 := -8+a;  //буквы
frmMain.nx111 := -8+a;  //буквы
frmMain.nx112 := -8+a;  //буквы
frmMain.nx113 := -8+a;  //буквы

frmMain.nx114 := -6+a;  //корабль
frmMain.nx115 := 0+a;  //цифры
frmMain.nx116 :=-2+a;  //цифры
frmMain.nx117 :=-4+a;  //цифры
frmMain.nx118 :=-6+a;  //цифры
frmMain.nx119 := 2+a;  //цифры
frmMain.nx120 := 4+a;  //цифры
frmMain.nx121 := 6+a;  //цифры
frmMain.nx122 := 8+a;  //цифры
frmMain.nx123 := 10+a;  //цифры
frmMain.nx124 := 12+a;  //цифры
frmMain.nx125 := 0+a;
frmMain.nx126 := 0+a;
frmMain.nx127 := 0+a;
frmMain.nx128 := 2+a;
frmMain.nx129 := -2+a;
frmMain.nx130 := -4+a;
frmMain.nx131 := 4+a;
frmMain.nx132 := -6+a;
frmMain.nx133 := 6+a;
frmMain.nx134 := 8+a;
frmMain.nx135 := -8+a;
frmMain.nx136 := -2+a;
frmMain.nx137 := 2+a;
frmMain.nx138 := -4+a;
frmMain.nx139 := 4+a;
frmMain.nx140 := -2+a;
frmMain.nx141 := 2+a;
frmMain.nx142 := 0+a;
frmMain.nx143 := 2+a;
frmMain.nx144 := -2+a;
frmMain.nx145 := -4+a;
frmMain.nx146 := 4+a;
frmMain.nx147 := 6+a;
frmMain.nx148 := -6+a;
frmMain.nx149 := -6+a;
frmMain.nx150 := 6+a;
frmMain.nx151 := 2+a;
frmMain.nx152 := -2+a;
frmMain.nx153 := 2+a;
frmMain.nx154 := -2+a;
frmMain.nx155 := 0+a;
frmMain.nx156 := 0+a;
frmMain.nx157 := 4+a;
frmMain.nx158 := -4+a;
frmMain.nx159 := -6+a;
frmMain.nx160 := 6+a;
frmMain.nx161 := 4+a;
frmMain.nx162 := -4+a;
frmMain.nx163 := -6+a;
frmMain.nx164 := 6+a;
frmMain.nx165 := 4+a;
frmMain.nx166 := -4+a;
frmMain.nx167 := -6+a;
frmMain.nx168 := 6+a;
frmMain.nx169 := 4+a;
frmMain.nx170 := -4+a;
frmMain.nx171 := -6+a;
frmMain.nx172 := 6+a;
frmMain.nx173 := 4+a;
frmMain.nx174 := -4+a;
frmMain.nx175 := -6+a;
frmMain.nx176 := 6+a;
frmMain.nx177 := 4+a;
frmMain.nx178 := -4+a;
frmMain.nx179 := -6+a;
frmMain.nx180 := 6+a;
 frmMain.nx181 := 4+a;
 frmMain.nx182 := -4+a;
 frmMain.nx183 := -6+a;
 frmMain.nx184 := 6+a;
 frmMain.nx185 := 4+a;
 frmMain.nx186 := -4+a;
 frmMain.nx187 := -6+a;
 frmMain.nx188 := 6+a;
 frmMain.nx189 := -4+a;
 frmMain.nx190 := 4+a;
 frmMain.nx191 := -6+a;
 frmMain.nx192 := 6+a;
 frmMain.nx193 := -4+a;
 frmMain.nx194 := 4+a;
 frmMain.nx195 := -6+a;
 frmMain.nx196 := 6+a;
 frmMain.nx197 := -4+a;
 frmMain.nx198 := 4+a;
 frmMain.nx199 := -6+a;
 frmMain.nx200 := 6+a;
 frmMain.nx201 := -4+a;
 frmMain.nx202 := 4+a;
 frmMain.nx203 := -6+a;
 frmMain.nx204 := 6+a;
 frmMain.nx205 := 6+a;  //корабль
 frmMain.nx206 := 6+a;  //Подлодка
 frmMain.nx215 := -6+a;
 frmMain.frmGL.Width:=800;
 a:=0;
 frmMain.nz := 0+b;
  frmMain.nz1 := 0+b;
  frmMain.nz2 := 0+b;
 frmMain.nz3 := 1+b;
 frmMain.nz7 := 0+b;
 frmMain.nz8 := 2+b;
 frmMain.nz9 := 2+b;
  frmMain.nz10 := -2+b;
 frmMain.nz11 := -2+b;
 frmMain.nz12 := -2+b;
 frmMain.nz14 := -3+b;
 frmMain.nz15 := -3+b;
 frmMain.nz16 := -4+b;
 frmMain.nz17 := -4+b;
  frmMain.nz18 := -5+b;
 frmMain.nz19 := -5+b;
 frmMain.nz20 := -6+b;
 frmMain.nz21 := -7+b;
 frmMain.nz22 := -7+b;
  frmMain.nz23 := -8+b;
 frmMain.nz24 := -8+b;
  frmMain.nz25 := -9+b;
 frmMain.nz26 := -9+b;
 frmMain.nz27 := -10+b;
  frmMain.nz28 := -10+b;
  frmMain.nz29 := -11+b;
 frmMain.nz30 := -11+b;

// 1

 frmMain.nz31 := -2+b;
 frmMain.nz32 := -2+b;
 frmMain.nz33 := -3+b;
 frmMain.nz34 := -3+b;
 frmMain.nz35 := -4+b;
 frmMain.nz36 := -4+b;
  frmMain.nz37 := -5+b;
 frmMain.nz38 := -5+b;
 frmMain.nz39 := -6+b;
 frmMain.nz40 := -6+b;
 frmMain.nz41 := -7+b;
 frmMain.nz42 := -7+b;
 frmMain.nz43 := -8+b;
 frmMain.nz44 := -8+b;
 frmMain.nz45 := -9+b;  //////////////


 //////////////////////

 frmMain.nz46 := -9+b;
 frmMain.nz47 := -9+b;
 frmMain.nz48 := -10+b;
 frmMain.nz49 := -11+b;
 frmMain.nz50 := -11+b;
 frmMain.nz51 := -2+b;
 frmMain.nz52 :=-2+b;
 frmMain.nz53 := -3+b;
 frmMain.nz54 :=  3+b;
 frmMain.nz55 := -3+b;
 frmMain.nz56 := -4+b;
 frmMain.nz57 := -5+b;
 frmMain.nz58 := -5+b;
 frmMain.nz59 := -6+b;
 frmMain.nz60 := -6+b;
 frmMain.nz61 := -7+b;
 frmMain.nz62 := -7+b;
 frmMain.nz63 := -8+b;
 frmMain.nz64 := -8+b;
 frmMain.nz65 := -9+b;
 frmMain.nz66 := -9+b;
 frmMain.nz67 := -10+b;
 frmMain.nz68 := -10+b;
 frmMain.nz69 := -11+b;
 frmMain.nz70 := -11+b;


  ///3
 ///
 ///
 frmMain.nz71 := -2+b;
 frmMain.nz72 :=-2+b;
 frmMain.nz73 := -3+b;
 frmMain.nz74 :=  -3+b;
 frmMain.nz75 := -4+b;
 frmMain.nz76 := -4+b;
 frmMain.nz77 := -5+b;
 frmMain.nz78 := -5+b;
 frmMain.nz79 := -6+b;
 frmMain.nz80 := -6+b;
 frmMain.nz81 := -7+b;
 frmMain.nz82 := -7+b;
 frmMain.nz83 := -8+b;
 frmMain.nz84 := -8+b;
 frmMain.nz85 := -9+b;
 frmMain.nz86 := -9+b;
 frmMain.nz87 := -10+b;
 frmMain.nz88 := -10+b;
 frmMain.nz89 := -11+b;
 frmMain.nz90 := -2+b;

frmMain.nz94 :=1+b;
frmMain.nz95 :=1+b;  //цифры
frmMain.nz96 :=1+b;  //цифры
frmMain.nz97 :=1+b;  //цифры
frmMain.nz98 := 1+b;  //цифры
frmMain.nz99 := 1+b;  //цифры
frmMain.nz100 := 1+b;  //цифры
frmMain.nz101 := 1+b;  //цифры
frmMain.nz102 := 1+b;  //цифры
frmMain.nz103 := 1+b;  //цифры

frmMain.nz104 := -0+b;  //буквы
frmMain.nz105 := -2+b;  //буквы
frmMain.nz106 := -4+b;  //буквы
frmMain.nz107 := -6+b;  //буквы
frmMain.nz108 := -8+b;  //буквы
frmMain.nz109 := -10+b;  //буквы
frmMain.nz110 := -12+b;  //буквы
frmMain.nz111 := -14+b;  //буквы
frmMain.nz112 := -16+b;  //буквы
frmMain.nz113 := -18+b;  //буквы

frmMain.nz114 := -4+b;  //корабль
frmMain.nz115 := -18+b;  //цифры
frmMain.nz116 :=-18+b;  //цифры
frmMain.nz117 :=-18+b;  //цифры
frmMain.nz118 :=-18+b;  //цифры
frmMain.nz119 := -18+b;  //цифры
frmMain.nz120 := -18+b;  //цифры
frmMain.nz121 := -18+b;  //цифры
frmMain.nz122 := -18+b;  //цифры
frmMain.nz123 := -18+b;  //цифры
frmMain.nz124 := -18+b;  //цифры
frmMain.nz125 := -16+b;
frmMain.nz126 := -14+b;
frmMain.nz127 := -12+b;
frmMain.nz128 := -16+b;
frmMain.nz129 := -16+b;
frmMain.nz130 := -16+b;
frmMain.nz131 := -16+b;
frmMain.nz132 := -16+b;
frmMain.nz133 := -16+b;
frmMain.nz134 := -16+b;
frmMain.nz135 := -16+b;
frmMain.nz136 := -14+b;
frmMain.nz137 := -14+b;
frmMain.nz138 := -14+b;
frmMain.nz139 := -14+b;
frmMain.nz140 := -14+b;
frmMain.nz141 := -15+b;
frmMain.nz142 := -15+b;
frmMain.nz143 := -15+b;
frmMain.nz144 := -15+b;
frmMain.nz145 := -15+b;
frmMain.nz146 := -15+b;
frmMain.nz147 := -15+b;
frmMain.nz148 := -15+b;
frmMain.nz149 := -14+b;
frmMain.nz150 := -14+b;
frmMain.nz151 := -12+b;
frmMain.nz152 := -12+b;
frmMain.nz153 := -13+b;
frmMain.nz154 := -13+b;
frmMain.nz155 := -13+b;
frmMain.nz156 := -6+b;
frmMain.nz157 := -12+b;
frmMain.nz158 := -12+b;
frmMain.nz159 := -12+b;
frmMain.nz160 := -12+b;
frmMain.nz161 := -10+b;
frmMain.nz162 := -10+b;
frmMain.nz163 := -10+b;
frmMain.nz164 := -10+b;
frmMain.nz165 := -8+b;
frmMain.nz166 := -8+b;
frmMain.nz167 := -8+b;
frmMain.nz168 := -8+b;
frmMain.nz169 := -6+b;
frmMain.nz170 := -6+b;
frmMain.nz171 := -6+b;
frmMain.nz172 := -6+b;
frmMain.nz173 := -4+b;
frmMain.nz174 := -4+b;
frmMain.nz175 := -4+b;
frmMain.nz176 := -4+b;
frmMain.nz177 := -2+b;
frmMain.nz178 := -2+b;
frmMain.nz179 := -2+b;
frmMain.nz180 := -2+b;
 frmMain.nz181 := -3+b;
 frmMain.nz182 := -3+b;
 frmMain.nz183 := -3+b;
 frmMain.nz184 := -3+b;
 frmMain.nz185 := - 5+b;
 frmMain.nz186 := -5+b;
 frmMain.nz187 := -5+b;
 frmMain.nz188 := -5+b;
 frmMain.nz189 := -7+b;
 frmMain.nz190 := -7+b;
 frmMain.nz191 := -7+b;
 frmMain.nz192 := -7+b;
 frmMain.nz193 := -9+b;
 frmMain.nz194 := -9+b;
 frmMain.nz195 := -9+b;
 frmMain.nz196 := -9+b;
 frmMain.nz197 := -11+b;
 frmMain.nz198 := -11+b;
 frmMain.nz199 := -11+b;
 frmMain.nz200 := -11+b;
 frmMain.nz201 := -13+b;
 frmMain.nz202 := -13+b;
 frmMain.nz203 := -13+b;
 frmMain.nz204 := -13+b;
 frmMain.nz205 := -4+b;  //корабль
 frmMain.nz206 := -8+b;  //Подлодка
 frmMain.nz215 := -12+b;
 frmMain.frmGL.Width:=800;
 b:=0;

 end;


 if (c=8) and (d=8) then
begin
StringGrid1.Cells[c,d]:='1';
a:=a-5;
b:=b+5;
frmMain.nx := 0+a;
  frmMain.nx1 := 0+a;
  frmMain.nx2 := 0+a;
 frmMain.nx3 := 0+a;
 frmMain.nx7 := -1+a;
 frmMain.nx8 := 1+a;
 frmMain.nx9 := -1+a;
  frmMain.nx10 := -2+a;
 frmMain.nx11 := -1+a;
 frmMain.nx12 := 1+a;
 frmMain.nx14 := 1+a;
 frmMain.nx15 := -1+a;
 frmMain.nx16 := -1+a;
 frmMain.nx17 := 1+a;
  frmMain.nx18 := -1+a;
 frmMain.nx19 := 1+a;
 frmMain.nx20 := -1+a;
 frmMain.nx21 := -1+a;
 frmMain.nx22 := 1+a;
  frmMain.nx23 := -1+a;
 frmMain.nx24 := 1+a;
  frmMain.nx25 := 1+a;
 frmMain.nx26 := -1+a;
 frmMain.nx27 := 1+a;
  frmMain.nx28 := -1+a;
  frmMain.nx29 := 1+a;
 frmMain.nx30 := -1+a;

// 1

 frmMain.nx31 := -2+a;
 frmMain.nx32 := 2+a;
 frmMain.nx33 := -2+a;
 frmMain.nx34 :=  2+a;
 frmMain.nx35 := -2+a;
 frmMain.nx36 := 2+a;
  frmMain.nx37 := -2+a;
 frmMain.nx38 := 2+a;
 frmMain.nx39 := -2+a;
 frmMain.nx40 := 2+a;
 frmMain.nx41 := -2+a;
 frmMain.nx42 := 2+a;
 frmMain.nx43 := -2+a;
 frmMain.nx44 := 2+a;
 frmMain.nx45 := -2+a;  //////////////


 //////////////////////

 frmMain.nx46 := -2+a;
 frmMain.nx47 := -2+a;
 frmMain.nx48 := 2+a;
 frmMain.nx49 := -2+a;
 frmMain.nx50 := 2+a;
 frmMain.nx51 := -3+a;
 frmMain.nx52 :=3+a;
 frmMain.nx53 := -3+a;
 frmMain.nx54 :=  3+a;
 frmMain.nx55 := -3+a;
 frmMain.nx56 := 3+a;
 frmMain.nx57 := -3+a;
 frmMain.nx58 := 3+a;
 frmMain.nx59 := -3+a;
 frmMain.nx60 := 3+a;
 frmMain.nx61 := -3+a;
 frmMain.nx62 := 3+a;
 frmMain.nx63 := -3+a;
 frmMain.nx64 := 3+a;
 frmMain.nx65 := -3+a;
 frmMain.nx66 := 3+a;
 frmMain.nx67 := -3+a;
 frmMain.nx68 := 3+a;
 frmMain.nx69 := -3+a;
 frmMain.nx70 := 3+a;


  ///3
 ///
 ///
 frmMain.nx71 := -4+a;
 frmMain.nx72 :=4+a;
 frmMain.nx73 := -4+a;
 frmMain.nx74 :=  4+a;
 frmMain.nx75 := -4+a;
 frmMain.nx76 := 4+a;
 frmMain.nx77 := -4+a;
 frmMain.nx78 := 4+a;
 frmMain.nx79 := -4+a;
 frmMain.nx80 := 4+a;
 frmMain.nx81 := -4+a;
 frmMain.nx82 := 4+a;
 frmMain.nx83 := -4+a;
 frmMain.nx84 := 4+a;
 frmMain.nx85 := -4+a;
 frmMain.nx86 := 4+a;
 frmMain.nx87 := -4+a;
 frmMain.nx88 := 4+a;
 frmMain.nx89 := -4+a;
 frmMain.nx90 := -2+a;

frmMain.nx94 :=0+a;
frmMain.nx95 :=-2+a;  //цифры
frmMain.nx96 :=-4+a;  //цифры
frmMain.nx97 :=-6+a;  //цифры
frmMain.nx98 := 2+a;  //цифры
frmMain.nx99 := 4+a;  //цифры
frmMain.nx100 := 6+a;  //цифры
frmMain.nx101 := 8+a;  //цифры
frmMain.nx102 := 10+a;  //цифры
frmMain.nx103 := 12+a;  //цифры

frmMain.nx104 := -8+a;  //буквы
frmMain.nx105 := -8+a;  //буквы
frmMain.nx106 := -8+a;  //буквы
frmMain.nx107 := -8+a;  //буквы
frmMain.nx108 := -8+a;  //буквы
frmMain.nx109 := -8+a;  //буквы
frmMain.nx110 := -8+a;  //буквы
frmMain.nx111 := -8+a;  //буквы
frmMain.nx112 := -8+a;  //буквы
frmMain.nx113 := -8+a;  //буквы

frmMain.nx114 := -6+a;  //корабль
frmMain.nx115 := 0+a;  //цифры
frmMain.nx116 :=-2+a;  //цифры
frmMain.nx117 :=-4+a;  //цифры
frmMain.nx118 :=-6+a;  //цифры
frmMain.nx119 := 2+a;  //цифры
frmMain.nx120 := 4+a;  //цифры
frmMain.nx121 := 6+a;  //цифры
frmMain.nx122 := 8+a;  //цифры
frmMain.nx123 := 10+a;  //цифры
frmMain.nx124 := 12+a;  //цифры
frmMain.nx125 := 0+a;
frmMain.nx126 := 0+a;
frmMain.nx127 := 0+a;
frmMain.nx128 := 2+a;
frmMain.nx129 := -2+a;
frmMain.nx130 := -4+a;
frmMain.nx131 := 4+a;
frmMain.nx132 := -6+a;
frmMain.nx133 := 6+a;
frmMain.nx134 := 8+a;
frmMain.nx135 := -8+a;
frmMain.nx136 := -2+a;
frmMain.nx137 := 2+a;
frmMain.nx138 := -4+a;
frmMain.nx139 := 4+a;
frmMain.nx140 := -2+a;
frmMain.nx141 := 2+a;
frmMain.nx142 := 0+a;
frmMain.nx143 := 2+a;
frmMain.nx144 := -2+a;
frmMain.nx145 := -4+a;
frmMain.nx146 := 4+a;
frmMain.nx147 := 6+a;
frmMain.nx148 := -6+a;
frmMain.nx149 := -6+a;
frmMain.nx150 := 6+a;
frmMain.nx151 := 2+a;
frmMain.nx152 := -2+a;
frmMain.nx153 := 2+a;
frmMain.nx154 := -2+a;
frmMain.nx155 := 0+a;
frmMain.nx156 := 0+a;
frmMain.nx157 := 4+a;
frmMain.nx158 := -4+a;
frmMain.nx159 := -6+a;
frmMain.nx160 := 6+a;
frmMain.nx161 := 4+a;
frmMain.nx162 := -4+a;
frmMain.nx163 := -6+a;
frmMain.nx164 := 6+a;
frmMain.nx165 := 4+a;
frmMain.nx166 := -4+a;
frmMain.nx167 := -6+a;
frmMain.nx168 := 6+a;
frmMain.nx169 := 4+a;
frmMain.nx170 := -4+a;
frmMain.nx171 := -6+a;
frmMain.nx172 := 6+a;
frmMain.nx173 := 4+a;
frmMain.nx174 := -4+a;
frmMain.nx175 := -6+a;
frmMain.nx176 := 6+a;
frmMain.nx177 := 4+a;
frmMain.nx178 := -4+a;
frmMain.nx179 := -6+a;
frmMain.nx180 := 6+a;
 frmMain.nx181 := 4+a;
 frmMain.nx182 := -4+a;
 frmMain.nx183 := -6+a;
 frmMain.nx184 := 6+a;
 frmMain.nx185 := 4+a;
 frmMain.nx186 := -4+a;
 frmMain.nx187 := -6+a;
 frmMain.nx188 := 6+a;
 frmMain.nx189 := -4+a;
 frmMain.nx190 := 4+a;
 frmMain.nx191 := -6+a;
 frmMain.nx192 := 6+a;
 frmMain.nx193 := -4+a;
 frmMain.nx194 := 4+a;
 frmMain.nx195 := -6+a;
 frmMain.nx196 := 6+a;
 frmMain.nx197 := -4+a;
 frmMain.nx198 := 4+a;
 frmMain.nx199 := -6+a;
 frmMain.nx200 := 6+a;
 frmMain.nx201 := -4+a;
 frmMain.nx202 := 4+a;
 frmMain.nx203 := -6+a;
 frmMain.nx204 := 6+a;
 frmMain.nx205 := 6+a;  //корабль
 frmMain.nx206 := 6+a;  //Подлодка
 frmMain.frmGL.Width:=800;
 a:=0;
 frmMain.nz := 0+b;
  frmMain.nz1 := 0+b;
  frmMain.nz2 := 0+b;
 frmMain.nz3 := 1+b;
 frmMain.nz7 := 0+b;
 frmMain.nz8 := 2+b;
 frmMain.nz9 := 2+b;
  frmMain.nz10 := -2+b;
 frmMain.nz11 := -2+b;
 frmMain.nz12 := -2+b;
 frmMain.nz14 := -3+b;
 frmMain.nz15 := -3+b;
 frmMain.nz16 := -4+b;
 frmMain.nz17 := -4+b;
  frmMain.nz18 := -5+b;
 frmMain.nz19 := -5+b;
 frmMain.nz20 := -6+b;
 frmMain.nz21 := -7+b;
 frmMain.nz22 := -7+b;
  frmMain.nz23 := -8+b;
 frmMain.nz24 := -8+b;
  frmMain.nz25 := -9+b;
 frmMain.nz26 := -9+b;
 frmMain.nz27 := -10+b;
  frmMain.nz28 := -10+b;
  frmMain.nz29 := -11+b;
 frmMain.nz30 := -11+b;

// 1

 frmMain.nz31 := -2+b;
 frmMain.nz32 := -2+b;
 frmMain.nz33 := -3+b;
 frmMain.nz34 := -3+b;
 frmMain.nz35 := -4+b;
 frmMain.nz36 := -4+b;
  frmMain.nz37 := -5+b;
 frmMain.nz38 := -5+b;
 frmMain.nz39 := -6+b;
 frmMain.nz40 := -6+b;
 frmMain.nz41 := -7+b;
 frmMain.nz42 := -7+b;
 frmMain.nz43 := -8+b;
 frmMain.nz44 := -8+b;
 frmMain.nz45 := -9+b;  //////////////


 //////////////////////

 frmMain.nz46 := -9+b;
 frmMain.nz47 := -9+b;
 frmMain.nz48 := -10+b;
 frmMain.nz49 := -11+b;
 frmMain.nz50 := -11+b;
 frmMain.nz51 := -2+b;
 frmMain.nz52 :=-2+b;
 frmMain.nz53 := -3+b;
 frmMain.nz54 :=  3+b;
 frmMain.nz55 := -3+b;
 frmMain.nz56 := -4+b;
 frmMain.nz57 := -5+b;
 frmMain.nz58 := -5+b;
 frmMain.nz59 := -6+b;
 frmMain.nz60 := -6+b;
 frmMain.nz61 := -7+b;
 frmMain.nz62 := -7+b;
 frmMain.nz63 := -8+b;
 frmMain.nz64 := -8+b;
 frmMain.nz65 := -9+b;
 frmMain.nz66 := -9+b;
 frmMain.nz67 := -10+b;
 frmMain.nz68 := -10+b;
 frmMain.nz69 := -11+b;
 frmMain.nz70 := -11+b;


  ///3
 ///
 ///
 frmMain.nz71 := -2+b;
 frmMain.nz72 :=-2+b;
 frmMain.nz73 := -3+b;
 frmMain.nz74 :=  -3+b;
 frmMain.nz75 := -4+b;
 frmMain.nz76 := -4+b;
 frmMain.nz77 := -5+b;
 frmMain.nz78 := -5+b;
 frmMain.nz79 := -6+b;
 frmMain.nz80 := -6+b;
 frmMain.nz81 := -7+b;
 frmMain.nz82 := -7+b;
 frmMain.nz83 := -8+b;
 frmMain.nz84 := -8+b;
 frmMain.nz85 := -9+b;
 frmMain.nz86 := -9+b;
 frmMain.nz87 := -10+b;
 frmMain.nz88 := -10+b;
 frmMain.nz89 := -11+b;
 frmMain.nz90 := -2+b;

frmMain.nz94 :=1+b;
frmMain.nz95 :=1+b;  //цифры
frmMain.nz96 :=1+b;  //цифры
frmMain.nz97 :=1+b;  //цифры
frmMain.nz98 := 1+b;  //цифры
frmMain.nz99 := 1+b;  //цифры
frmMain.nz100 := 1+b;  //цифры
frmMain.nz101 := 1+b;  //цифры
frmMain.nz102 := 1+b;  //цифры
frmMain.nz103 := 1+b;  //цифры

frmMain.nz104 := -0+b;  //буквы
frmMain.nz105 := -2+b;  //буквы
frmMain.nz106 := -4+b;  //буквы
frmMain.nz107 := -6+b;  //буквы
frmMain.nz108 := -8+b;  //буквы
frmMain.nz109 := -10+b;  //буквы
frmMain.nz110 := -12+b;  //буквы
frmMain.nz111 := -14+b;  //буквы
frmMain.nz112 := -16+b;  //буквы
frmMain.nz113 := -18+b;  //буквы

frmMain.nz114 := -4+b;  //корабль
frmMain.nz115 := -18+b;  //цифры
frmMain.nz116 :=-18+b;  //цифры
frmMain.nz117 :=-18+b;  //цифры
frmMain.nz118 :=-18+b;  //цифры
frmMain.nz119 := -18+b;  //цифры
frmMain.nz120 := -18+b;  //цифры
frmMain.nz121 := -18+b;  //цифры
frmMain.nz122 := -18+b;  //цифры
frmMain.nz123 := -18+b;  //цифры
frmMain.nz124 := -18+b;  //цифры
frmMain.nz125 := -16+b;
frmMain.nz126 := -14+b;
frmMain.nz127 := -12+b;
frmMain.nz128 := -16+b;
frmMain.nz129 := -16+b;
frmMain.nz130 := -16+b;
frmMain.nz131 := -16+b;
frmMain.nz132 := -16+b;
frmMain.nz133 := -16+b;
frmMain.nz134 := -16+b;
frmMain.nz135 := -16+b;
frmMain.nz136 := -14+b;
frmMain.nz137 := -14+b;
frmMain.nz138 := -14+b;
frmMain.nz139 := -14+b;
frmMain.nz140 := -14+b;
frmMain.nz141 := -15+b;
frmMain.nz142 := -15+b;
frmMain.nz143 := -15+b;
frmMain.nz144 := -15+b;
frmMain.nz145 := -15+b;
frmMain.nz146 := -15+b;
frmMain.nz147 := -15+b;
frmMain.nz148 := -15+b;
frmMain.nz149 := -14+b;
frmMain.nz150 := -14+b;
frmMain.nz151 := -12+b;
frmMain.nz152 := -12+b;
frmMain.nz153 := -13+b;
frmMain.nz154 := -13+b;
frmMain.nz155 := -13+b;
frmMain.nz156 := -6+b;
frmMain.nz157 := -12+b;
frmMain.nz158 := -12+b;
frmMain.nz159 := -12+b;
frmMain.nz160 := -12+b;
frmMain.nz161 := -10+b;
frmMain.nz162 := -10+b;
frmMain.nz163 := -10+b;
frmMain.nz164 := -10+b;
frmMain.nz165 := -8+b;
frmMain.nz166 := -8+b;
frmMain.nz167 := -8+b;
frmMain.nz168 := -8+b;
frmMain.nz169 := -6+b;
frmMain.nz170 := -6+b;
frmMain.nz171 := -6+b;
frmMain.nz172 := -6+b;
frmMain.nz173 := -4+b;
frmMain.nz174 := -4+b;
frmMain.nz175 := -4+b;
frmMain.nz176 := -4+b;
frmMain.nz177 := -2+b;
frmMain.nz178 := -2+b;
frmMain.nz179 := -2+b;
frmMain.nz180 := -2+b;
 frmMain.nz181 := -3+b;
 frmMain.nz182 := -3+b;
 frmMain.nz183 := -3+b;
 frmMain.nz184 := -3+b;
 frmMain.nz185 := - 5+b;
 frmMain.nz186 := -5+b;
 frmMain.nz187 := -5+b;
 frmMain.nz188 := -5+b;
 frmMain.nz189 := -7+b;
 frmMain.nz190 := -7+b;
 frmMain.nz191 := -7+b;
 frmMain.nz192 := -7+b;
 frmMain.nz193 := -9+b;
 frmMain.nz194 := -9+b;
 frmMain.nz195 := -9+b;
 frmMain.nz196 := -9+b;
 frmMain.nz197 := -11+b;
 frmMain.nz198 := -11+b;
 frmMain.nz199 := -11+b;
 frmMain.nz200 := -11+b;
 frmMain.nz201 := -13+b;
 frmMain.nz202 := -13+b;
 frmMain.nz203 := -13+b;
 frmMain.nz204 := -13+b;
 frmMain.nz205 := -4+b;  //корабль
 frmMain.nz206 := -8+b;  //Подлодка
 frmMain.frmGL.Width:=800;
 b:=0;

 end;





  if (c=8) and (d=7) then
begin
c:=8; d:=6;
StringGrid1.Cells[c,d]:='d';
c:=8; d:=7;
StringGrid1.Cells[c,d]:='1';
a:=a-5;
b:=b+7;
podlodok:=podlodok+1;
label4.Caption:=inttostr(podlodok);
ochkofnabrano:=ochkofnabrano+300;
label6.Caption:=inttostr(ochkofnabrano);
frmMain.nx := 0+a;
  frmMain.nx1 := 0+a;
  frmMain.nx2 := 0+a;
 frmMain.nx3 := 0+a;
 frmMain.nx7 := -1+a;
 frmMain.nx8 := 1+a;
 frmMain.nx9 := -1+a;
  frmMain.nx10 := -2+a;
 frmMain.nx11 := -1+a;
 frmMain.nx12 := 1+a;
 frmMain.nx14 := 1+a;
 frmMain.nx15 := -1+a;
 frmMain.nx16 := -1+a;
 frmMain.nx17 := 1+a;
  frmMain.nx18 := -1+a;
 frmMain.nx19 := 1+a;
 frmMain.nx20 := -1+a;
 frmMain.nx21 := -1+a;
 frmMain.nx22 := 1+a;
  frmMain.nx23 := -1+a;
 frmMain.nx24 := 1+a;
  frmMain.nx25 := 1+a;
 frmMain.nx26 := -1+a;
 frmMain.nx27 := 1+a;
  frmMain.nx28 := -1+a;
  frmMain.nx29 := 1+a;
 frmMain.nx30 := -1+a;

// 1

 frmMain.nx31 := -2+a;
 frmMain.nx32 := 2+a;
 frmMain.nx33 := -2+a;
 frmMain.nx34 :=  2+a;
 frmMain.nx35 := -2+a;
 frmMain.nx36 := 2+a;
  frmMain.nx37 := -2+a;
 frmMain.nx38 := 2+a;
 frmMain.nx39 := -2+a;
 frmMain.nx40 := 2+a;
 frmMain.nx41 := -2+a;
 frmMain.nx42 := 2+a;
 frmMain.nx43 := -2+a;
 frmMain.nx44 := 2+a;
 frmMain.nx45 := -2+a;  //////////////


 //////////////////////

 frmMain.nx46 := -2+a;
 frmMain.nx47 := -2+a;
 frmMain.nx48 := 2+a;
 frmMain.nx49 := -2+a;
 frmMain.nx50 := 2+a;
 frmMain.nx51 := -3+a;
 frmMain.nx52 :=3+a;
 frmMain.nx53 := -3+a;
 frmMain.nx54 :=  3+a;
 frmMain.nx55 := -3+a;
 frmMain.nx56 := 3+a;
 frmMain.nx57 := -3+a;
 frmMain.nx58 := 3+a;
 frmMain.nx59 := -3+a;
 frmMain.nx60 := 3+a;
 frmMain.nx61 := -3+a;
 frmMain.nx62 := 3+a;
 frmMain.nx63 := -3+a;
 frmMain.nx64 := 3+a;
 frmMain.nx65 := -3+a;
 frmMain.nx66 := 3+a;
 frmMain.nx67 := -3+a;
 frmMain.nx68 := 3+a;
 frmMain.nx69 := -3+a;
 frmMain.nx70 := 3+a;


  ///3
 ///
 ///
 frmMain.nx71 := -4+a;
 frmMain.nx72 :=4+a;
 frmMain.nx73 := -4+a;
 frmMain.nx74 :=  4+a;
 frmMain.nx75 := -4+a;
 frmMain.nx76 := 4+a;
 frmMain.nx77 := -4+a;
 frmMain.nx78 := 4+a;
 frmMain.nx79 := -4+a;
 frmMain.nx80 := 4+a;
 frmMain.nx81 := -4+a;
 frmMain.nx82 := 4+a;
 frmMain.nx83 := -4+a;
 frmMain.nx84 := 4+a;
 frmMain.nx85 := -4+a;
 frmMain.nx86 := 4+a;
 frmMain.nx87 := -4+a;
 frmMain.nx88 := 4+a;
 frmMain.nx89 := -4+a;
 frmMain.nx90 := -2+a;

frmMain.nx94 :=0+a;
frmMain.nx95 :=-2+a;  //цифры
frmMain.nx96 :=-4+a;  //цифры
frmMain.nx97 :=-6+a;  //цифры
frmMain.nx98 := 2+a;  //цифры
frmMain.nx99 := 4+a;  //цифры
frmMain.nx100 := 6+a;  //цифры
frmMain.nx101 := 8+a;  //цифры
frmMain.nx102 := 10+a;  //цифры
frmMain.nx103 := 12+a;  //цифры

frmMain.nx104 := -8+a;  //буквы
frmMain.nx105 := -8+a;  //буквы
frmMain.nx106 := -8+a;  //буквы
frmMain.nx107 := -8+a;  //буквы
frmMain.nx108 := -8+a;  //буквы
frmMain.nx109 := -8+a;  //буквы
frmMain.nx110 := -8+a;  //буквы
frmMain.nx111 := -8+a;  //буквы
frmMain.nx112 := -8+a;  //буквы
frmMain.nx113 := -8+a;  //буквы

frmMain.nx114 := -6+a;  //корабль
frmMain.nx115 := 0+a;  //цифры
frmMain.nx116 :=-2+a;  //цифры
frmMain.nx117 :=-4+a;  //цифры
frmMain.nx118 :=-6+a;  //цифры
frmMain.nx119 := 2+a;  //цифры
frmMain.nx120 := 4+a;  //цифры
frmMain.nx121 := 6+a;  //цифры
frmMain.nx122 := 8+a;  //цифры
frmMain.nx123 := 10+a;  //цифры
frmMain.nx124 := 12+a;  //цифры
frmMain.nx125 := 0+a;
frmMain.nx126 := 0+a;
frmMain.nx127 := 0+a;
frmMain.nx128 := 2+a;
frmMain.nx129 := -2+a;
frmMain.nx130 := -4+a;
frmMain.nx131 := 4+a;
frmMain.nx132 := -6+a;
frmMain.nx133 := 6+a;
frmMain.nx134 := 8+a;
frmMain.nx135 := -8+a;
frmMain.nx136 := -2+a;
frmMain.nx137 := 2+a;
frmMain.nx138 := -4+a;
frmMain.nx139 := 4+a;
frmMain.nx140 := -2+a;
frmMain.nx141 := 2+a;
frmMain.nx142 := 0+a;
frmMain.nx143 := 2+a;
frmMain.nx144 := -2+a;
frmMain.nx145 := -4+a;
frmMain.nx146 := 4+a;
frmMain.nx147 := 6+a;
frmMain.nx148 := -6+a;
frmMain.nx149 := -6+a;
frmMain.nx150 := 6+a;
frmMain.nx151 := 2+a;
frmMain.nx152 := -2+a;
frmMain.nx153 := 2+a;
frmMain.nx154 := -2+a;
frmMain.nx155 := 0+a;
frmMain.nx156 := 0+a;
frmMain.nx157 := 4+a;
frmMain.nx158 := -4+a;
frmMain.nx159 := -6+a;
frmMain.nx160 := 6+a;
frmMain.nx161 := 4+a;
frmMain.nx162 := -4+a;
frmMain.nx163 := -6+a;
frmMain.nx164 := 6+a;
frmMain.nx165 := 4+a;
frmMain.nx166 := -4+a;
frmMain.nx167 := -6+a;
frmMain.nx168 := 6+a;
frmMain.nx169 := 4+a;
frmMain.nx170 := -4+a;
frmMain.nx171 := -6+a;
frmMain.nx172 := 6+a;
frmMain.nx173 := 4+a;
frmMain.nx174 := -4+a;
frmMain.nx175 := -6+a;
frmMain.nx176 := 6+a;
frmMain.nx177 := 4+a;
frmMain.nx178 := -4+a;
frmMain.nx179 := -6+a;
frmMain.nx180 := 6+a;
 frmMain.nx181 := 4+a;
 frmMain.nx182 := -4+a;
 frmMain.nx183 := -6+a;
 frmMain.nx184 := 6+a;
 frmMain.nx185 := 4+a;
 frmMain.nx186 := -4+a;
 frmMain.nx187 := -6+a;
 frmMain.nx188 := 6+a;
 frmMain.nx189 := -4+a;
 frmMain.nx190 := 4+a;
 frmMain.nx191 := -6+a;
 frmMain.nx192 := 6+a;
 frmMain.nx193 := -4+a;
 frmMain.nx194 := 4+a;
 frmMain.nx195 := -6+a;
 frmMain.nx196 := 6+a;
 frmMain.nx197 := -4+a;
 frmMain.nx198 := 4+a;
 frmMain.nx199 := -6+a;
 frmMain.nx200 := 6+a;
 frmMain.nx201 := -4+a;
 frmMain.nx202 := 4+a;
 frmMain.nx203 := -6+a;
 frmMain.nx204 := 6+a;
 frmMain.nx205 := 6+a;  //корабль
 frmMain.nx206 := 6+a;  //Подлодка
 frmMain.frmGL.Width:=800;
 a:=0;
 frmMain.nz := 0+b;
  frmMain.nz1 := 0+b;
  frmMain.nz2 := 0+b;
 frmMain.nz3 := 1+b;
 frmMain.nz7 := 0+b;
 frmMain.nz8 := 2+b;
 frmMain.nz9 := 2+b;
  frmMain.nz10 := -2+b;
 frmMain.nz11 := -2+b;
 frmMain.nz12 := -2+b;
 frmMain.nz14 := -3+b;
 frmMain.nz15 := -3+b;
 frmMain.nz16 := -4+b;
 frmMain.nz17 := -4+b;
  frmMain.nz18 := -5+b;
 frmMain.nz19 := -5+b;
 frmMain.nz20 := -6+b;
 frmMain.nz21 := -7+b;
 frmMain.nz22 := -7+b;
  frmMain.nz23 := -8+b;
 frmMain.nz24 := -8+b;
  frmMain.nz25 := -9+b;
 frmMain.nz26 := -9+b;
 frmMain.nz27 := -10+b;
  frmMain.nz28 := -10+b;
  frmMain.nz29 := -11+b;
 frmMain.nz30 := -11+b;

// 1

 frmMain.nz31 := -2+b;
 frmMain.nz32 := -2+b;
 frmMain.nz33 := -3+b;
 frmMain.nz34 := -3+b;
 frmMain.nz35 := -4+b;
 frmMain.nz36 := -4+b;
  frmMain.nz37 := -5+b;
 frmMain.nz38 := -5+b;
 frmMain.nz39 := -6+b;
 frmMain.nz40 := -6+b;
 frmMain.nz41 := -7+b;
 frmMain.nz42 := -7+b;
 frmMain.nz43 := -8+b;
 frmMain.nz44 := -8+b;
 frmMain.nz45 := -9+b;  //////////////


 //////////////////////

 frmMain.nz46 := -9+b;
 frmMain.nz47 := -9+b;
 frmMain.nz48 := -10+b;
 frmMain.nz49 := -11+b;
 frmMain.nz50 := -11+b;
 frmMain.nz51 := -2+b;
 frmMain.nz52 :=-2+b;
 frmMain.nz53 := -3+b;
 frmMain.nz54 :=  3+b;
 frmMain.nz55 := -3+b;
 frmMain.nz56 := -4+b;
 frmMain.nz57 := -5+b;
 frmMain.nz58 := -5+b;
 frmMain.nz59 := -6+b;
 frmMain.nz60 := -6+b;
 frmMain.nz61 := -7+b;
 frmMain.nz62 := -7+b;
 frmMain.nz63 := -8+b;
 frmMain.nz64 := -8+b;
 frmMain.nz65 := -9+b;
 frmMain.nz66 := -9+b;
 frmMain.nz67 := -10+b;
 frmMain.nz68 := -10+b;
 frmMain.nz69 := -11+b;
 frmMain.nz70 := -11+b;


  ///3
 ///
 ///
 frmMain.nz71 := -2+b;
 frmMain.nz72 :=-2+b;
 frmMain.nz73 := -3+b;
 frmMain.nz74 :=  -3+b;
 frmMain.nz75 := -4+b;
 frmMain.nz76 := -4+b;
 frmMain.nz77 := -5+b;
 frmMain.nz78 := -5+b;
 frmMain.nz79 := -6+b;
 frmMain.nz80 := -6+b;
 frmMain.nz81 := -7+b;
 frmMain.nz82 := -7+b;
 frmMain.nz83 := -8+b;
 frmMain.nz84 := -8+b;
 frmMain.nz85 := -9+b;
 frmMain.nz86 := -9+b;
 frmMain.nz87 := -10+b;
 frmMain.nz88 := -10+b;
 frmMain.nz89 := -11+b;
 frmMain.nz90 := -2+b;

frmMain.nz94 :=1+b;
frmMain.nz95 :=1+b;  //цифры
frmMain.nz96 :=1+b;  //цифры
frmMain.nz97 :=1+b;  //цифры
frmMain.nz98 := 1+b;  //цифры
frmMain.nz99 := 1+b;  //цифры
frmMain.nz100 := 1+b;  //цифры
frmMain.nz101 := 1+b;  //цифры
frmMain.nz102 := 1+b;  //цифры
frmMain.nz103 := 1+b;  //цифры

frmMain.nz104 := -0+b;  //буквы
frmMain.nz105 := -2+b;  //буквы
frmMain.nz106 := -4+b;  //буквы
frmMain.nz107 := -6+b;  //буквы
frmMain.nz108 := -8+b;  //буквы
frmMain.nz109 := -10+b;  //буквы
frmMain.nz110 := -12+b;  //буквы
frmMain.nz111 := -14+b;  //буквы
frmMain.nz112 := -16+b;  //буквы
frmMain.nz113 := -18+b;  //буквы

frmMain.nz114 := -4+b;  //корабль
frmMain.nz115 := -18+b;  //цифры
frmMain.nz116 :=-18+b;  //цифры
frmMain.nz117 :=-18+b;  //цифры
frmMain.nz118 :=-18+b;  //цифры
frmMain.nz119 := -18+b;  //цифры
frmMain.nz120 := -18+b;  //цифры
frmMain.nz121 := -18+b;  //цифры
frmMain.nz122 := -18+b;  //цифры
frmMain.nz123 := -18+b;  //цифры
frmMain.nz124 := -18+b;  //цифры
frmMain.nz125 := -16+b;
frmMain.nz126 := -14+b;
frmMain.nz127 := -12+b;
frmMain.nz128 := -16+b;
frmMain.nz129 := -16+b;
frmMain.nz130 := -16+b;
frmMain.nz131 := -16+b;
frmMain.nz132 := -16+b;
frmMain.nz133 := -16+b;
frmMain.nz134 := -16+b;
frmMain.nz135 := -16+b;
frmMain.nz136 := -14+b;
frmMain.nz137 := -14+b;
frmMain.nz138 := -14+b;
frmMain.nz139 := -14+b;
frmMain.nz140 := -14+b;
frmMain.nz141 := -15+b;
frmMain.nz142 := -15+b;
frmMain.nz143 := -15+b;
frmMain.nz144 := -15+b;
frmMain.nz145 := -15+b;
frmMain.nz146 := -15+b;
frmMain.nz147 := -15+b;
frmMain.nz148 := -15+b;
frmMain.nz149 := -14+b;
frmMain.nz150 := -14+b;
frmMain.nz151 := -12+b;
frmMain.nz152 := -12+b;
frmMain.nz153 := -13+b;
frmMain.nz154 := -13+b;
frmMain.nz155 := -13+b;
frmMain.nz156 := -6+b;
frmMain.nz157 := -12+b;
frmMain.nz158 := -12+b;
frmMain.nz159 := -12+b;
frmMain.nz160 := -12+b;
frmMain.nz161 := -10+b;
frmMain.nz162 := -10+b;
frmMain.nz163 := -10+b;
frmMain.nz164 := -10+b;
frmMain.nz165 := -8+b;
frmMain.nz166 := -8+b;
frmMain.nz167 := -8+b;
frmMain.nz168 := -8+b;
frmMain.nz169 := -6+b;
frmMain.nz170 := -6+b;
frmMain.nz171 := -6+b;
frmMain.nz172 := -6+b;
frmMain.nz173 := -4+b;
frmMain.nz174 := -4+b;
frmMain.nz175 := -4+b;
frmMain.nz176 := -4+b;
frmMain.nz177 := -2+b;
frmMain.nz178 := -2+b;
frmMain.nz179 := -2+b;
frmMain.nz180 := -2+b;
 frmMain.nz181 := -3+b;
 frmMain.nz182 := -3+b;
 frmMain.nz183 := -3+b;
 frmMain.nz184 := -3+b;
 frmMain.nz185 := - 5+b;
 frmMain.nz186 := -5+b;
 frmMain.nz187 := -5+b;
 frmMain.nz188 := -5+b;
 frmMain.nz189 := -7+b;
 frmMain.nz190 := -7+b;
 frmMain.nz191 := -7+b;
 frmMain.nz192 := -7+b;
 frmMain.nz193 := -9+b;
 frmMain.nz194 := -9+b;
 frmMain.nz195 := -9+b;
 frmMain.nz196 := -9+b;
 frmMain.nz197 := -11+b;
 frmMain.nz198 := -11+b;
 frmMain.nz199 := -11+b;
 frmMain.nz200 := -11+b;
 frmMain.nz201 := -13+b;
 frmMain.nz202 := -13+b;
 frmMain.nz203 := -13+b;
 frmMain.nz204 := -13+b;
 frmMain.nz205 := -4+b;  //корабль
 frmMain.nz206 := -8+b;  //Подлодка
 frmMain.frmGL.Width:=800;
 b:=0;

 end;





 if (c=8) and (d=6) then
begin
StringGrid1.Cells[c,d]:='1';
a:=a-5;
b:=b+9;

frmMain.nx := 0+a;
  frmMain.nx1 := 0+a;
  frmMain.nx2 := 0+a;
 frmMain.nx3 := 0+a;
 frmMain.nx7 := -1+a;
 frmMain.nx8 := 1+a;
 frmMain.nx9 := -1+a;
  frmMain.nx10 := -2+a;
 frmMain.nx11 := -1+a;
 frmMain.nx12 := 1+a;
 frmMain.nx14 := 1+a;
 frmMain.nx15 := -1+a;
 frmMain.nx16 := -1+a;
 frmMain.nx17 := 1+a;
  frmMain.nx18 := -1+a;
 frmMain.nx19 := 1+a;
 frmMain.nx20 := -1+a;
 frmMain.nx21 := -1+a;
 frmMain.nx22 := 1+a;
  frmMain.nx23 := -1+a;
 frmMain.nx24 := 1+a;
  frmMain.nx25 := 1+a;
 frmMain.nx26 := -1+a;
 frmMain.nx27 := 1+a;
  frmMain.nx28 := -1+a;
  frmMain.nx29 := 1+a;
 frmMain.nx30 := -1+a;

// 1

 frmMain.nx31 := -2+a;
 frmMain.nx32 := 2+a;
 frmMain.nx33 := -2+a;
 frmMain.nx34 :=  2+a;
 frmMain.nx35 := -2+a;
 frmMain.nx36 := 2+a;
  frmMain.nx37 := -2+a;
 frmMain.nx38 := 2+a;
 frmMain.nx39 := -2+a;
 frmMain.nx40 := 2+a;
 frmMain.nx41 := -2+a;
 frmMain.nx42 := 2+a;
 frmMain.nx43 := -2+a;
 frmMain.nx44 := 2+a;
 frmMain.nx45 := -2+a;  //////////////


 //////////////////////

 frmMain.nx46 := -2+a;
 frmMain.nx47 := -2+a;
 frmMain.nx48 := 2+a;
 frmMain.nx49 := -2+a;
 frmMain.nx50 := 2+a;
 frmMain.nx51 := -3+a;
 frmMain.nx52 :=3+a;
 frmMain.nx53 := -3+a;
 frmMain.nx54 :=  3+a;
 frmMain.nx55 := -3+a;
 frmMain.nx56 := 3+a;
 frmMain.nx57 := -3+a;
 frmMain.nx58 := 3+a;
 frmMain.nx59 := -3+a;
 frmMain.nx60 := 3+a;
 frmMain.nx61 := -3+a;
 frmMain.nx62 := 3+a;
 frmMain.nx63 := -3+a;
 frmMain.nx64 := 3+a;
 frmMain.nx65 := -3+a;
 frmMain.nx66 := 3+a;
 frmMain.nx67 := -3+a;
 frmMain.nx68 := 3+a;
 frmMain.nx69 := -3+a;
 frmMain.nx70 := 3+a;


  ///3
 ///
 ///
 frmMain.nx71 := -4+a;
 frmMain.nx72 :=4+a;
 frmMain.nx73 := -4+a;
 frmMain.nx74 :=  4+a;
 frmMain.nx75 := -4+a;
 frmMain.nx76 := 4+a;
 frmMain.nx77 := -4+a;
 frmMain.nx78 := 4+a;
 frmMain.nx79 := -4+a;
 frmMain.nx80 := 4+a;
 frmMain.nx81 := -4+a;
 frmMain.nx82 := 4+a;
 frmMain.nx83 := -4+a;
 frmMain.nx84 := 4+a;
 frmMain.nx85 := -4+a;
 frmMain.nx86 := 4+a;
 frmMain.nx87 := -4+a;
 frmMain.nx88 := 4+a;
 frmMain.nx89 := -4+a;
 frmMain.nx90 := -2+a;

frmMain.nx94 :=0+a;
frmMain.nx95 :=-2+a;  //цифры
frmMain.nx96 :=-4+a;  //цифры
frmMain.nx97 :=-6+a;  //цифры
frmMain.nx98 := 2+a;  //цифры
frmMain.nx99 := 4+a;  //цифры
frmMain.nx100 := 6+a;  //цифры
frmMain.nx101 := 8+a;  //цифры
frmMain.nx102 := 10+a;  //цифры
frmMain.nx103 := 12+a;  //цифры

frmMain.nx104 := -8+a;  //буквы
frmMain.nx105 := -8+a;  //буквы
frmMain.nx106 := -8+a;  //буквы
frmMain.nx107 := -8+a;  //буквы
frmMain.nx108 := -8+a;  //буквы
frmMain.nx109 := -8+a;  //буквы
frmMain.nx110 := -8+a;  //буквы
frmMain.nx111 := -8+a;  //буквы
frmMain.nx112 := -8+a;  //буквы
frmMain.nx113 := -8+a;  //буквы

frmMain.nx114 := -6+a;  //корабль
frmMain.nx115 := 0+a;  //цифры
frmMain.nx116 :=-2+a;  //цифры
frmMain.nx117 :=-4+a;  //цифры
frmMain.nx118 :=-6+a;  //цифры
frmMain.nx119 := 2+a;  //цифры
frmMain.nx120 := 4+a;  //цифры
frmMain.nx121 := 6+a;  //цифры
frmMain.nx122 := 8+a;  //цифры
frmMain.nx123 := 10+a;  //цифры
frmMain.nx124 := 12+a;  //цифры
frmMain.nx125 := 0+a;
frmMain.nx126 := 0+a;
frmMain.nx127 := 0+a;
frmMain.nx128 := 2+a;
frmMain.nx129 := -2+a;
frmMain.nx130 := -4+a;
frmMain.nx131 := 4+a;
frmMain.nx132 := -6+a;
frmMain.nx133 := 6+a;
frmMain.nx134 := 8+a;
frmMain.nx135 := -8+a;
frmMain.nx136 := -2+a;
frmMain.nx137 := 2+a;
frmMain.nx138 := -4+a;
frmMain.nx139 := 4+a;
frmMain.nx140 := -2+a;
frmMain.nx141 := 2+a;
frmMain.nx142 := 0+a;
frmMain.nx143 := 2+a;
frmMain.nx144 := -2+a;
frmMain.nx145 := -4+a;
frmMain.nx146 := 4+a;
frmMain.nx147 := 6+a;
frmMain.nx148 := -6+a;
frmMain.nx149 := -6+a;
frmMain.nx150 := 6+a;
frmMain.nx151 := 2+a;
frmMain.nx152 := -2+a;
frmMain.nx153 := 2+a;
frmMain.nx154 := -2+a;
frmMain.nx155 := 0+a;
frmMain.nx156 := 0+a;
frmMain.nx157 := 4+a;
frmMain.nx158 := -4+a;
frmMain.nx159 := -6+a;
frmMain.nx160 := 6+a;
frmMain.nx161 := 4+a;
frmMain.nx162 := -4+a;
frmMain.nx163 := -6+a;
frmMain.nx164 := 6+a;
frmMain.nx165 := 4+a;
frmMain.nx166 := -4+a;
frmMain.nx167 := -6+a;
frmMain.nx168 := 6+a;
frmMain.nx169 := 4+a;
frmMain.nx170 := -4+a;
frmMain.nx171 := -6+a;
frmMain.nx172 := 6+a;
frmMain.nx173 := 4+a;
frmMain.nx174 := -4+a;
frmMain.nx175 := -6+a;
frmMain.nx176 := 6+a;
frmMain.nx177 := 4+a;
frmMain.nx178 := -4+a;
frmMain.nx179 := -6+a;
frmMain.nx180 := 6+a;
 frmMain.nx181 := 4+a;
 frmMain.nx182 := -4+a;
 frmMain.nx183 := -6+a;
 frmMain.nx184 := 6+a;
 frmMain.nx185 := 4+a;
 frmMain.nx186 := -4+a;
 frmMain.nx187 := -6+a;
 frmMain.nx188 := 6+a;
 frmMain.nx189 := -4+a;
 frmMain.nx190 := 4+a;
 frmMain.nx191 := -6+a;
 frmMain.nx192 := 6+a;
 frmMain.nx193 := -4+a;
 frmMain.nx194 := 4+a;
 frmMain.nx195 := -6+a;
 frmMain.nx196 := 6+a;
 frmMain.nx197 := -4+a;
 frmMain.nx198 := 4+a;
 frmMain.nx199 := -6+a;
 frmMain.nx200 := 6+a;
 frmMain.nx201 := -4+a;
 frmMain.nx202 := 4+a;
 frmMain.nx203 := -6+a;
 frmMain.nx204 := 6+a;
 frmMain.nx205 := 6+a;  //корабль
 frmMain.nx206 := 6+a;  //Подлодка
 frmMain.frmGL.Width:=800;
 a:=0;
 frmMain.nz := 0+b;
  frmMain.nz1 := 0+b;
  frmMain.nz2 := 0+b;
 frmMain.nz3 := 1+b;
 frmMain.nz7 := 0+b;
 frmMain.nz8 := 2+b;
 frmMain.nz9 := 2+b;
  frmMain.nz10 := -2+b;
 frmMain.nz11 := -2+b;
 frmMain.nz12 := -2+b;
 frmMain.nz14 := -3+b;
 frmMain.nz15 := -3+b;
 frmMain.nz16 := -4+b;
 frmMain.nz17 := -4+b;
  frmMain.nz18 := -5+b;
 frmMain.nz19 := -5+b;
 frmMain.nz20 := -6+b;
 frmMain.nz21 := -7+b;
 frmMain.nz22 := -7+b;
  frmMain.nz23 := -8+b;
 frmMain.nz24 := -8+b;
  frmMain.nz25 := -9+b;
 frmMain.nz26 := -9+b;
 frmMain.nz27 := -10+b;
  frmMain.nz28 := -10+b;
  frmMain.nz29 := -11+b;
 frmMain.nz30 := -11+b;

// 1

 frmMain.nz31 := -2+b;
 frmMain.nz32 := -2+b;
 frmMain.nz33 := -3+b;
 frmMain.nz34 := -3+b;
 frmMain.nz35 := -4+b;
 frmMain.nz36 := -4+b;
  frmMain.nz37 := -5+b;
 frmMain.nz38 := -5+b;
 frmMain.nz39 := -6+b;
 frmMain.nz40 := -6+b;
 frmMain.nz41 := -7+b;
 frmMain.nz42 := -7+b;
 frmMain.nz43 := -8+b;
 frmMain.nz44 := -8+b;
 frmMain.nz45 := -9+b;  //////////////


 //////////////////////

 frmMain.nz46 := -9+b;
 frmMain.nz47 := -9+b;
 frmMain.nz48 := -10+b;
 frmMain.nz49 := -11+b;
 frmMain.nz50 := -11+b;
 frmMain.nz51 := -2+b;
 frmMain.nz52 :=-2+b;
 frmMain.nz53 := -3+b;
 frmMain.nz54 :=  3+b;
 frmMain.nz55 := -3+b;
 frmMain.nz56 := -4+b;
 frmMain.nz57 := -5+b;
 frmMain.nz58 := -5+b;
 frmMain.nz59 := -6+b;
 frmMain.nz60 := -6+b;
 frmMain.nz61 := -7+b;
 frmMain.nz62 := -7+b;
 frmMain.nz63 := -8+b;
 frmMain.nz64 := -8+b;
 frmMain.nz65 := -9+b;
 frmMain.nz66 := -9+b;
 frmMain.nz67 := -10+b;
 frmMain.nz68 := -10+b;
 frmMain.nz69 := -11+b;
 frmMain.nz70 := -11+b;


  ///3
 ///
 ///
 frmMain.nz71 := -2+b;
 frmMain.nz72 :=-2+b;
 frmMain.nz73 := -3+b;
 frmMain.nz74 :=  -3+b;
 frmMain.nz75 := -4+b;
 frmMain.nz76 := -4+b;
 frmMain.nz77 := -5+b;
 frmMain.nz78 := -5+b;
 frmMain.nz79 := -6+b;
 frmMain.nz80 := -6+b;
 frmMain.nz81 := -7+b;
 frmMain.nz82 := -7+b;
 frmMain.nz83 := -8+b;
 frmMain.nz84 := -8+b;
 frmMain.nz85 := -9+b;
 frmMain.nz86 := -9+b;
 frmMain.nz87 := -10+b;
 frmMain.nz88 := -10+b;
 frmMain.nz89 := -11+b;
 frmMain.nz90 := -2+b;

frmMain.nz94 :=1+b;
frmMain.nz95 :=1+b;  //цифры
frmMain.nz96 :=1+b;  //цифры
frmMain.nz97 :=1+b;  //цифры
frmMain.nz98 := 1+b;  //цифры
frmMain.nz99 := 1+b;  //цифры
frmMain.nz100 := 1+b;  //цифры
frmMain.nz101 := 1+b;  //цифры
frmMain.nz102 := 1+b;  //цифры
frmMain.nz103 := 1+b;  //цифры

frmMain.nz104 := -0+b;  //буквы
frmMain.nz105 := -2+b;  //буквы
frmMain.nz106 := -4+b;  //буквы
frmMain.nz107 := -6+b;  //буквы
frmMain.nz108 := -8+b;  //буквы
frmMain.nz109 := -10+b;  //буквы
frmMain.nz110 := -12+b;  //буквы
frmMain.nz111 := -14+b;  //буквы
frmMain.nz112 := -16+b;  //буквы
frmMain.nz113 := -18+b;  //буквы

frmMain.nz114 := -4+b;  //корабль
frmMain.nz115 := -18+b;  //цифры
frmMain.nz116 :=-18+b;  //цифры
frmMain.nz117 :=-18+b;  //цифры
frmMain.nz118 :=-18+b;  //цифры
frmMain.nz119 := -18+b;  //цифры
frmMain.nz120 := -18+b;  //цифры
frmMain.nz121 := -18+b;  //цифры
frmMain.nz122 := -18+b;  //цифры
frmMain.nz123 := -18+b;  //цифры
frmMain.nz124 := -18+b;  //цифры
frmMain.nz125 := -16+b;
frmMain.nz126 := -14+b;
frmMain.nz127 := -12+b;
frmMain.nz128 := -16+b;
frmMain.nz129 := -16+b;
frmMain.nz130 := -16+b;
frmMain.nz131 := -16+b;
frmMain.nz132 := -16+b;
frmMain.nz133 := -16+b;
frmMain.nz134 := -16+b;
frmMain.nz135 := -16+b;
frmMain.nz136 := -14+b;
frmMain.nz137 := -14+b;
frmMain.nz138 := -14+b;
frmMain.nz139 := -14+b;
frmMain.nz140 := -14+b;
frmMain.nz141 := -15+b;
frmMain.nz142 := -15+b;
frmMain.nz143 := -15+b;
frmMain.nz144 := -15+b;
frmMain.nz145 := -15+b;
frmMain.nz146 := -15+b;
frmMain.nz147 := -15+b;
frmMain.nz148 := -15+b;
frmMain.nz149 := -14+b;
frmMain.nz150 := -14+b;
frmMain.nz151 := -12+b;
frmMain.nz152 := -12+b;
frmMain.nz153 := -13+b;
frmMain.nz154 := -13+b;
frmMain.nz155 := -13+b;
frmMain.nz156 := -6+b;
frmMain.nz157 := -12+b;
frmMain.nz158 := -12+b;
frmMain.nz159 := -12+b;
frmMain.nz160 := -12+b;
frmMain.nz161 := -10+b;
frmMain.nz162 := -10+b;
frmMain.nz163 := -10+b;
frmMain.nz164 := -10+b;
frmMain.nz165 := -8+b;
frmMain.nz166 := -8+b;
frmMain.nz167 := -8+b;
frmMain.nz168 := -8+b;
frmMain.nz169 := -6+b;
frmMain.nz170 := -6+b;
frmMain.nz171 := -6+b;
frmMain.nz172 := -6+b;
frmMain.nz173 := -4+b;
frmMain.nz174 := -4+b;
frmMain.nz175 := -4+b;
frmMain.nz176 := -4+b;
frmMain.nz177 := -2+b;
frmMain.nz178 := -2+b;
frmMain.nz179 := -2+b;
frmMain.nz180 := -2+b;
 frmMain.nz181 := -3+b;
 frmMain.nz182 := -3+b;
 frmMain.nz183 := -3+b;
 frmMain.nz184 := -3+b;
 frmMain.nz185 := - 5+b;
 frmMain.nz186 := -5+b;
 frmMain.nz187 := -5+b;
 frmMain.nz188 := -5+b;
 frmMain.nz189 := -7+b;
 frmMain.nz190 := -7+b;
 frmMain.nz191 := -7+b;
 frmMain.nz192 := -7+b;
 frmMain.nz193 := -9+b;
 frmMain.nz194 := -9+b;
 frmMain.nz195 := -9+b;
 frmMain.nz196 := -9+b;
 frmMain.nz197 := -11+b;
 frmMain.nz198 := -11+b;
 frmMain.nz199 := -11+b;
 frmMain.nz200 := -11+b;
 frmMain.nz201 := -13+b;
 frmMain.nz202 := -13+b;
 frmMain.nz203 := -13+b;
 frmMain.nz204 := -13+b;
 frmMain.nz205 := -4+b;  //корабль
 frmMain.nz206 := -8+b;  //Подлодка
 frmMain.frmGL.Width:=800;
 b:=0;

 end;





 if (c=8) and (d=5) then
begin
StringGrid1.Cells[c,d]:='1';
a:=a-5;
b:=b+11;
frmMain.nx := 0+a;
  frmMain.nx1 := 0+a;
  frmMain.nx2 := 0+a;
 frmMain.nx3 := 0+a;
 frmMain.nx7 := -1+a;
 frmMain.nx8 := 1+a;
 frmMain.nx9 := -1+a;
  frmMain.nx10 := -2+a;
 frmMain.nx11 := -1+a;
 frmMain.nx12 := 1+a;
 frmMain.nx14 := 1+a;
 frmMain.nx15 := -1+a;
 frmMain.nx16 := -1+a;
 frmMain.nx17 := 1+a;
  frmMain.nx18 := -1+a;
 frmMain.nx19 := 1+a;
 frmMain.nx20 := -1+a;
 frmMain.nx21 := -1+a;
 frmMain.nx22 := 1+a;
  frmMain.nx23 := -1+a;
 frmMain.nx24 := 1+a;
  frmMain.nx25 := 1+a;
 frmMain.nx26 := -1+a;
 frmMain.nx27 := 1+a;
  frmMain.nx28 := -1+a;
  frmMain.nx29 := 1+a;
 frmMain.nx30 := -1+a;

// 1

 frmMain.nx31 := -2+a;
 frmMain.nx32 := 2+a;
 frmMain.nx33 := -2+a;
 frmMain.nx34 :=  2+a;
 frmMain.nx35 := -2+a;
 frmMain.nx36 := 2+a;
  frmMain.nx37 := -2+a;
 frmMain.nx38 := 2+a;
 frmMain.nx39 := -2+a;
 frmMain.nx40 := 2+a;
 frmMain.nx41 := -2+a;
 frmMain.nx42 := 2+a;
 frmMain.nx43 := -2+a;
 frmMain.nx44 := 2+a;
 frmMain.nx45 := -2+a;  //////////////


 //////////////////////

 frmMain.nx46 := -2+a;
 frmMain.nx47 := -2+a;
 frmMain.nx48 := 2+a;
 frmMain.nx49 := -2+a;
 frmMain.nx50 := 2+a;
 frmMain.nx51 := -3+a;
 frmMain.nx52 :=3+a;
 frmMain.nx53 := -3+a;
 frmMain.nx54 :=  3+a;
 frmMain.nx55 := -3+a;
 frmMain.nx56 := 3+a;
 frmMain.nx57 := -3+a;
 frmMain.nx58 := 3+a;
 frmMain.nx59 := -3+a;
 frmMain.nx60 := 3+a;
 frmMain.nx61 := -3+a;
 frmMain.nx62 := 3+a;
 frmMain.nx63 := -3+a;
 frmMain.nx64 := 3+a;
 frmMain.nx65 := -3+a;
 frmMain.nx66 := 3+a;
 frmMain.nx67 := -3+a;
 frmMain.nx68 := 3+a;
 frmMain.nx69 := -3+a;
 frmMain.nx70 := 3+a;


  ///3
 ///
 ///
 frmMain.nx71 := -4+a;
 frmMain.nx72 :=4+a;
 frmMain.nx73 := -4+a;
 frmMain.nx74 :=  4+a;
 frmMain.nx75 := -4+a;
 frmMain.nx76 := 4+a;
 frmMain.nx77 := -4+a;
 frmMain.nx78 := 4+a;
 frmMain.nx79 := -4+a;
 frmMain.nx80 := 4+a;
 frmMain.nx81 := -4+a;
 frmMain.nx82 := 4+a;
 frmMain.nx83 := -4+a;
 frmMain.nx84 := 4+a;
 frmMain.nx85 := -4+a;
 frmMain.nx86 := 4+a;
 frmMain.nx87 := -4+a;
 frmMain.nx88 := 4+a;
 frmMain.nx89 := -4+a;
 frmMain.nx90 := -2+a;

frmMain.nx94 :=0+a;
frmMain.nx95 :=-2+a;  //цифры
frmMain.nx96 :=-4+a;  //цифры
frmMain.nx97 :=-6+a;  //цифры
frmMain.nx98 := 2+a;  //цифры
frmMain.nx99 := 4+a;  //цифры
frmMain.nx100 := 6+a;  //цифры
frmMain.nx101 := 8+a;  //цифры
frmMain.nx102 := 10+a;  //цифры
frmMain.nx103 := 12+a;  //цифры

frmMain.nx104 := -8+a;  //буквы
frmMain.nx105 := -8+a;  //буквы
frmMain.nx106 := -8+a;  //буквы
frmMain.nx107 := -8+a;  //буквы
frmMain.nx108 := -8+a;  //буквы
frmMain.nx109 := -8+a;  //буквы
frmMain.nx110 := -8+a;  //буквы
frmMain.nx111 := -8+a;  //буквы
frmMain.nx112 := -8+a;  //буквы
frmMain.nx113 := -8+a;  //буквы

frmMain.nx114 := -6+a;  //корабль
frmMain.nx115 := 0+a;  //цифры
frmMain.nx116 :=-2+a;  //цифры
frmMain.nx117 :=-4+a;  //цифры
frmMain.nx118 :=-6+a;  //цифры
frmMain.nx119 := 2+a;  //цифры
frmMain.nx120 := 4+a;  //цифры
frmMain.nx121 := 6+a;  //цифры
frmMain.nx122 := 8+a;  //цифры
frmMain.nx123 := 10+a;  //цифры
frmMain.nx124 := 12+a;  //цифры
frmMain.nx125 := 0+a;
frmMain.nx126 := 0+a;
frmMain.nx127 := 0+a;
frmMain.nx128 := 2+a;
frmMain.nx129 := -2+a;
frmMain.nx130 := -4+a;
frmMain.nx131 := 4+a;
frmMain.nx132 := -6+a;
frmMain.nx133 := 6+a;
frmMain.nx134 := 8+a;
frmMain.nx135 := -8+a;
frmMain.nx136 := -2+a;
frmMain.nx137 := 2+a;
frmMain.nx138 := -4+a;
frmMain.nx139 := 4+a;
frmMain.nx140 := -2+a;
frmMain.nx141 := 2+a;
frmMain.nx142 := 0+a;
frmMain.nx143 := 2+a;
frmMain.nx144 := -2+a;
frmMain.nx145 := -4+a;
frmMain.nx146 := 4+a;
frmMain.nx147 := 6+a;
frmMain.nx148 := -6+a;
frmMain.nx149 := -6+a;
frmMain.nx150 := 6+a;
frmMain.nx151 := 2+a;
frmMain.nx152 := -2+a;
frmMain.nx153 := 2+a;
frmMain.nx154 := -2+a;
frmMain.nx155 := 0+a;
frmMain.nx156 := 0+a;
frmMain.nx157 := 4+a;
frmMain.nx158 := -4+a;
frmMain.nx159 := -6+a;
frmMain.nx160 := 6+a;
frmMain.nx161 := 4+a;
frmMain.nx162 := -4+a;
frmMain.nx163 := -6+a;
frmMain.nx164 := 6+a;
frmMain.nx165 := 4+a;
frmMain.nx166 := -4+a;
frmMain.nx167 := -6+a;
frmMain.nx168 := 6+a;
frmMain.nx169 := 4+a;
frmMain.nx170 := -4+a;
frmMain.nx171 := -6+a;
frmMain.nx172 := 6+a;
frmMain.nx173 := 4+a;
frmMain.nx174 := -4+a;
frmMain.nx175 := -6+a;
frmMain.nx176 := 6+a;
frmMain.nx177 := 4+a;
frmMain.nx178 := -4+a;
frmMain.nx179 := -6+a;
frmMain.nx180 := 6+a;
 frmMain.nx181 := 4+a;
 frmMain.nx182 := -4+a;
 frmMain.nx183 := -6+a;
 frmMain.nx184 := 6+a;
 frmMain.nx185 := 4+a;
 frmMain.nx186 := -4+a;
 frmMain.nx187 := -6+a;
 frmMain.nx188 := 6+a;
 frmMain.nx189 := -4+a;
 frmMain.nx190 := 4+a;
 frmMain.nx191 := -6+a;
 frmMain.nx192 := 6+a;
 frmMain.nx193 := -4+a;
 frmMain.nx194 := 4+a;
 frmMain.nx195 := -6+a;
 frmMain.nx196 := 6+a;
 frmMain.nx197 := -4+a;
 frmMain.nx198 := 4+a;
 frmMain.nx199 := -6+a;
 frmMain.nx200 := 6+a;
 frmMain.nx201 := -4+a;
 frmMain.nx202 := 4+a;
 frmMain.nx203 := -6+a;
 frmMain.nx204 := 6+a;
 frmMain.nx205 := 6+a;  //корабль
 frmMain.nx206 := 6+a;  //Подлодка
 frmMain.frmGL.Width:=800;
 a:=0;
 frmMain.nz := 0+b;
  frmMain.nz1 := 0+b;
  frmMain.nz2 := 0+b;
 frmMain.nz3 := 1+b;
 frmMain.nz7 := 0+b;
 frmMain.nz8 := 2+b;
 frmMain.nz9 := 2+b;
  frmMain.nz10 := -2+b;
 frmMain.nz11 := -2+b;
 frmMain.nz12 := -2+b;
 frmMain.nz14 := -3+b;
 frmMain.nz15 := -3+b;
 frmMain.nz16 := -4+b;
 frmMain.nz17 := -4+b;
  frmMain.nz18 := -5+b;
 frmMain.nz19 := -5+b;
 frmMain.nz20 := -6+b;
 frmMain.nz21 := -7+b;
 frmMain.nz22 := -7+b;
  frmMain.nz23 := -8+b;
 frmMain.nz24 := -8+b;
  frmMain.nz25 := -9+b;
 frmMain.nz26 := -9+b;
 frmMain.nz27 := -10+b;
  frmMain.nz28 := -10+b;
  frmMain.nz29 := -11+b;
 frmMain.nz30 := -11+b;

// 1

 frmMain.nz31 := -2+b;
 frmMain.nz32 := -2+b;
 frmMain.nz33 := -3+b;
 frmMain.nz34 := -3+b;
 frmMain.nz35 := -4+b;
 frmMain.nz36 := -4+b;
  frmMain.nz37 := -5+b;
 frmMain.nz38 := -5+b;
 frmMain.nz39 := -6+b;
 frmMain.nz40 := -6+b;
 frmMain.nz41 := -7+b;
 frmMain.nz42 := -7+b;
 frmMain.nz43 := -8+b;
 frmMain.nz44 := -8+b;
 frmMain.nz45 := -9+b;  //////////////


 //////////////////////

 frmMain.nz46 := -9+b;
 frmMain.nz47 := -9+b;
 frmMain.nz48 := -10+b;
 frmMain.nz49 := -11+b;
 frmMain.nz50 := -11+b;
 frmMain.nz51 := -2+b;
 frmMain.nz52 :=-2+b;
 frmMain.nz53 := -3+b;
 frmMain.nz54 :=  3+b;
 frmMain.nz55 := -3+b;
 frmMain.nz56 := -4+b;
 frmMain.nz57 := -5+b;
 frmMain.nz58 := -5+b;
 frmMain.nz59 := -6+b;
 frmMain.nz60 := -6+b;
 frmMain.nz61 := -7+b;
 frmMain.nz62 := -7+b;
 frmMain.nz63 := -8+b;
 frmMain.nz64 := -8+b;
 frmMain.nz65 := -9+b;
 frmMain.nz66 := -9+b;
 frmMain.nz67 := -10+b;
 frmMain.nz68 := -10+b;
 frmMain.nz69 := -11+b;
 frmMain.nz70 := -11+b;


  ///3
 ///
 ///
 frmMain.nz71 := -2+b;
 frmMain.nz72 :=-2+b;
 frmMain.nz73 := -3+b;
 frmMain.nz74 :=  -3+b;
 frmMain.nz75 := -4+b;
 frmMain.nz76 := -4+b;
 frmMain.nz77 := -5+b;
 frmMain.nz78 := -5+b;
 frmMain.nz79 := -6+b;
 frmMain.nz80 := -6+b;
 frmMain.nz81 := -7+b;
 frmMain.nz82 := -7+b;
 frmMain.nz83 := -8+b;
 frmMain.nz84 := -8+b;
 frmMain.nz85 := -9+b;
 frmMain.nz86 := -9+b;
 frmMain.nz87 := -10+b;
 frmMain.nz88 := -10+b;
 frmMain.nz89 := -11+b;
 frmMain.nz90 := -2+b;

frmMain.nz94 :=1+b;
frmMain.nz95 :=1+b;  //цифры
frmMain.nz96 :=1+b;  //цифры
frmMain.nz97 :=1+b;  //цифры
frmMain.nz98 := 1+b;  //цифры
frmMain.nz99 := 1+b;  //цифры
frmMain.nz100 := 1+b;  //цифры
frmMain.nz101 := 1+b;  //цифры
frmMain.nz102 := 1+b;  //цифры
frmMain.nz103 := 1+b;  //цифры

frmMain.nz104 := -0+b;  //буквы
frmMain.nz105 := -2+b;  //буквы
frmMain.nz106 := -4+b;  //буквы
frmMain.nz107 := -6+b;  //буквы
frmMain.nz108 := -8+b;  //буквы
frmMain.nz109 := -10+b;  //буквы
frmMain.nz110 := -12+b;  //буквы
frmMain.nz111 := -14+b;  //буквы
frmMain.nz112 := -16+b;  //буквы
frmMain.nz113 := -18+b;  //буквы

frmMain.nz114 := -4+b;  //корабль
frmMain.nz115 := -18+b;  //цифры
frmMain.nz116 :=-18+b;  //цифры
frmMain.nz117 :=-18+b;  //цифры
frmMain.nz118 :=-18+b;  //цифры
frmMain.nz119 := -18+b;  //цифры
frmMain.nz120 := -18+b;  //цифры
frmMain.nz121 := -18+b;  //цифры
frmMain.nz122 := -18+b;  //цифры
frmMain.nz123 := -18+b;  //цифры
frmMain.nz124 := -18+b;  //цифры
frmMain.nz125 := -16+b;
frmMain.nz126 := -14+b;
frmMain.nz127 := -12+b;
frmMain.nz128 := -16+b;
frmMain.nz129 := -16+b;
frmMain.nz130 := -16+b;
frmMain.nz131 := -16+b;
frmMain.nz132 := -16+b;
frmMain.nz133 := -16+b;
frmMain.nz134 := -16+b;
frmMain.nz135 := -16+b;
frmMain.nz136 := -14+b;
frmMain.nz137 := -14+b;
frmMain.nz138 := -14+b;
frmMain.nz139 := -14+b;
frmMain.nz140 := -14+b;
frmMain.nz141 := -15+b;
frmMain.nz142 := -15+b;
frmMain.nz143 := -15+b;
frmMain.nz144 := -15+b;
frmMain.nz145 := -15+b;
frmMain.nz146 := -15+b;
frmMain.nz147 := -15+b;
frmMain.nz148 := -15+b;
frmMain.nz149 := -14+b;
frmMain.nz150 := -14+b;
frmMain.nz151 := -12+b;
frmMain.nz152 := -12+b;
frmMain.nz153 := -13+b;
frmMain.nz154 := -13+b;
frmMain.nz155 := -13+b;
frmMain.nz156 := -6+b;
frmMain.nz157 := -12+b;
frmMain.nz158 := -12+b;
frmMain.nz159 := -12+b;
frmMain.nz160 := -12+b;
frmMain.nz161 := -10+b;
frmMain.nz162 := -10+b;
frmMain.nz163 := -10+b;
frmMain.nz164 := -10+b;
frmMain.nz165 := -8+b;
frmMain.nz166 := -8+b;
frmMain.nz167 := -8+b;
frmMain.nz168 := -8+b;
frmMain.nz169 := -6+b;
frmMain.nz170 := -6+b;
frmMain.nz171 := -6+b;
frmMain.nz172 := -6+b;
frmMain.nz173 := -4+b;
frmMain.nz174 := -4+b;
frmMain.nz175 := -4+b;
frmMain.nz176 := -4+b;
frmMain.nz177 := -2+b;
frmMain.nz178 := -2+b;
frmMain.nz179 := -2+b;
frmMain.nz180 := -2+b;
 frmMain.nz181 := -3+b;
 frmMain.nz182 := -3+b;
 frmMain.nz183 := -3+b;
 frmMain.nz184 := -3+b;
 frmMain.nz185 := - 5+b;
 frmMain.nz186 := -5+b;
 frmMain.nz187 := -5+b;
 frmMain.nz188 := -5+b;
 frmMain.nz189 := -7+b;
 frmMain.nz190 := -7+b;
 frmMain.nz191 := -7+b;
 frmMain.nz192 := -7+b;
 frmMain.nz193 := -9+b;
 frmMain.nz194 := -9+b;
 frmMain.nz195 := -9+b;
 frmMain.nz196 := -9+b;
 frmMain.nz197 := -11+b;
 frmMain.nz198 := -11+b;
 frmMain.nz199 := -11+b;
 frmMain.nz200 := -11+b;
 frmMain.nz201 := -13+b;
 frmMain.nz202 := -13+b;
 frmMain.nz203 := -13+b;
 frmMain.nz204 := -13+b;
 frmMain.nz205 := -4+b;  //корабль
 frmMain.nz206 := -8+b;  //Подлодка
 frmMain.frmGL.Width:=800;
 b:=0;

 end;




 if (c=8) and (d=4) then
begin
StringGrid1.Cells[c,d]:='1';
a:=a-5;
b:=b+13;
frmMain.nx := 0+a;
  frmMain.nx1 := 0+a;
  frmMain.nx2 := 0+a;
 frmMain.nx3 := 0+a;
 frmMain.nx7 := -1+a;
 frmMain.nx8 := 1+a;
 frmMain.nx9 := -1+a;
  frmMain.nx10 := -2+a;
 frmMain.nx11 := -1+a;
 frmMain.nx12 := 1+a;
 frmMain.nx14 := 1+a;
 frmMain.nx15 := -1+a;
 frmMain.nx16 := -1+a;
 frmMain.nx17 := 1+a;
  frmMain.nx18 := -1+a;
 frmMain.nx19 := 1+a;
 frmMain.nx20 := -1+a;
 frmMain.nx21 := -1+a;
 frmMain.nx22 := 1+a;
  frmMain.nx23 := -1+a;
 frmMain.nx24 := 1+a;
  frmMain.nx25 := 1+a;
 frmMain.nx26 := -1+a;
 frmMain.nx27 := 1+a;
  frmMain.nx28 := -1+a;
  frmMain.nx29 := 1+a;
 frmMain.nx30 := -1+a;

// 1

 frmMain.nx31 := -2+a;
 frmMain.nx32 := 2+a;
 frmMain.nx33 := -2+a;
 frmMain.nx34 :=  2+a;
 frmMain.nx35 := -2+a;
 frmMain.nx36 := 2+a;
  frmMain.nx37 := -2+a;
 frmMain.nx38 := 2+a;
 frmMain.nx39 := -2+a;
 frmMain.nx40 := 2+a;
 frmMain.nx41 := -2+a;
 frmMain.nx42 := 2+a;
 frmMain.nx43 := -2+a;
 frmMain.nx44 := 2+a;
 frmMain.nx45 := -2+a;  //////////////


 //////////////////////

 frmMain.nx46 := -2+a;
 frmMain.nx47 := -2+a;
 frmMain.nx48 := 2+a;
 frmMain.nx49 := -2+a;
 frmMain.nx50 := 2+a;
 frmMain.nx51 := -3+a;
 frmMain.nx52 :=3+a;
 frmMain.nx53 := -3+a;
 frmMain.nx54 :=  3+a;
 frmMain.nx55 := -3+a;
 frmMain.nx56 := 3+a;
 frmMain.nx57 := -3+a;
 frmMain.nx58 := 3+a;
 frmMain.nx59 := -3+a;
 frmMain.nx60 := 3+a;
 frmMain.nx61 := -3+a;
 frmMain.nx62 := 3+a;
 frmMain.nx63 := -3+a;
 frmMain.nx64 := 3+a;
 frmMain.nx65 := -3+a;
 frmMain.nx66 := 3+a;
 frmMain.nx67 := -3+a;
 frmMain.nx68 := 3+a;
 frmMain.nx69 := -3+a;
 frmMain.nx70 := 3+a;


  ///3
 ///
 ///
 frmMain.nx71 := -4+a;
 frmMain.nx72 :=4+a;
 frmMain.nx73 := -4+a;
 frmMain.nx74 :=  4+a;
 frmMain.nx75 := -4+a;
 frmMain.nx76 := 4+a;
 frmMain.nx77 := -4+a;
 frmMain.nx78 := 4+a;
 frmMain.nx79 := -4+a;
 frmMain.nx80 := 4+a;
 frmMain.nx81 := -4+a;
 frmMain.nx82 := 4+a;
 frmMain.nx83 := -4+a;
 frmMain.nx84 := 4+a;
 frmMain.nx85 := -4+a;
 frmMain.nx86 := 4+a;
 frmMain.nx87 := -4+a;
 frmMain.nx88 := 4+a;
 frmMain.nx89 := -4+a;
 frmMain.nx90 := -2+a;

frmMain.nx94 :=0+a;
frmMain.nx95 :=-2+a;  //цифры
frmMain.nx96 :=-4+a;  //цифры
frmMain.nx97 :=-6+a;  //цифры
frmMain.nx98 := 2+a;  //цифры
frmMain.nx99 := 4+a;  //цифры
frmMain.nx100 := 6+a;  //цифры
frmMain.nx101 := 8+a;  //цифры
frmMain.nx102 := 10+a;  //цифры
frmMain.nx103 := 12+a;  //цифры

frmMain.nx104 := -8+a;  //буквы
frmMain.nx105 := -8+a;  //буквы
frmMain.nx106 := -8+a;  //буквы
frmMain.nx107 := -8+a;  //буквы
frmMain.nx108 := -8+a;  //буквы
frmMain.nx109 := -8+a;  //буквы
frmMain.nx110 := -8+a;  //буквы
frmMain.nx111 := -8+a;  //буквы
frmMain.nx112 := -8+a;  //буквы
frmMain.nx113 := -8+a;  //буквы

frmMain.nx114 := -6+a;  //корабль
frmMain.nx115 := 0+a;  //цифры
frmMain.nx116 :=-2+a;  //цифры
frmMain.nx117 :=-4+a;  //цифры
frmMain.nx118 :=-6+a;  //цифры
frmMain.nx119 := 2+a;  //цифры
frmMain.nx120 := 4+a;  //цифры
frmMain.nx121 := 6+a;  //цифры
frmMain.nx122 := 8+a;  //цифры
frmMain.nx123 := 10+a;  //цифры
frmMain.nx124 := 12+a;  //цифры
frmMain.nx125 := 0+a;
frmMain.nx126 := 0+a;
frmMain.nx127 := 0+a;
frmMain.nx128 := 2+a;
frmMain.nx129 := -2+a;
frmMain.nx130 := -4+a;
frmMain.nx131 := 4+a;
frmMain.nx132 := -6+a;
frmMain.nx133 := 6+a;
frmMain.nx134 := 8+a;
frmMain.nx135 := -8+a;
frmMain.nx136 := -2+a;
frmMain.nx137 := 2+a;
frmMain.nx138 := -4+a;
frmMain.nx139 := 4+a;
frmMain.nx140 := -2+a;
frmMain.nx141 := 2+a;
frmMain.nx142 := 0+a;
frmMain.nx143 := 2+a;
frmMain.nx144 := -2+a;
frmMain.nx145 := -4+a;
frmMain.nx146 := 4+a;
frmMain.nx147 := 6+a;
frmMain.nx148 := -6+a;
frmMain.nx149 := -6+a;
frmMain.nx150 := 6+a;
frmMain.nx151 := 2+a;
frmMain.nx152 := -2+a;
frmMain.nx153 := 2+a;
frmMain.nx154 := -2+a;
frmMain.nx155 := 0+a;
frmMain.nx156 := 0+a;
frmMain.nx157 := 4+a;
frmMain.nx158 := -4+a;
frmMain.nx159 := -6+a;
frmMain.nx160 := 6+a;
frmMain.nx161 := 4+a;
frmMain.nx162 := -4+a;
frmMain.nx163 := -6+a;
frmMain.nx164 := 6+a;
frmMain.nx165 := 4+a;
frmMain.nx166 := -4+a;
frmMain.nx167 := -6+a;
frmMain.nx168 := 6+a;
frmMain.nx169 := 4+a;
frmMain.nx170 := -4+a;
frmMain.nx171 := -6+a;
frmMain.nx172 := 6+a;
frmMain.nx173 := 4+a;
frmMain.nx174 := -4+a;
frmMain.nx175 := -6+a;
frmMain.nx176 := 6+a;
frmMain.nx177 := 4+a;
frmMain.nx178 := -4+a;
frmMain.nx179 := -6+a;
frmMain.nx180 := 6+a;
 frmMain.nx181 := 4+a;
 frmMain.nx182 := -4+a;
 frmMain.nx183 := -6+a;
 frmMain.nx184 := 6+a;
 frmMain.nx185 := 4+a;
 frmMain.nx186 := -4+a;
 frmMain.nx187 := -6+a;
 frmMain.nx188 := 6+a;
 frmMain.nx189 := -4+a;
 frmMain.nx190 := 4+a;
 frmMain.nx191 := -6+a;
 frmMain.nx192 := 6+a;
 frmMain.nx193 := -4+a;
 frmMain.nx194 := 4+a;
 frmMain.nx195 := -6+a;
 frmMain.nx196 := 6+a;
 frmMain.nx197 := -4+a;
 frmMain.nx198 := 4+a;
 frmMain.nx199 := -6+a;
 frmMain.nx200 := 6+a;
 frmMain.nx201 := -4+a;
 frmMain.nx202 := 4+a;
 frmMain.nx203 := -6+a;
 frmMain.nx204 := 6+a;
 frmMain.nx205 := 6+a;  //корабль
 frmMain.nx206 := 6+a;  //Подлодка
 frmMain.frmGL.Width:=800;
 a:=0;
 frmMain.nz := 0+b;
  frmMain.nz1 := 0+b;
  frmMain.nz2 := 0+b;
 frmMain.nz3 := 1+b;
 frmMain.nz7 := 0+b;
 frmMain.nz8 := 2+b;
 frmMain.nz9 := 2+b;
  frmMain.nz10 := -2+b;
 frmMain.nz11 := -2+b;
 frmMain.nz12 := -2+b;
 frmMain.nz14 := -3+b;
 frmMain.nz15 := -3+b;
 frmMain.nz16 := -4+b;
 frmMain.nz17 := -4+b;
  frmMain.nz18 := -5+b;
 frmMain.nz19 := -5+b;
 frmMain.nz20 := -6+b;
 frmMain.nz21 := -7+b;
 frmMain.nz22 := -7+b;
  frmMain.nz23 := -8+b;
 frmMain.nz24 := -8+b;
  frmMain.nz25 := -9+b;
 frmMain.nz26 := -9+b;
 frmMain.nz27 := -10+b;
  frmMain.nz28 := -10+b;
  frmMain.nz29 := -11+b;
 frmMain.nz30 := -11+b;

// 1

 frmMain.nz31 := -2+b;
 frmMain.nz32 := -2+b;
 frmMain.nz33 := -3+b;
 frmMain.nz34 := -3+b;
 frmMain.nz35 := -4+b;
 frmMain.nz36 := -4+b;
  frmMain.nz37 := -5+b;
 frmMain.nz38 := -5+b;
 frmMain.nz39 := -6+b;
 frmMain.nz40 := -6+b;
 frmMain.nz41 := -7+b;
 frmMain.nz42 := -7+b;
 frmMain.nz43 := -8+b;
 frmMain.nz44 := -8+b;
 frmMain.nz45 := -9+b;  //////////////


 //////////////////////

 frmMain.nz46 := -9+b;
 frmMain.nz47 := -9+b;
 frmMain.nz48 := -10+b;
 frmMain.nz49 := -11+b;
 frmMain.nz50 := -11+b;
 frmMain.nz51 := -2+b;
 frmMain.nz52 :=-2+b;
 frmMain.nz53 := -3+b;
 frmMain.nz54 :=  3+b;
 frmMain.nz55 := -3+b;
 frmMain.nz56 := -4+b;
 frmMain.nz57 := -5+b;
 frmMain.nz58 := -5+b;
 frmMain.nz59 := -6+b;
 frmMain.nz60 := -6+b;
 frmMain.nz61 := -7+b;
 frmMain.nz62 := -7+b;
 frmMain.nz63 := -8+b;
 frmMain.nz64 := -8+b;
 frmMain.nz65 := -9+b;
 frmMain.nz66 := -9+b;
 frmMain.nz67 := -10+b;
 frmMain.nz68 := -10+b;
 frmMain.nz69 := -11+b;
 frmMain.nz70 := -11+b;


  ///3
 ///
 ///
 frmMain.nz71 := -2+b;
 frmMain.nz72 :=-2+b;
 frmMain.nz73 := -3+b;
 frmMain.nz74 :=  -3+b;
 frmMain.nz75 := -4+b;
 frmMain.nz76 := -4+b;
 frmMain.nz77 := -5+b;
 frmMain.nz78 := -5+b;
 frmMain.nz79 := -6+b;
 frmMain.nz80 := -6+b;
 frmMain.nz81 := -7+b;
 frmMain.nz82 := -7+b;
 frmMain.nz83 := -8+b;
 frmMain.nz84 := -8+b;
 frmMain.nz85 := -9+b;
 frmMain.nz86 := -9+b;
 frmMain.nz87 := -10+b;
 frmMain.nz88 := -10+b;
 frmMain.nz89 := -11+b;
 frmMain.nz90 := -2+b;

frmMain.nz94 :=1+b;
frmMain.nz95 :=1+b;  //цифры
frmMain.nz96 :=1+b;  //цифры
frmMain.nz97 :=1+b;  //цифры
frmMain.nz98 := 1+b;  //цифры
frmMain.nz99 := 1+b;  //цифры
frmMain.nz100 := 1+b;  //цифры
frmMain.nz101 := 1+b;  //цифры
frmMain.nz102 := 1+b;  //цифры
frmMain.nz103 := 1+b;  //цифры

frmMain.nz104 := -0+b;  //буквы
frmMain.nz105 := -2+b;  //буквы
frmMain.nz106 := -4+b;  //буквы
frmMain.nz107 := -6+b;  //буквы
frmMain.nz108 := -8+b;  //буквы
frmMain.nz109 := -10+b;  //буквы
frmMain.nz110 := -12+b;  //буквы
frmMain.nz111 := -14+b;  //буквы
frmMain.nz112 := -16+b;  //буквы
frmMain.nz113 := -18+b;  //буквы

frmMain.nz114 := -4+b;  //корабль
frmMain.nz115 := -18+b;  //цифры
frmMain.nz116 :=-18+b;  //цифры
frmMain.nz117 :=-18+b;  //цифры
frmMain.nz118 :=-18+b;  //цифры
frmMain.nz119 := -18+b;  //цифры
frmMain.nz120 := -18+b;  //цифры
frmMain.nz121 := -18+b;  //цифры
frmMain.nz122 := -18+b;  //цифры
frmMain.nz123 := -18+b;  //цифры
frmMain.nz124 := -18+b;  //цифры
frmMain.nz125 := -16+b;
frmMain.nz126 := -14+b;
frmMain.nz127 := -12+b;
frmMain.nz128 := -16+b;
frmMain.nz129 := -16+b;
frmMain.nz130 := -16+b;
frmMain.nz131 := -16+b;
frmMain.nz132 := -16+b;
frmMain.nz133 := -16+b;
frmMain.nz134 := -16+b;
frmMain.nz135 := -16+b;
frmMain.nz136 := -14+b;
frmMain.nz137 := -14+b;
frmMain.nz138 := -14+b;
frmMain.nz139 := -14+b;
frmMain.nz140 := -14+b;
frmMain.nz141 := -15+b;
frmMain.nz142 := -15+b;
frmMain.nz143 := -15+b;
frmMain.nz144 := -15+b;
frmMain.nz145 := -15+b;
frmMain.nz146 := -15+b;
frmMain.nz147 := -15+b;
frmMain.nz148 := -15+b;
frmMain.nz149 := -14+b;
frmMain.nz150 := -14+b;
frmMain.nz151 := -12+b;
frmMain.nz152 := -12+b;
frmMain.nz153 := -13+b;
frmMain.nz154 := -13+b;
frmMain.nz155 := -13+b;
frmMain.nz156 := -6+b;
frmMain.nz157 := -12+b;
frmMain.nz158 := -12+b;
frmMain.nz159 := -12+b;
frmMain.nz160 := -12+b;
frmMain.nz161 := -10+b;
frmMain.nz162 := -10+b;
frmMain.nz163 := -10+b;
frmMain.nz164 := -10+b;
frmMain.nz165 := -8+b;
frmMain.nz166 := -8+b;
frmMain.nz167 := -8+b;
frmMain.nz168 := -8+b;
frmMain.nz169 := -6+b;
frmMain.nz170 := -6+b;
frmMain.nz171 := -6+b;
frmMain.nz172 := -6+b;
frmMain.nz173 := -4+b;
frmMain.nz174 := -4+b;
frmMain.nz175 := -4+b;
frmMain.nz176 := -4+b;
frmMain.nz177 := -2+b;
frmMain.nz178 := -2+b;
frmMain.nz179 := -2+b;
frmMain.nz180 := -2+b;
 frmMain.nz181 := -3+b;
 frmMain.nz182 := -3+b;
 frmMain.nz183 := -3+b;
 frmMain.nz184 := -3+b;
 frmMain.nz185 := - 5+b;
 frmMain.nz186 := -5+b;
 frmMain.nz187 := -5+b;
 frmMain.nz188 := -5+b;
 frmMain.nz189 := -7+b;
 frmMain.nz190 := -7+b;
 frmMain.nz191 := -7+b;
 frmMain.nz192 := -7+b;
 frmMain.nz193 := -9+b;
 frmMain.nz194 := -9+b;
 frmMain.nz195 := -9+b;
 frmMain.nz196 := -9+b;
 frmMain.nz197 := -11+b;
 frmMain.nz198 := -11+b;
 frmMain.nz199 := -11+b;
 frmMain.nz200 := -11+b;
 frmMain.nz201 := -13+b;
 frmMain.nz202 := -13+b;
 frmMain.nz203 := -13+b;
 frmMain.nz204 := -13+b;
 frmMain.nz205 := -4+b;  //корабль
 frmMain.nz206 := -8+b;  //Подлодка
 frmMain.frmGL.Width:=800;
 b:=0;

 end;






 if (c=8) and (d=3) then
begin
StringGrid1.Cells[c,d]:='1';
a:=a-5;
b:=b+15;
frmMain.nx := 0+a;
  frmMain.nx1 := 0+a;
  frmMain.nx2 := 0+a;
 frmMain.nx3 := 0+a;
 frmMain.nx7 := -1+a;
 frmMain.nx8 := 1+a;
 frmMain.nx9 := -1+a;
  frmMain.nx10 := -2+a;
 frmMain.nx11 := -1+a;
 frmMain.nx12 := 1+a;
 frmMain.nx14 := 1+a;
 frmMain.nx15 := -1+a;
 frmMain.nx16 := -1+a;
 frmMain.nx17 := 1+a;
  frmMain.nx18 := -1+a;
 frmMain.nx19 := 1+a;
 frmMain.nx20 := -1+a;
 frmMain.nx21 := -1+a;
 frmMain.nx22 := 1+a;
  frmMain.nx23 := -1+a;
 frmMain.nx24 := 1+a;
  frmMain.nx25 := 1+a;
 frmMain.nx26 := -1+a;
 frmMain.nx27 := 1+a;
  frmMain.nx28 := -1+a;
  frmMain.nx29 := 1+a;
 frmMain.nx30 := -1+a;

// 1

 frmMain.nx31 := -2+a;
 frmMain.nx32 := 2+a;
 frmMain.nx33 := -2+a;
 frmMain.nx34 :=  2+a;
 frmMain.nx35 := -2+a;
 frmMain.nx36 := 2+a;
  frmMain.nx37 := -2+a;
 frmMain.nx38 := 2+a;
 frmMain.nx39 := -2+a;
 frmMain.nx40 := 2+a;
 frmMain.nx41 := -2+a;
 frmMain.nx42 := 2+a;
 frmMain.nx43 := -2+a;
 frmMain.nx44 := 2+a;
 frmMain.nx45 := -2+a;  //////////////


 //////////////////////

 frmMain.nx46 := -2+a;
 frmMain.nx47 := -2+a;
 frmMain.nx48 := 2+a;
 frmMain.nx49 := -2+a;
 frmMain.nx50 := 2+a;
 frmMain.nx51 := -3+a;
 frmMain.nx52 :=3+a;
 frmMain.nx53 := -3+a;
 frmMain.nx54 :=  3+a;
 frmMain.nx55 := -3+a;
 frmMain.nx56 := 3+a;
 frmMain.nx57 := -3+a;
 frmMain.nx58 := 3+a;
 frmMain.nx59 := -3+a;
 frmMain.nx60 := 3+a;
 frmMain.nx61 := -3+a;
 frmMain.nx62 := 3+a;
 frmMain.nx63 := -3+a;
 frmMain.nx64 := 3+a;
 frmMain.nx65 := -3+a;
 frmMain.nx66 := 3+a;
 frmMain.nx67 := -3+a;
 frmMain.nx68 := 3+a;
 frmMain.nx69 := -3+a;
 frmMain.nx70 := 3+a;


  ///3
 ///
 ///
 frmMain.nx71 := -4+a;
 frmMain.nx72 :=4+a;
 frmMain.nx73 := -4+a;
 frmMain.nx74 :=  4+a;
 frmMain.nx75 := -4+a;
 frmMain.nx76 := 4+a;
 frmMain.nx77 := -4+a;
 frmMain.nx78 := 4+a;
 frmMain.nx79 := -4+a;
 frmMain.nx80 := 4+a;
 frmMain.nx81 := -4+a;
 frmMain.nx82 := 4+a;
 frmMain.nx83 := -4+a;
 frmMain.nx84 := 4+a;
 frmMain.nx85 := -4+a;
 frmMain.nx86 := 4+a;
 frmMain.nx87 := -4+a;
 frmMain.nx88 := 4+a;
 frmMain.nx89 := -4+a;
 frmMain.nx90 := -2+a;

frmMain.nx94 :=0+a;
frmMain.nx95 :=-2+a;  //цифры
frmMain.nx96 :=-4+a;  //цифры
frmMain.nx97 :=-6+a;  //цифры
frmMain.nx98 := 2+a;  //цифры
frmMain.nx99 := 4+a;  //цифры
frmMain.nx100 := 6+a;  //цифры
frmMain.nx101 := 8+a;  //цифры
frmMain.nx102 := 10+a;  //цифры
frmMain.nx103 := 12+a;  //цифры

frmMain.nx104 := -8+a;  //буквы
frmMain.nx105 := -8+a;  //буквы
frmMain.nx106 := -8+a;  //буквы
frmMain.nx107 := -8+a;  //буквы
frmMain.nx108 := -8+a;  //буквы
frmMain.nx109 := -8+a;  //буквы
frmMain.nx110 := -8+a;  //буквы
frmMain.nx111 := -8+a;  //буквы
frmMain.nx112 := -8+a;  //буквы
frmMain.nx113 := -8+a;  //буквы

frmMain.nx114 := -6+a;  //корабль
frmMain.nx115 := 0+a;  //цифры
frmMain.nx116 :=-2+a;  //цифры
frmMain.nx117 :=-4+a;  //цифры
frmMain.nx118 :=-6+a;  //цифры
frmMain.nx119 := 2+a;  //цифры
frmMain.nx120 := 4+a;  //цифры
frmMain.nx121 := 6+a;  //цифры
frmMain.nx122 := 8+a;  //цифры
frmMain.nx123 := 10+a;  //цифры
frmMain.nx124 := 12+a;  //цифры
frmMain.nx125 := 0+a;
frmMain.nx126 := 0+a;
frmMain.nx127 := 0+a;
frmMain.nx128 := 2+a;
frmMain.nx129 := -2+a;
frmMain.nx130 := -4+a;
frmMain.nx131 := 4+a;
frmMain.nx132 := -6+a;
frmMain.nx133 := 6+a;
frmMain.nx134 := 8+a;
frmMain.nx135 := -8+a;
frmMain.nx136 := -2+a;
frmMain.nx137 := 2+a;
frmMain.nx138 := -4+a;
frmMain.nx139 := 4+a;
frmMain.nx140 := -2+a;
frmMain.nx141 := 2+a;
frmMain.nx142 := 0+a;
frmMain.nx143 := 2+a;
frmMain.nx144 := -2+a;
frmMain.nx145 := -4+a;
frmMain.nx146 := 4+a;
frmMain.nx147 := 6+a;
frmMain.nx148 := -6+a;
frmMain.nx149 := -6+a;
frmMain.nx150 := 6+a;
frmMain.nx151 := 2+a;
frmMain.nx152 := -2+a;
frmMain.nx153 := 2+a;
frmMain.nx154 := -2+a;
frmMain.nx155 := 0+a;
frmMain.nx156 := 0+a;
frmMain.nx157 := 4+a;
frmMain.nx158 := -4+a;
frmMain.nx159 := -6+a;
frmMain.nx160 := 6+a;
frmMain.nx161 := 4+a;
frmMain.nx162 := -4+a;
frmMain.nx163 := -6+a;
frmMain.nx164 := 6+a;
frmMain.nx165 := 4+a;
frmMain.nx166 := -4+a;
frmMain.nx167 := -6+a;
frmMain.nx168 := 6+a;
frmMain.nx169 := 4+a;
frmMain.nx170 := -4+a;
frmMain.nx171 := -6+a;
frmMain.nx172 := 6+a;
frmMain.nx173 := 4+a;
frmMain.nx174 := -4+a;
frmMain.nx175 := -6+a;
frmMain.nx176 := 6+a;
frmMain.nx177 := 4+a;
frmMain.nx178 := -4+a;
frmMain.nx179 := -6+a;
frmMain.nx180 := 6+a;
 frmMain.nx181 := 4+a;
 frmMain.nx182 := -4+a;
 frmMain.nx183 := -6+a;
 frmMain.nx184 := 6+a;
 frmMain.nx185 := 4+a;
 frmMain.nx186 := -4+a;
 frmMain.nx187 := -6+a;
 frmMain.nx188 := 6+a;
 frmMain.nx189 := -4+a;
 frmMain.nx190 := 4+a;
 frmMain.nx191 := -6+a;
 frmMain.nx192 := 6+a;
 frmMain.nx193 := -4+a;
 frmMain.nx194 := 4+a;
 frmMain.nx195 := -6+a;
 frmMain.nx196 := 6+a;
 frmMain.nx197 := -4+a;
 frmMain.nx198 := 4+a;
 frmMain.nx199 := -6+a;
 frmMain.nx200 := 6+a;
 frmMain.nx201 := -4+a;
 frmMain.nx202 := 4+a;
 frmMain.nx203 := -6+a;
 frmMain.nx204 := 6+a;
 frmMain.nx205 := 6+a;  //корабль
 frmMain.nx206 := 6+a;  //Подлодка
 frmMain.frmGL.Width:=800;
 a:=0;
 frmMain.nz := 0+b;
  frmMain.nz1 := 0+b;
  frmMain.nz2 := 0+b;
 frmMain.nz3 := 1+b;
 frmMain.nz7 := 0+b;
 frmMain.nz8 := 2+b;
 frmMain.nz9 := 2+b;
  frmMain.nz10 := -2+b;
 frmMain.nz11 := -2+b;
 frmMain.nz12 := -2+b;
 frmMain.nz14 := -3+b;
 frmMain.nz15 := -3+b;
 frmMain.nz16 := -4+b;
 frmMain.nz17 := -4+b;
  frmMain.nz18 := -5+b;
 frmMain.nz19 := -5+b;
 frmMain.nz20 := -6+b;
 frmMain.nz21 := -7+b;
 frmMain.nz22 := -7+b;
  frmMain.nz23 := -8+b;
 frmMain.nz24 := -8+b;
  frmMain.nz25 := -9+b;
 frmMain.nz26 := -9+b;
 frmMain.nz27 := -10+b;
  frmMain.nz28 := -10+b;
  frmMain.nz29 := -11+b;
 frmMain.nz30 := -11+b;

// 1

 frmMain.nz31 := -2+b;
 frmMain.nz32 := -2+b;
 frmMain.nz33 := -3+b;
 frmMain.nz34 := -3+b;
 frmMain.nz35 := -4+b;
 frmMain.nz36 := -4+b;
  frmMain.nz37 := -5+b;
 frmMain.nz38 := -5+b;
 frmMain.nz39 := -6+b;
 frmMain.nz40 := -6+b;
 frmMain.nz41 := -7+b;
 frmMain.nz42 := -7+b;
 frmMain.nz43 := -8+b;
 frmMain.nz44 := -8+b;
 frmMain.nz45 := -9+b;  //////////////


 //////////////////////

 frmMain.nz46 := -9+b;
 frmMain.nz47 := -9+b;
 frmMain.nz48 := -10+b;
 frmMain.nz49 := -11+b;
 frmMain.nz50 := -11+b;
 frmMain.nz51 := -2+b;
 frmMain.nz52 :=-2+b;
 frmMain.nz53 := -3+b;
 frmMain.nz54 :=  3+b;
 frmMain.nz55 := -3+b;
 frmMain.nz56 := -4+b;
 frmMain.nz57 := -5+b;
 frmMain.nz58 := -5+b;
 frmMain.nz59 := -6+b;
 frmMain.nz60 := -6+b;
 frmMain.nz61 := -7+b;
 frmMain.nz62 := -7+b;
 frmMain.nz63 := -8+b;
 frmMain.nz64 := -8+b;
 frmMain.nz65 := -9+b;
 frmMain.nz66 := -9+b;
 frmMain.nz67 := -10+b;
 frmMain.nz68 := -10+b;
 frmMain.nz69 := -11+b;
 frmMain.nz70 := -11+b;


  ///3
 ///
 ///
 frmMain.nz71 := -2+b;
 frmMain.nz72 :=-2+b;
 frmMain.nz73 := -3+b;
 frmMain.nz74 :=  -3+b;
 frmMain.nz75 := -4+b;
 frmMain.nz76 := -4+b;
 frmMain.nz77 := -5+b;
 frmMain.nz78 := -5+b;
 frmMain.nz79 := -6+b;
 frmMain.nz80 := -6+b;
 frmMain.nz81 := -7+b;
 frmMain.nz82 := -7+b;
 frmMain.nz83 := -8+b;
 frmMain.nz84 := -8+b;
 frmMain.nz85 := -9+b;
 frmMain.nz86 := -9+b;
 frmMain.nz87 := -10+b;
 frmMain.nz88 := -10+b;
 frmMain.nz89 := -11+b;
 frmMain.nz90 := -2+b;

frmMain.nz94 :=1+b;
frmMain.nz95 :=1+b;  //цифры
frmMain.nz96 :=1+b;  //цифры
frmMain.nz97 :=1+b;  //цифры
frmMain.nz98 := 1+b;  //цифры
frmMain.nz99 := 1+b;  //цифры
frmMain.nz100 := 1+b;  //цифры
frmMain.nz101 := 1+b;  //цифры
frmMain.nz102 := 1+b;  //цифры
frmMain.nz103 := 1+b;  //цифры

frmMain.nz104 := -0+b;  //буквы
frmMain.nz105 := -2+b;  //буквы
frmMain.nz106 := -4+b;  //буквы
frmMain.nz107 := -6+b;  //буквы
frmMain.nz108 := -8+b;  //буквы
frmMain.nz109 := -10+b;  //буквы
frmMain.nz110 := -12+b;  //буквы
frmMain.nz111 := -14+b;  //буквы
frmMain.nz112 := -16+b;  //буквы
frmMain.nz113 := -18+b;  //буквы

frmMain.nz114 := -4+b;  //корабль
frmMain.nz115 := -18+b;  //цифры
frmMain.nz116 :=-18+b;  //цифры
frmMain.nz117 :=-18+b;  //цифры
frmMain.nz118 :=-18+b;  //цифры
frmMain.nz119 := -18+b;  //цифры
frmMain.nz120 := -18+b;  //цифры
frmMain.nz121 := -18+b;  //цифры
frmMain.nz122 := -18+b;  //цифры
frmMain.nz123 := -18+b;  //цифры
frmMain.nz124 := -18+b;  //цифры
frmMain.nz125 := -16+b;
frmMain.nz126 := -14+b;
frmMain.nz127 := -12+b;
frmMain.nz128 := -16+b;
frmMain.nz129 := -16+b;
frmMain.nz130 := -16+b;
frmMain.nz131 := -16+b;
frmMain.nz132 := -16+b;
frmMain.nz133 := -16+b;
frmMain.nz134 := -16+b;
frmMain.nz135 := -16+b;
frmMain.nz136 := -14+b;
frmMain.nz137 := -14+b;
frmMain.nz138 := -14+b;
frmMain.nz139 := -14+b;
frmMain.nz140 := -14+b;
frmMain.nz141 := -15+b;
frmMain.nz142 := -15+b;
frmMain.nz143 := -15+b;
frmMain.nz144 := -15+b;
frmMain.nz145 := -15+b;
frmMain.nz146 := -15+b;
frmMain.nz147 := -15+b;
frmMain.nz148 := -15+b;
frmMain.nz149 := -14+b;
frmMain.nz150 := -14+b;
frmMain.nz151 := -12+b;
frmMain.nz152 := -12+b;
frmMain.nz153 := -13+b;
frmMain.nz154 := -13+b;
frmMain.nz155 := -13+b;
frmMain.nz156 := -6+b;
frmMain.nz157 := -12+b;
frmMain.nz158 := -12+b;
frmMain.nz159 := -12+b;
frmMain.nz160 := -12+b;
frmMain.nz161 := -10+b;
frmMain.nz162 := -10+b;
frmMain.nz163 := -10+b;
frmMain.nz164 := -10+b;
frmMain.nz165 := -8+b;
frmMain.nz166 := -8+b;
frmMain.nz167 := -8+b;
frmMain.nz168 := -8+b;
frmMain.nz169 := -6+b;
frmMain.nz170 := -6+b;
frmMain.nz171 := -6+b;
frmMain.nz172 := -6+b;
frmMain.nz173 := -4+b;
frmMain.nz174 := -4+b;
frmMain.nz175 := -4+b;
frmMain.nz176 := -4+b;
frmMain.nz177 := -2+b;
frmMain.nz178 := -2+b;
frmMain.nz179 := -2+b;
frmMain.nz180 := -2+b;
 frmMain.nz181 := -3+b;
 frmMain.nz182 := -3+b;
 frmMain.nz183 := -3+b;
 frmMain.nz184 := -3+b;
 frmMain.nz185 := - 5+b;
 frmMain.nz186 := -5+b;
 frmMain.nz187 := -5+b;
 frmMain.nz188 := -5+b;
 frmMain.nz189 := -7+b;
 frmMain.nz190 := -7+b;
 frmMain.nz191 := -7+b;
 frmMain.nz192 := -7+b;
 frmMain.nz193 := -9+b;
 frmMain.nz194 := -9+b;
 frmMain.nz195 := -9+b;
 frmMain.nz196 := -9+b;
 frmMain.nz197 := -11+b;
 frmMain.nz198 := -11+b;
 frmMain.nz199 := -11+b;
 frmMain.nz200 := -11+b;
 frmMain.nz201 := -13+b;
 frmMain.nz202 := -13+b;
 frmMain.nz203 := -13+b;
 frmMain.nz204 := -13+b;
 frmMain.nz205 := -4+b;  //корабль
 frmMain.nz206 := -8+b;  //Подлодка
 frmMain.frmGL.Width:=800;
 b:=0;

 end;



 if (c=8) and (d=2) then
begin
StringGrid1.Cells[c,d]:='1';
a:=a-5;
b:=b+17;
frmMain.nx := 0+a;
  frmMain.nx1 := 0+a;
  frmMain.nx2 := 0+a;
 frmMain.nx3 := 0+a;
 frmMain.nx7 := -1+a;
 frmMain.nx8 := 1+a;
 frmMain.nx9 := -1+a;
  frmMain.nx10 := -2+a;
 frmMain.nx11 := -1+a;
 frmMain.nx12 := 1+a;
 frmMain.nx14 := 1+a;
 frmMain.nx15 := -1+a;
 frmMain.nx16 := -1+a;
 frmMain.nx17 := 1+a;
  frmMain.nx18 := -1+a;
 frmMain.nx19 := 1+a;
 frmMain.nx20 := -1+a;
 frmMain.nx21 := -1+a;
 frmMain.nx22 := 1+a;
  frmMain.nx23 := -1+a;
 frmMain.nx24 := 1+a;
  frmMain.nx25 := 1+a;
 frmMain.nx26 := -1+a;
 frmMain.nx27 := 1+a;
  frmMain.nx28 := -1+a;
  frmMain.nx29 := 1+a;
 frmMain.nx30 := -1+a;

// 1

 frmMain.nx31 := -2+a;
 frmMain.nx32 := 2+a;
 frmMain.nx33 := -2+a;
 frmMain.nx34 :=  2+a;
 frmMain.nx35 := -2+a;
 frmMain.nx36 := 2+a;
  frmMain.nx37 := -2+a;
 frmMain.nx38 := 2+a;
 frmMain.nx39 := -2+a;
 frmMain.nx40 := 2+a;
 frmMain.nx41 := -2+a;
 frmMain.nx42 := 2+a;
 frmMain.nx43 := -2+a;
 frmMain.nx44 := 2+a;
 frmMain.nx45 := -2+a;  //////////////


 //////////////////////

 frmMain.nx46 := -2+a;
 frmMain.nx47 := -2+a;
 frmMain.nx48 := 2+a;
 frmMain.nx49 := -2+a;
 frmMain.nx50 := 2+a;
 frmMain.nx51 := -3+a;
 frmMain.nx52 :=3+a;
 frmMain.nx53 := -3+a;
 frmMain.nx54 :=  3+a;
 frmMain.nx55 := -3+a;
 frmMain.nx56 := 3+a;
 frmMain.nx57 := -3+a;
 frmMain.nx58 := 3+a;
 frmMain.nx59 := -3+a;
 frmMain.nx60 := 3+a;
 frmMain.nx61 := -3+a;
 frmMain.nx62 := 3+a;
 frmMain.nx63 := -3+a;
 frmMain.nx64 := 3+a;
 frmMain.nx65 := -3+a;
 frmMain.nx66 := 3+a;
 frmMain.nx67 := -3+a;
 frmMain.nx68 := 3+a;
 frmMain.nx69 := -3+a;
 frmMain.nx70 := 3+a;


  ///3
 ///
 ///
 frmMain.nx71 := -4+a;
 frmMain.nx72 :=4+a;
 frmMain.nx73 := -4+a;
 frmMain.nx74 :=  4+a;
 frmMain.nx75 := -4+a;
 frmMain.nx76 := 4+a;
 frmMain.nx77 := -4+a;
 frmMain.nx78 := 4+a;
 frmMain.nx79 := -4+a;
 frmMain.nx80 := 4+a;
 frmMain.nx81 := -4+a;
 frmMain.nx82 := 4+a;
 frmMain.nx83 := -4+a;
 frmMain.nx84 := 4+a;
 frmMain.nx85 := -4+a;
 frmMain.nx86 := 4+a;
 frmMain.nx87 := -4+a;
 frmMain.nx88 := 4+a;
 frmMain.nx89 := -4+a;
 frmMain.nx90 := -2+a;

frmMain.nx94 :=0+a;
frmMain.nx95 :=-2+a;  //цифры
frmMain.nx96 :=-4+a;  //цифры
frmMain.nx97 :=-6+a;  //цифры
frmMain.nx98 := 2+a;  //цифры
frmMain.nx99 := 4+a;  //цифры
frmMain.nx100 := 6+a;  //цифры
frmMain.nx101 := 8+a;  //цифры
frmMain.nx102 := 10+a;  //цифры
frmMain.nx103 := 12+a;  //цифры

frmMain.nx104 := -8+a;  //буквы
frmMain.nx105 := -8+a;  //буквы
frmMain.nx106 := -8+a;  //буквы
frmMain.nx107 := -8+a;  //буквы
frmMain.nx108 := -8+a;  //буквы
frmMain.nx109 := -8+a;  //буквы
frmMain.nx110 := -8+a;  //буквы
frmMain.nx111 := -8+a;  //буквы
frmMain.nx112 := -8+a;  //буквы
frmMain.nx113 := -8+a;  //буквы

frmMain.nx114 := -6+a;  //корабль
frmMain.nx115 := 0+a;  //цифры
frmMain.nx116 :=-2+a;  //цифры
frmMain.nx117 :=-4+a;  //цифры
frmMain.nx118 :=-6+a;  //цифры
frmMain.nx119 := 2+a;  //цифры
frmMain.nx120 := 4+a;  //цифры
frmMain.nx121 := 6+a;  //цифры
frmMain.nx122 := 8+a;  //цифры
frmMain.nx123 := 10+a;  //цифры
frmMain.nx124 := 12+a;  //цифры
frmMain.nx125 := 0+a;
frmMain.nx126 := 0+a;
frmMain.nx127 := 0+a;
frmMain.nx128 := 2+a;
frmMain.nx129 := -2+a;
frmMain.nx130 := -4+a;
frmMain.nx131 := 4+a;
frmMain.nx132 := -6+a;
frmMain.nx133 := 6+a;
frmMain.nx134 := 8+a;
frmMain.nx135 := -8+a;
frmMain.nx136 := -2+a;
frmMain.nx137 := 2+a;
frmMain.nx138 := -4+a;
frmMain.nx139 := 4+a;
frmMain.nx140 := -2+a;
frmMain.nx141 := 2+a;
frmMain.nx142 := 0+a;
frmMain.nx143 := 2+a;
frmMain.nx144 := -2+a;
frmMain.nx145 := -4+a;
frmMain.nx146 := 4+a;
frmMain.nx147 := 6+a;
frmMain.nx148 := -6+a;
frmMain.nx149 := -6+a;
frmMain.nx150 := 6+a;
frmMain.nx151 := 2+a;
frmMain.nx152 := -2+a;
frmMain.nx153 := 2+a;
frmMain.nx154 := -2+a;
frmMain.nx155 := 0+a;
frmMain.nx156 := 0+a;
frmMain.nx157 := 4+a;
frmMain.nx158 := -4+a;
frmMain.nx159 := -6+a;
frmMain.nx160 := 6+a;
frmMain.nx161 := 4+a;
frmMain.nx162 := -4+a;
frmMain.nx163 := -6+a;
frmMain.nx164 := 6+a;
frmMain.nx165 := 4+a;
frmMain.nx166 := -4+a;
frmMain.nx167 := -6+a;
frmMain.nx168 := 6+a;
frmMain.nx169 := 4+a;
frmMain.nx170 := -4+a;
frmMain.nx171 := -6+a;
frmMain.nx172 := 6+a;
frmMain.nx173 := 4+a;
frmMain.nx174 := -4+a;
frmMain.nx175 := -6+a;
frmMain.nx176 := 6+a;
frmMain.nx177 := 4+a;
frmMain.nx178 := -4+a;
frmMain.nx179 := -6+a;
frmMain.nx180 := 6+a;
 frmMain.nx181 := 4+a;
 frmMain.nx182 := -4+a;
 frmMain.nx183 := -6+a;
 frmMain.nx184 := 6+a;
 frmMain.nx185 := 4+a;
 frmMain.nx186 := -4+a;
 frmMain.nx187 := -6+a;
 frmMain.nx188 := 6+a;
 frmMain.nx189 := -4+a;
 frmMain.nx190 := 4+a;
 frmMain.nx191 := -6+a;
 frmMain.nx192 := 6+a;
 frmMain.nx193 := -4+a;
 frmMain.nx194 := 4+a;
 frmMain.nx195 := -6+a;
 frmMain.nx196 := 6+a;
 frmMain.nx197 := -4+a;
 frmMain.nx198 := 4+a;
 frmMain.nx199 := -6+a;
 frmMain.nx200 := 6+a;
 frmMain.nx201 := -4+a;
 frmMain.nx202 := 4+a;
 frmMain.nx203 := -6+a;
 frmMain.nx204 := 6+a;
 frmMain.nx205 := 6+a;  //корабль
 frmMain.nx206 := 6+a;  //Подлодка
 frmMain.frmGL.Width:=800;
 a:=0;
 frmMain.nz := 0+b;
  frmMain.nz1 := 0+b;
  frmMain.nz2 := 0+b;
 frmMain.nz3 := 1+b;
 frmMain.nz7 := 0+b;
 frmMain.nz8 := 2+b;
 frmMain.nz9 := 2+b;
  frmMain.nz10 := -2+b;
 frmMain.nz11 := -2+b;
 frmMain.nz12 := -2+b;
 frmMain.nz14 := -3+b;
 frmMain.nz15 := -3+b;
 frmMain.nz16 := -4+b;
 frmMain.nz17 := -4+b;
  frmMain.nz18 := -5+b;
 frmMain.nz19 := -5+b;
 frmMain.nz20 := -6+b;
 frmMain.nz21 := -7+b;
 frmMain.nz22 := -7+b;
  frmMain.nz23 := -8+b;
 frmMain.nz24 := -8+b;
  frmMain.nz25 := -9+b;
 frmMain.nz26 := -9+b;
 frmMain.nz27 := -10+b;
  frmMain.nz28 := -10+b;
  frmMain.nz29 := -11+b;
 frmMain.nz30 := -11+b;

// 1

 frmMain.nz31 := -2+b;
 frmMain.nz32 := -2+b;
 frmMain.nz33 := -3+b;
 frmMain.nz34 := -3+b;
 frmMain.nz35 := -4+b;
 frmMain.nz36 := -4+b;
  frmMain.nz37 := -5+b;
 frmMain.nz38 := -5+b;
 frmMain.nz39 := -6+b;
 frmMain.nz40 := -6+b;
 frmMain.nz41 := -7+b;
 frmMain.nz42 := -7+b;
 frmMain.nz43 := -8+b;
 frmMain.nz44 := -8+b;
 frmMain.nz45 := -9+b;  //////////////


 //////////////////////

 frmMain.nz46 := -9+b;
 frmMain.nz47 := -9+b;
 frmMain.nz48 := -10+b;
 frmMain.nz49 := -11+b;
 frmMain.nz50 := -11+b;
 frmMain.nz51 := -2+b;
 frmMain.nz52 :=-2+b;
 frmMain.nz53 := -3+b;
 frmMain.nz54 :=  3+b;
 frmMain.nz55 := -3+b;
 frmMain.nz56 := -4+b;
 frmMain.nz57 := -5+b;
 frmMain.nz58 := -5+b;
 frmMain.nz59 := -6+b;
 frmMain.nz60 := -6+b;
 frmMain.nz61 := -7+b;
 frmMain.nz62 := -7+b;
 frmMain.nz63 := -8+b;
 frmMain.nz64 := -8+b;
 frmMain.nz65 := -9+b;
 frmMain.nz66 := -9+b;
 frmMain.nz67 := -10+b;
 frmMain.nz68 := -10+b;
 frmMain.nz69 := -11+b;
 frmMain.nz70 := -11+b;


  ///3
 ///
 ///
 frmMain.nz71 := -2+b;
 frmMain.nz72 :=-2+b;
 frmMain.nz73 := -3+b;
 frmMain.nz74 :=  -3+b;
 frmMain.nz75 := -4+b;
 frmMain.nz76 := -4+b;
 frmMain.nz77 := -5+b;
 frmMain.nz78 := -5+b;
 frmMain.nz79 := -6+b;
 frmMain.nz80 := -6+b;
 frmMain.nz81 := -7+b;
 frmMain.nz82 := -7+b;
 frmMain.nz83 := -8+b;
 frmMain.nz84 := -8+b;
 frmMain.nz85 := -9+b;
 frmMain.nz86 := -9+b;
 frmMain.nz87 := -10+b;
 frmMain.nz88 := -10+b;
 frmMain.nz89 := -11+b;
 frmMain.nz90 := -2+b;

frmMain.nz94 :=1+b;
frmMain.nz95 :=1+b;  //цифры
frmMain.nz96 :=1+b;  //цифры
frmMain.nz97 :=1+b;  //цифры
frmMain.nz98 := 1+b;  //цифры
frmMain.nz99 := 1+b;  //цифры
frmMain.nz100 := 1+b;  //цифры
frmMain.nz101 := 1+b;  //цифры
frmMain.nz102 := 1+b;  //цифры
frmMain.nz103 := 1+b;  //цифры

frmMain.nz104 := -0+b;  //буквы
frmMain.nz105 := -2+b;  //буквы
frmMain.nz106 := -4+b;  //буквы
frmMain.nz107 := -6+b;  //буквы
frmMain.nz108 := -8+b;  //буквы
frmMain.nz109 := -10+b;  //буквы
frmMain.nz110 := -12+b;  //буквы
frmMain.nz111 := -14+b;  //буквы
frmMain.nz112 := -16+b;  //буквы
frmMain.nz113 := -18+b;  //буквы

frmMain.nz114 := -4+b;  //корабль
frmMain.nz115 := -18+b;  //цифры
frmMain.nz116 :=-18+b;  //цифры
frmMain.nz117 :=-18+b;  //цифры
frmMain.nz118 :=-18+b;  //цифры
frmMain.nz119 := -18+b;  //цифры
frmMain.nz120 := -18+b;  //цифры
frmMain.nz121 := -18+b;  //цифры
frmMain.nz122 := -18+b;  //цифры
frmMain.nz123 := -18+b;  //цифры
frmMain.nz124 := -18+b;  //цифры
frmMain.nz125 := -16+b;
frmMain.nz126 := -14+b;
frmMain.nz127 := -12+b;
frmMain.nz128 := -16+b;
frmMain.nz129 := -16+b;
frmMain.nz130 := -16+b;
frmMain.nz131 := -16+b;
frmMain.nz132 := -16+b;
frmMain.nz133 := -16+b;
frmMain.nz134 := -16+b;
frmMain.nz135 := -16+b;
frmMain.nz136 := -14+b;
frmMain.nz137 := -14+b;
frmMain.nz138 := -14+b;
frmMain.nz139 := -14+b;
frmMain.nz140 := -14+b;
frmMain.nz141 := -15+b;
frmMain.nz142 := -15+b;
frmMain.nz143 := -15+b;
frmMain.nz144 := -15+b;
frmMain.nz145 := -15+b;
frmMain.nz146 := -15+b;
frmMain.nz147 := -15+b;
frmMain.nz148 := -15+b;
frmMain.nz149 := -14+b;
frmMain.nz150 := -14+b;
frmMain.nz151 := -12+b;
frmMain.nz152 := -12+b;
frmMain.nz153 := -13+b;
frmMain.nz154 := -13+b;
frmMain.nz155 := -13+b;
frmMain.nz156 := -6+b;
frmMain.nz157 := -12+b;
frmMain.nz158 := -12+b;
frmMain.nz159 := -12+b;
frmMain.nz160 := -12+b;
frmMain.nz161 := -10+b;
frmMain.nz162 := -10+b;
frmMain.nz163 := -10+b;
frmMain.nz164 := -10+b;
frmMain.nz165 := -8+b;
frmMain.nz166 := -8+b;
frmMain.nz167 := -8+b;
frmMain.nz168 := -8+b;
frmMain.nz169 := -6+b;
frmMain.nz170 := -6+b;
frmMain.nz171 := -6+b;
frmMain.nz172 := -6+b;
frmMain.nz173 := -4+b;
frmMain.nz174 := -4+b;
frmMain.nz175 := -4+b;
frmMain.nz176 := -4+b;
frmMain.nz177 := -2+b;
frmMain.nz178 := -2+b;
frmMain.nz179 := -2+b;
frmMain.nz180 := -2+b;
 frmMain.nz181 := -3+b;
 frmMain.nz182 := -3+b;
 frmMain.nz183 := -3+b;
 frmMain.nz184 := -3+b;
 frmMain.nz185 := - 5+b;
 frmMain.nz186 := -5+b;
 frmMain.nz187 := -5+b;
 frmMain.nz188 := -5+b;
 frmMain.nz189 := -7+b;
 frmMain.nz190 := -7+b;
 frmMain.nz191 := -7+b;
 frmMain.nz192 := -7+b;
 frmMain.nz193 := -9+b;
 frmMain.nz194 := -9+b;
 frmMain.nz195 := -9+b;
 frmMain.nz196 := -9+b;
 frmMain.nz197 := -11+b;
 frmMain.nz198 := -11+b;
 frmMain.nz199 := -11+b;
 frmMain.nz200 := -11+b;
 frmMain.nz201 := -13+b;
 frmMain.nz202 := -13+b;
 frmMain.nz203 := -13+b;
 frmMain.nz204 := -13+b;
 frmMain.nz205 := -4+b;  //корабль
 frmMain.nz206 := -8+b;  //Подлодка
 frmMain.frmGL.Width:=800;
 b:=0;

 end;


 if (c=8) and (d=1) then
begin
StringGrid1.Cells[c,d]:='1';
a:=a-7;
b:=b+19;
frmMain.nx := 0+a;
  frmMain.nx1 := 0+a;
  frmMain.nx2 := 0+a;
 frmMain.nx3 := 0+a;
 frmMain.nx7 := -1+a;
 frmMain.nx8 := 1+a;
 frmMain.nx9 := -1+a;
  frmMain.nx10 := -2+a;
 frmMain.nx11 := -1+a;
 frmMain.nx12 := 1+a;
 frmMain.nx14 := 1+a;
 frmMain.nx15 := -1+a;
 frmMain.nx16 := -1+a;
 frmMain.nx17 := 1+a;
  frmMain.nx18 := -1+a;
 frmMain.nx19 := 1+a;
 frmMain.nx20 := -1+a;
 frmMain.nx21 := -1+a;
 frmMain.nx22 := 1+a;
  frmMain.nx23 := -1+a;
 frmMain.nx24 := 1+a;
  frmMain.nx25 := 1+a;
 frmMain.nx26 := -1+a;
 frmMain.nx27 := 1+a;
  frmMain.nx28 := -1+a;
  frmMain.nx29 := 1+a;
 frmMain.nx30 := -1+a;

// 1

 frmMain.nx31 := -2+a;
 frmMain.nx32 := 2+a;
 frmMain.nx33 := -2+a;
 frmMain.nx34 :=  2+a;
 frmMain.nx35 := -2+a;
 frmMain.nx36 := 2+a;
  frmMain.nx37 := -2+a;
 frmMain.nx38 := 2+a;
 frmMain.nx39 := -2+a;
 frmMain.nx40 := 2+a;
 frmMain.nx41 := -2+a;
 frmMain.nx42 := 2+a;
 frmMain.nx43 := -2+a;
 frmMain.nx44 := 2+a;
 frmMain.nx45 := -2+a;  //////////////


 //////////////////////

 frmMain.nx46 := -2+a;
 frmMain.nx47 := -2+a;
 frmMain.nx48 := 2+a;
 frmMain.nx49 := -2+a;
 frmMain.nx50 := 2+a;
 frmMain.nx51 := -3+a;
 frmMain.nx52 :=3+a;
 frmMain.nx53 := -3+a;
 frmMain.nx54 :=  3+a;
 frmMain.nx55 := -3+a;
 frmMain.nx56 := 3+a;
 frmMain.nx57 := -3+a;
 frmMain.nx58 := 3+a;
 frmMain.nx59 := -3+a;
 frmMain.nx60 := 3+a;
 frmMain.nx61 := -3+a;
 frmMain.nx62 := 3+a;
 frmMain.nx63 := -3+a;
 frmMain.nx64 := 3+a;
 frmMain.nx65 := -3+a;
 frmMain.nx66 := 3+a;
 frmMain.nx67 := -3+a;
 frmMain.nx68 := 3+a;
 frmMain.nx69 := -3+a;
 frmMain.nx70 := 3+a;


  ///3
 ///
 ///
 frmMain.nx71 := -4+a;
 frmMain.nx72 :=4+a;
 frmMain.nx73 := -4+a;
 frmMain.nx74 :=  4+a;
 frmMain.nx75 := -4+a;
 frmMain.nx76 := 4+a;
 frmMain.nx77 := -4+a;
 frmMain.nx78 := 4+a;
 frmMain.nx79 := -4+a;
 frmMain.nx80 := 4+a;
 frmMain.nx81 := -4+a;
 frmMain.nx82 := 4+a;
 frmMain.nx83 := -4+a;
 frmMain.nx84 := 4+a;
 frmMain.nx85 := -4+a;
 frmMain.nx86 := 4+a;
 frmMain.nx87 := -4+a;
 frmMain.nx88 := 4+a;
 frmMain.nx89 := -4+a;
 frmMain.nx90 := -2+a;

frmMain.nx94 :=0+a;
frmMain.nx95 :=-2+a;  //цифры
frmMain.nx96 :=-4+a;  //цифры
frmMain.nx97 :=-6+a;  //цифры
frmMain.nx98 := 2+a;  //цифры
frmMain.nx99 := 4+a;  //цифры
frmMain.nx100 := 6+a;  //цифры
frmMain.nx101 := 8+a;  //цифры
frmMain.nx102 := 10+a;  //цифры
frmMain.nx103 := 12+a;  //цифры

frmMain.nx104 := -8+a;  //буквы
frmMain.nx105 := -8+a;  //буквы
frmMain.nx106 := -8+a;  //буквы
frmMain.nx107 := -8+a;  //буквы
frmMain.nx108 := -8+a;  //буквы
frmMain.nx109 := -8+a;  //буквы
frmMain.nx110 := -8+a;  //буквы
frmMain.nx111 := -8+a;  //буквы
frmMain.nx112 := -8+a;  //буквы
frmMain.nx113 := -8+a;  //буквы

frmMain.nx114 := -6+a;  //корабль
frmMain.nx115 := 0+a;  //цифры
frmMain.nx116 :=-2+a;  //цифры
frmMain.nx117 :=-4+a;  //цифры
frmMain.nx118 :=-6+a;  //цифры
frmMain.nx119 := 2+a;  //цифры
frmMain.nx120 := 4+a;  //цифры
frmMain.nx121 := 6+a;  //цифры
frmMain.nx122 := 8+a;  //цифры
frmMain.nx123 := 10+a;  //цифры
frmMain.nx124 := 12+a;  //цифры
frmMain.nx125 := 0+a;
frmMain.nx126 := 0+a;
frmMain.nx127 := 0+a;
frmMain.nx128 := 2+a;
frmMain.nx129 := -2+a;
frmMain.nx130 := -4+a;
frmMain.nx131 := 4+a;
frmMain.nx132 := -6+a;
frmMain.nx133 := 6+a;
frmMain.nx134 := 8+a;
frmMain.nx135 := -8+a;
frmMain.nx136 := -2+a;
frmMain.nx137 := 2+a;
frmMain.nx138 := -4+a;
frmMain.nx139 := 4+a;
frmMain.nx140 := -2+a;
frmMain.nx141 := 2+a;
frmMain.nx142 := 0+a;
frmMain.nx143 := 2+a;
frmMain.nx144 := -2+a;
frmMain.nx145 := -4+a;
frmMain.nx146 := 4+a;
frmMain.nx147 := 6+a;
frmMain.nx148 := -6+a;
frmMain.nx149 := -6+a;
frmMain.nx150 := 6+a;
frmMain.nx151 := 2+a;
frmMain.nx152 := -2+a;
frmMain.nx153 := 2+a;
frmMain.nx154 := -2+a;
frmMain.nx155 := 0+a;
frmMain.nx156 := 0+a;
frmMain.nx157 := 4+a;
frmMain.nx158 := -4+a;
frmMain.nx159 := -6+a;
frmMain.nx160 := 6+a;
frmMain.nx161 := 4+a;
frmMain.nx162 := -4+a;
frmMain.nx163 := -6+a;
frmMain.nx164 := 6+a;
frmMain.nx165 := 4+a;
frmMain.nx166 := -4+a;
frmMain.nx167 := -6+a;
frmMain.nx168 := 6+a;
frmMain.nx169 := 4+a;
frmMain.nx170 := -4+a;
frmMain.nx171 := -6+a;
frmMain.nx172 := 6+a;
frmMain.nx173 := 4+a;
frmMain.nx174 := -4+a;
frmMain.nx175 := -6+a;
frmMain.nx176 := 6+a;
frmMain.nx177 := 4+a;
frmMain.nx178 := -4+a;
frmMain.nx179 := -6+a;
frmMain.nx180 := 6+a;
 frmMain.nx181 := 4+a;
 frmMain.nx182 := -4+a;
 frmMain.nx183 := -6+a;
 frmMain.nx184 := 6+a;
 frmMain.nx185 := 4+a;
 frmMain.nx186 := -4+a;
 frmMain.nx187 := -6+a;
 frmMain.nx188 := 6+a;
 frmMain.nx189 := -4+a;
 frmMain.nx190 := 4+a;
 frmMain.nx191 := -6+a;
 frmMain.nx192 := 6+a;
 frmMain.nx193 := -4+a;
 frmMain.nx194 := 4+a;
 frmMain.nx195 := -6+a;
 frmMain.nx196 := 6+a;
 frmMain.nx197 := -4+a;
 frmMain.nx198 := 4+a;
 frmMain.nx199 := -6+a;
 frmMain.nx200 := 6+a;
 frmMain.nx201 := -4+a;
 frmMain.nx202 := 4+a;
 frmMain.nx203 := -6+a;
 frmMain.nx204 := 6+a;
 frmMain.nx205 := 6+a;  //корабль
 frmMain.nx206 := 6+a;  //Подлодка
 frmMain.frmGL.Width:=800;
 a:=0;
 frmMain.nz := 0+b;
  frmMain.nz1 := 0+b;
  frmMain.nz2 := 0+b;
 frmMain.nz3 := 1+b;
 frmMain.nz7 := 0+b;
 frmMain.nz8 := 2+b;
 frmMain.nz9 := 2+b;
  frmMain.nz10 := -2+b;
 frmMain.nz11 := -2+b;
 frmMain.nz12 := -2+b;
 frmMain.nz14 := -3+b;
 frmMain.nz15 := -3+b;
 frmMain.nz16 := -4+b;
 frmMain.nz17 := -4+b;
  frmMain.nz18 := -5+b;
 frmMain.nz19 := -5+b;
 frmMain.nz20 := -6+b;
 frmMain.nz21 := -7+b;
 frmMain.nz22 := -7+b;
  frmMain.nz23 := -8+b;
 frmMain.nz24 := -8+b;
  frmMain.nz25 := -9+b;
 frmMain.nz26 := -9+b;
 frmMain.nz27 := -10+b;
  frmMain.nz28 := -10+b;
  frmMain.nz29 := -11+b;
 frmMain.nz30 := -11+b;

// 1

 frmMain.nz31 := -2+b;
 frmMain.nz32 := -2+b;
 frmMain.nz33 := -3+b;
 frmMain.nz34 := -3+b;
 frmMain.nz35 := -4+b;
 frmMain.nz36 := -4+b;
  frmMain.nz37 := -5+b;
 frmMain.nz38 := -5+b;
 frmMain.nz39 := -6+b;
 frmMain.nz40 := -6+b;
 frmMain.nz41 := -7+b;
 frmMain.nz42 := -7+b;
 frmMain.nz43 := -8+b;
 frmMain.nz44 := -8+b;
 frmMain.nz45 := -9+b;  //////////////


 //////////////////////

 frmMain.nz46 := -9+b;
 frmMain.nz47 := -9+b;
 frmMain.nz48 := -10+b;
 frmMain.nz49 := -11+b;
 frmMain.nz50 := -11+b;
 frmMain.nz51 := -2+b;
 frmMain.nz52 :=-2+b;
 frmMain.nz53 := -3+b;
 frmMain.nz54 :=  3+b;
 frmMain.nz55 := -3+b;
 frmMain.nz56 := -4+b;
 frmMain.nz57 := -5+b;
 frmMain.nz58 := -5+b;
 frmMain.nz59 := -6+b;
 frmMain.nz60 := -6+b;
 frmMain.nz61 := -7+b;
 frmMain.nz62 := -7+b;
 frmMain.nz63 := -8+b;
 frmMain.nz64 := -8+b;
 frmMain.nz65 := -9+b;
 frmMain.nz66 := -9+b;
 frmMain.nz67 := -10+b;
 frmMain.nz68 := -10+b;
 frmMain.nz69 := -11+b;
 frmMain.nz70 := -11+b;


  ///3
 ///
 ///
 frmMain.nz71 := -2+b;
 frmMain.nz72 :=-2+b;
 frmMain.nz73 := -3+b;
 frmMain.nz74 :=  -3+b;
 frmMain.nz75 := -4+b;
 frmMain.nz76 := -4+b;
 frmMain.nz77 := -5+b;
 frmMain.nz78 := -5+b;
 frmMain.nz79 := -6+b;
 frmMain.nz80 := -6+b;
 frmMain.nz81 := -7+b;
 frmMain.nz82 := -7+b;
 frmMain.nz83 := -8+b;
 frmMain.nz84 := -8+b;
 frmMain.nz85 := -9+b;
 frmMain.nz86 := -9+b;
 frmMain.nz87 := -10+b;
 frmMain.nz88 := -10+b;
 frmMain.nz89 := -11+b;
 frmMain.nz90 := -2+b;

frmMain.nz94 :=1+b;
frmMain.nz95 :=1+b;  //цифры
frmMain.nz96 :=1+b;  //цифры
frmMain.nz97 :=1+b;  //цифры
frmMain.nz98 := 1+b;  //цифры
frmMain.nz99 := 1+b;  //цифры
frmMain.nz100 := 1+b;  //цифры
frmMain.nz101 := 1+b;  //цифры
frmMain.nz102 := 1+b;  //цифры
frmMain.nz103 := 1+b;  //цифры

frmMain.nz104 := -0+b;  //буквы
frmMain.nz105 := -2+b;  //буквы
frmMain.nz106 := -4+b;  //буквы
frmMain.nz107 := -6+b;  //буквы
frmMain.nz108 := -8+b;  //буквы
frmMain.nz109 := -10+b;  //буквы
frmMain.nz110 := -12+b;  //буквы
frmMain.nz111 := -14+b;  //буквы
frmMain.nz112 := -16+b;  //буквы
frmMain.nz113 := -18+b;  //буквы

frmMain.nz114 := -4+b;  //корабль
frmMain.nz115 := -18+b;  //цифры
frmMain.nz116 :=-18+b;  //цифры
frmMain.nz117 :=-18+b;  //цифры
frmMain.nz118 :=-18+b;  //цифры
frmMain.nz119 := -18+b;  //цифры
frmMain.nz120 := -18+b;  //цифры
frmMain.nz121 := -18+b;  //цифры
frmMain.nz122 := -18+b;  //цифры
frmMain.nz123 := -18+b;  //цифры
frmMain.nz124 := -18+b;  //цифры
frmMain.nz125 := -16+b;
frmMain.nz126 := -14+b;
frmMain.nz127 := -12+b;
frmMain.nz128 := -16+b;
frmMain.nz129 := -16+b;
frmMain.nz130 := -16+b;
frmMain.nz131 := -16+b;
frmMain.nz132 := -16+b;
frmMain.nz133 := -16+b;
frmMain.nz134 := -16+b;
frmMain.nz135 := -16+b;
frmMain.nz136 := -14+b;
frmMain.nz137 := -14+b;
frmMain.nz138 := -14+b;
frmMain.nz139 := -14+b;
frmMain.nz140 := -14+b;
frmMain.nz141 := -15+b;
frmMain.nz142 := -15+b;
frmMain.nz143 := -15+b;
frmMain.nz144 := -15+b;
frmMain.nz145 := -15+b;
frmMain.nz146 := -15+b;
frmMain.nz147 := -15+b;
frmMain.nz148 := -15+b;
frmMain.nz149 := -14+b;
frmMain.nz150 := -14+b;
frmMain.nz151 := -12+b;
frmMain.nz152 := -12+b;
frmMain.nz153 := -13+b;
frmMain.nz154 := -13+b;
frmMain.nz155 := -13+b;
frmMain.nz156 := -6+b;
frmMain.nz157 := -12+b;
frmMain.nz158 := -12+b;
frmMain.nz159 := -12+b;
frmMain.nz160 := -12+b;
frmMain.nz161 := -10+b;
frmMain.nz162 := -10+b;
frmMain.nz163 := -10+b;
frmMain.nz164 := -10+b;
frmMain.nz165 := -8+b;
frmMain.nz166 := -8+b;
frmMain.nz167 := -8+b;
frmMain.nz168 := -8+b;
frmMain.nz169 := -6+b;
frmMain.nz170 := -6+b;
frmMain.nz171 := -6+b;
frmMain.nz172 := -6+b;
frmMain.nz173 := -4+b;
frmMain.nz174 := -4+b;
frmMain.nz175 := -4+b;
frmMain.nz176 := -4+b;
frmMain.nz177 := -2+b;
frmMain.nz178 := -2+b;
frmMain.nz179 := -2+b;
frmMain.nz180 := -2+b;
 frmMain.nz181 := -3+b;
 frmMain.nz182 := -3+b;
 frmMain.nz183 := -3+b;
 frmMain.nz184 := -3+b;
 frmMain.nz185 := - 5+b;
 frmMain.nz186 := -5+b;
 frmMain.nz187 := -5+b;
 frmMain.nz188 := -5+b;
 frmMain.nz189 := -7+b;
 frmMain.nz190 := -7+b;
 frmMain.nz191 := -7+b;
 frmMain.nz192 := -7+b;
 frmMain.nz193 := -9+b;
 frmMain.nz194 := -9+b;
 frmMain.nz195 := -9+b;
 frmMain.nz196 := -9+b;
 frmMain.nz197 := -11+b;
 frmMain.nz198 := -11+b;
 frmMain.nz199 := -11+b;
 frmMain.nz200 := -11+b;
 frmMain.nz201 := -13+b;
 frmMain.nz202 := -13+b;
 frmMain.nz203 := -13+b;
 frmMain.nz204 := -13+b;
 frmMain.nz205 := -4+b;  //корабль
 frmMain.nz206 := -8+b;  //Подлодка
 frmMain.frmGL.Width:=800;
 b:=0;

 end;



if (c=7) and (d=1) then
begin
StringGrid1.Cells[c,d]:='1';
a:=a-3;
b:=b+19;
frmMain.nx := 0+a;
  frmMain.nx1 := 0+a;
  frmMain.nx2 := 0+a;
 frmMain.nx3 := 0+a;
 frmMain.nx7 := -1+a;
 frmMain.nx8 := 1+a;
 frmMain.nx9 := -1+a;
  frmMain.nx10 := -2+a;
 frmMain.nx11 := -1+a;
 frmMain.nx12 := 1+a;
 frmMain.nx14 := 1+a;
 frmMain.nx15 := -1+a;
 frmMain.nx16 := -1+a;
 frmMain.nx17 := 1+a;
  frmMain.nx18 := -1+a;
 frmMain.nx19 := 1+a;
 frmMain.nx20 := -1+a;
 frmMain.nx21 := -1+a;
 frmMain.nx22 := 1+a;
  frmMain.nx23 := -1+a;
 frmMain.nx24 := 1+a;
  frmMain.nx25 := 1+a;
 frmMain.nx26 := -1+a;
 frmMain.nx27 := 1+a;
  frmMain.nx28 := -1+a;
  frmMain.nx29 := 1+a;
 frmMain.nx30 := -1+a;

// 1

 frmMain.nx31 := -2+a;
 frmMain.nx32 := 2+a;
 frmMain.nx33 := -2+a;
 frmMain.nx34 :=  2+a;
 frmMain.nx35 := -2+a;
 frmMain.nx36 := 2+a;
  frmMain.nx37 := -2+a;
 frmMain.nx38 := 2+a;
 frmMain.nx39 := -2+a;
 frmMain.nx40 := 2+a;
 frmMain.nx41 := -2+a;
 frmMain.nx42 := 2+a;
 frmMain.nx43 := -2+a;
 frmMain.nx44 := 2+a;
 frmMain.nx45 := -2+a;  //////////////


 //////////////////////

 frmMain.nx46 := -2+a;
 frmMain.nx47 := -2+a;
 frmMain.nx48 := 2+a;
 frmMain.nx49 := -2+a;
 frmMain.nx50 := 2+a;
 frmMain.nx51 := -3+a;
 frmMain.nx52 :=3+a;
 frmMain.nx53 := -3+a;
 frmMain.nx54 :=  3+a;
 frmMain.nx55 := -3+a;
 frmMain.nx56 := 3+a;
 frmMain.nx57 := -3+a;
 frmMain.nx58 := 3+a;
 frmMain.nx59 := -3+a;
 frmMain.nx60 := 3+a;
 frmMain.nx61 := -3+a;
 frmMain.nx62 := 3+a;
 frmMain.nx63 := -3+a;
 frmMain.nx64 := 3+a;
 frmMain.nx65 := -3+a;
 frmMain.nx66 := 3+a;
 frmMain.nx67 := -3+a;
 frmMain.nx68 := 3+a;
 frmMain.nx69 := -3+a;
 frmMain.nx70 := 3+a;


  ///3
 ///
 ///
 frmMain.nx71 := -4+a;
 frmMain.nx72 :=4+a;
 frmMain.nx73 := -4+a;
 frmMain.nx74 :=  4+a;
 frmMain.nx75 := -4+a;
 frmMain.nx76 := 4+a;
 frmMain.nx77 := -4+a;
 frmMain.nx78 := 4+a;
 frmMain.nx79 := -4+a;
 frmMain.nx80 := 4+a;
 frmMain.nx81 := -4+a;
 frmMain.nx82 := 4+a;
 frmMain.nx83 := -4+a;
 frmMain.nx84 := 4+a;
 frmMain.nx85 := -4+a;
 frmMain.nx86 := 4+a;
 frmMain.nx87 := -4+a;
 frmMain.nx88 := 4+a;
 frmMain.nx89 := -4+a;
 frmMain.nx90 := -2+a;

frmMain.nx94 :=0+a;
frmMain.nx95 :=-2+a;  //цифры
frmMain.nx96 :=-4+a;  //цифры
frmMain.nx97 :=-6+a;  //цифры
frmMain.nx98 := 2+a;  //цифры
frmMain.nx99 := 4+a;  //цифры
frmMain.nx100 := 6+a;  //цифры
frmMain.nx101 := 8+a;  //цифры
frmMain.nx102 := 10+a;  //цифры
frmMain.nx103 := 12+a;  //цифры

frmMain.nx104 := -8+a;  //буквы
frmMain.nx105 := -8+a;  //буквы
frmMain.nx106 := -8+a;  //буквы
frmMain.nx107 := -8+a;  //буквы
frmMain.nx108 := -8+a;  //буквы
frmMain.nx109 := -8+a;  //буквы
frmMain.nx110 := -8+a;  //буквы
frmMain.nx111 := -8+a;  //буквы
frmMain.nx112 := -8+a;  //буквы
frmMain.nx113 := -8+a;  //буквы

frmMain.nx114 := -6+a;  //корабль
frmMain.nx115 := 0+a;  //цифры
frmMain.nx116 :=-2+a;  //цифры
frmMain.nx117 :=-4+a;  //цифры
frmMain.nx118 :=-6+a;  //цифры
frmMain.nx119 := 2+a;  //цифры
frmMain.nx120 := 4+a;  //цифры
frmMain.nx121 := 6+a;  //цифры
frmMain.nx122 := 8+a;  //цифры
frmMain.nx123 := 10+a;  //цифры
frmMain.nx124 := 12+a;  //цифры
frmMain.nx125 := 0+a;
frmMain.nx126 := 0+a;
frmMain.nx127 := 0+a;
frmMain.nx128 := 2+a;
frmMain.nx129 := -2+a;
frmMain.nx130 := -4+a;
frmMain.nx131 := 4+a;
frmMain.nx132 := -6+a;
frmMain.nx133 := 6+a;
frmMain.nx134 := 8+a;
frmMain.nx135 := -8+a;
frmMain.nx136 := -2+a;
frmMain.nx137 := 2+a;
frmMain.nx138 := -4+a;
frmMain.nx139 := 4+a;
frmMain.nx140 := -2+a;
frmMain.nx141 := 2+a;
frmMain.nx142 := 0+a;
frmMain.nx143 := 2+a;
frmMain.nx144 := -2+a;
frmMain.nx145 := -4+a;
frmMain.nx146 := 4+a;
frmMain.nx147 := 6+a;
frmMain.nx148 := -6+a;
frmMain.nx149 := -6+a;
frmMain.nx150 := 6+a;
frmMain.nx151 := 2+a;
frmMain.nx152 := -2+a;
frmMain.nx153 := 2+a;
frmMain.nx154 := -2+a;
frmMain.nx155 := 0+a;
frmMain.nx156 := 0+a;
frmMain.nx157 := 4+a;
frmMain.nx158 := -4+a;
frmMain.nx159 := -6+a;
frmMain.nx160 := 6+a;
frmMain.nx161 := 4+a;
frmMain.nx162 := -4+a;
frmMain.nx163 := -6+a;
frmMain.nx164 := 6+a;
frmMain.nx165 := 4+a;
frmMain.nx166 := -4+a;
frmMain.nx167 := -6+a;
frmMain.nx168 := 6+a;
frmMain.nx169 := 4+a;
frmMain.nx170 := -4+a;
frmMain.nx171 := -6+a;
frmMain.nx172 := 6+a;
frmMain.nx173 := 4+a;
frmMain.nx174 := -4+a;
frmMain.nx175 := -6+a;
frmMain.nx176 := 6+a;
frmMain.nx177 := 4+a;
frmMain.nx178 := -4+a;
frmMain.nx179 := -6+a;
frmMain.nx180 := 6+a;
 frmMain.nx181 := 4+a;
 frmMain.nx182 := -4+a;
 frmMain.nx183 := -6+a;
 frmMain.nx184 := 6+a;
 frmMain.nx185 := 4+a;
 frmMain.nx186 := -4+a;
 frmMain.nx187 := -6+a;
 frmMain.nx188 := 6+a;
 frmMain.nx189 := -4+a;
 frmMain.nx190 := 4+a;
 frmMain.nx191 := -6+a;
 frmMain.nx192 := 6+a;
 frmMain.nx193 := -4+a;
 frmMain.nx194 := 4+a;
 frmMain.nx195 := -6+a;
 frmMain.nx196 := 6+a;
 frmMain.nx197 := -4+a;
 frmMain.nx198 := 4+a;
 frmMain.nx199 := -6+a;
 frmMain.nx200 := 6+a;
 frmMain.nx201 := -4+a;
 frmMain.nx202 := 4+a;
 frmMain.nx203 := -6+a;
 frmMain.nx204 := 6+a;
 frmMain.nx205 := 6+a;  //корабль
 frmMain.nx206 := 6+a;  //Подлодка
 frmMain.nx215 := -6+a;
 frmMain.frmGL.Width:=800;
 a:=0;
 frmMain.nz := 0+b;
  frmMain.nz1 := 0+b;
  frmMain.nz2 := 0+b;
 frmMain.nz3 := 1+b;
 frmMain.nz7 := 0+b;
 frmMain.nz8 := 2+b;
 frmMain.nz9 := 2+b;
  frmMain.nz10 := -2+b;
 frmMain.nz11 := -2+b;
 frmMain.nz12 := -2+b;
 frmMain.nz14 := -3+b;
 frmMain.nz15 := -3+b;
 frmMain.nz16 := -4+b;
 frmMain.nz17 := -4+b;
  frmMain.nz18 := -5+b;
 frmMain.nz19 := -5+b;
 frmMain.nz20 := -6+b;
 frmMain.nz21 := -7+b;
 frmMain.nz22 := -7+b;
  frmMain.nz23 := -8+b;
 frmMain.nz24 := -8+b;
  frmMain.nz25 := -9+b;
 frmMain.nz26 := -9+b;
 frmMain.nz27 := -10+b;
  frmMain.nz28 := -10+b;
  frmMain.nz29 := -11+b;
 frmMain.nz30 := -11+b;

// 1

 frmMain.nz31 := -2+b;
 frmMain.nz32 := -2+b;
 frmMain.nz33 := -3+b;
 frmMain.nz34 := -3+b;
 frmMain.nz35 := -4+b;
 frmMain.nz36 := -4+b;
  frmMain.nz37 := -5+b;
 frmMain.nz38 := -5+b;
 frmMain.nz39 := -6+b;
 frmMain.nz40 := -6+b;
 frmMain.nz41 := -7+b;
 frmMain.nz42 := -7+b;
 frmMain.nz43 := -8+b;
 frmMain.nz44 := -8+b;
 frmMain.nz45 := -9+b;  //////////////


 //////////////////////

 frmMain.nz46 := -9+b;
 frmMain.nz47 := -9+b;
 frmMain.nz48 := -10+b;
 frmMain.nz49 := -11+b;
 frmMain.nz50 := -11+b;
 frmMain.nz51 := -2+b;
 frmMain.nz52 :=-2+b;
 frmMain.nz53 := -3+b;
 frmMain.nz54 :=  3+b;
 frmMain.nz55 := -3+b;
 frmMain.nz56 := -4+b;
 frmMain.nz57 := -5+b;
 frmMain.nz58 := -5+b;
 frmMain.nz59 := -6+b;
 frmMain.nz60 := -6+b;
 frmMain.nz61 := -7+b;
 frmMain.nz62 := -7+b;
 frmMain.nz63 := -8+b;
 frmMain.nz64 := -8+b;
 frmMain.nz65 := -9+b;
 frmMain.nz66 := -9+b;
 frmMain.nz67 := -10+b;
 frmMain.nz68 := -10+b;
 frmMain.nz69 := -11+b;
 frmMain.nz70 := -11+b;


  ///3
 ///
 ///
 frmMain.nz71 := -2+b;
 frmMain.nz72 :=-2+b;
 frmMain.nz73 := -3+b;
 frmMain.nz74 :=  -3+b;
 frmMain.nz75 := -4+b;
 frmMain.nz76 := -4+b;
 frmMain.nz77 := -5+b;
 frmMain.nz78 := -5+b;
 frmMain.nz79 := -6+b;
 frmMain.nz80 := -6+b;
 frmMain.nz81 := -7+b;
 frmMain.nz82 := -7+b;
 frmMain.nz83 := -8+b;
 frmMain.nz84 := -8+b;
 frmMain.nz85 := -9+b;
 frmMain.nz86 := -9+b;
 frmMain.nz87 := -10+b;
 frmMain.nz88 := -10+b;
 frmMain.nz89 := -11+b;
 frmMain.nz90 := -2+b;

frmMain.nz94 :=1+b;
frmMain.nz95 :=1+b;  //цифры
frmMain.nz96 :=1+b;  //цифры
frmMain.nz97 :=1+b;  //цифры
frmMain.nz98 := 1+b;  //цифры
frmMain.nz99 := 1+b;  //цифры
frmMain.nz100 := 1+b;  //цифры
frmMain.nz101 := 1+b;  //цифры
frmMain.nz102 := 1+b;  //цифры
frmMain.nz103 := 1+b;  //цифры

frmMain.nz104 := -0+b;  //буквы
frmMain.nz105 := -2+b;  //буквы
frmMain.nz106 := -4+b;  //буквы
frmMain.nz107 := -6+b;  //буквы
frmMain.nz108 := -8+b;  //буквы
frmMain.nz109 := -10+b;  //буквы
frmMain.nz110 := -12+b;  //буквы
frmMain.nz111 := -14+b;  //буквы
frmMain.nz112 := -16+b;  //буквы
frmMain.nz113 := -18+b;  //буквы

frmMain.nz114 := -4+b;  //корабль
frmMain.nz115 := -18+b;  //цифры
frmMain.nz116 :=-18+b;  //цифры
frmMain.nz117 :=-18+b;  //цифры
frmMain.nz118 :=-18+b;  //цифры
frmMain.nz119 := -18+b;  //цифры
frmMain.nz120 := -18+b;  //цифры
frmMain.nz121 := -18+b;  //цифры
frmMain.nz122 := -18+b;  //цифры
frmMain.nz123 := -18+b;  //цифры
frmMain.nz124 := -18+b;  //цифры
frmMain.nz125 := -16+b;
frmMain.nz126 := -14+b;
frmMain.nz127 := -12+b;
frmMain.nz128 := -16+b;
frmMain.nz129 := -16+b;
frmMain.nz130 := -16+b;
frmMain.nz131 := -16+b;
frmMain.nz132 := -16+b;
frmMain.nz133 := -16+b;
frmMain.nz134 := -16+b;
frmMain.nz135 := -16+b;
frmMain.nz136 := -14+b;
frmMain.nz137 := -14+b;
frmMain.nz138 := -14+b;
frmMain.nz139 := -14+b;
frmMain.nz140 := -14+b;
frmMain.nz141 := -15+b;
frmMain.nz142 := -15+b;
frmMain.nz143 := -15+b;
frmMain.nz144 := -15+b;
frmMain.nz145 := -15+b;
frmMain.nz146 := -15+b;
frmMain.nz147 := -15+b;
frmMain.nz148 := -15+b;
frmMain.nz149 := -14+b;
frmMain.nz150 := -14+b;
frmMain.nz151 := -12+b;
frmMain.nz152 := -12+b;
frmMain.nz153 := -13+b;
frmMain.nz154 := -13+b;
frmMain.nz155 := -13+b;
frmMain.nz156 := -6+b;
frmMain.nz157 := -12+b;
frmMain.nz158 := -12+b;
frmMain.nz159 := -12+b;
frmMain.nz160 := -12+b;
frmMain.nz161 := -10+b;
frmMain.nz162 := -10+b;
frmMain.nz163 := -10+b;
frmMain.nz164 := -10+b;
frmMain.nz165 := -8+b;
frmMain.nz166 := -8+b;
frmMain.nz167 := -8+b;
frmMain.nz168 := -8+b;
frmMain.nz169 := -6+b;
frmMain.nz170 := -6+b;
frmMain.nz171 := -6+b;
frmMain.nz172 := -6+b;
frmMain.nz173 := -4+b;
frmMain.nz174 := -4+b;
frmMain.nz175 := -4+b;
frmMain.nz176 := -4+b;
frmMain.nz177 := -2+b;
frmMain.nz178 := -2+b;
frmMain.nz179 := -2+b;
frmMain.nz180 := -2+b;
 frmMain.nz181 := -3+b;
 frmMain.nz182 := -3+b;
 frmMain.nz183 := -3+b;
 frmMain.nz184 := -3+b;
 frmMain.nz185 := - 5+b;
 frmMain.nz186 := -5+b;
 frmMain.nz187 := -5+b;
 frmMain.nz188 := -5+b;
 frmMain.nz189 := -7+b;
 frmMain.nz190 := -7+b;
 frmMain.nz191 := -7+b;
 frmMain.nz192 := -7+b;
 frmMain.nz193 := -9+b;
 frmMain.nz194 := -9+b;
 frmMain.nz195 := -9+b;
 frmMain.nz196 := -9+b;
 frmMain.nz197 := -11+b;
 frmMain.nz198 := -11+b;
 frmMain.nz199 := -11+b;
 frmMain.nz200 := -11+b;
 frmMain.nz201 := -13+b;
 frmMain.nz202 := -13+b;
 frmMain.nz203 := -13+b;
 frmMain.nz204 := -13+b;
 frmMain.nz205 := -4+b;  //корабль
 frmMain.nz206 := -8+b;  //Подлодка
 frmMain.nz215 := -12+b;
 frmMain.frmGL.Width:=800;
 b:=0;

 end;







  if (c=7) and (d=2) then
begin
StringGrid1.Cells[c,d]:='1';
a:=a-3;
b:=b+17;
frmMain.nx := 0+a;
  frmMain.nx1 := 0+a;
  frmMain.nx2 := 0+a;
 frmMain.nx3 := 0+a;
 frmMain.nx7 := -1+a;
 frmMain.nx8 := 1+a;
 frmMain.nx9 := -1+a;
  frmMain.nx10 := -2+a;
 frmMain.nx11 := -1+a;
 frmMain.nx12 := 1+a;
 frmMain.nx14 := 1+a;
 frmMain.nx15 := -1+a;
 frmMain.nx16 := -1+a;
 frmMain.nx17 := 1+a;
  frmMain.nx18 := -1+a;
 frmMain.nx19 := 1+a;
 frmMain.nx20 := -1+a;
 frmMain.nx21 := -1+a;
 frmMain.nx22 := 1+a;
  frmMain.nx23 := -1+a;
 frmMain.nx24 := 1+a;
  frmMain.nx25 := 1+a;
 frmMain.nx26 := -1+a;
 frmMain.nx27 := 1+a;
  frmMain.nx28 := -1+a;
  frmMain.nx29 := 1+a;
 frmMain.nx30 := -1+a;

// 1

 frmMain.nx31 := -2+a;
 frmMain.nx32 := 2+a;
 frmMain.nx33 := -2+a;
 frmMain.nx34 :=  2+a;
 frmMain.nx35 := -2+a;
 frmMain.nx36 := 2+a;
  frmMain.nx37 := -2+a;
 frmMain.nx38 := 2+a;
 frmMain.nx39 := -2+a;
 frmMain.nx40 := 2+a;
 frmMain.nx41 := -2+a;
 frmMain.nx42 := 2+a;
 frmMain.nx43 := -2+a;
 frmMain.nx44 := 2+a;
 frmMain.nx45 := -2+a;  //////////////


 //////////////////////

 frmMain.nx46 := -2+a;
 frmMain.nx47 := -2+a;
 frmMain.nx48 := 2+a;
 frmMain.nx49 := -2+a;
 frmMain.nx50 := 2+a;
 frmMain.nx51 := -3+a;
 frmMain.nx52 :=3+a;
 frmMain.nx53 := -3+a;
 frmMain.nx54 :=  3+a;
 frmMain.nx55 := -3+a;
 frmMain.nx56 := 3+a;
 frmMain.nx57 := -3+a;
 frmMain.nx58 := 3+a;
 frmMain.nx59 := -3+a;
 frmMain.nx60 := 3+a;
 frmMain.nx61 := -3+a;
 frmMain.nx62 := 3+a;
 frmMain.nx63 := -3+a;
 frmMain.nx64 := 3+a;
 frmMain.nx65 := -3+a;
 frmMain.nx66 := 3+a;
 frmMain.nx67 := -3+a;
 frmMain.nx68 := 3+a;
 frmMain.nx69 := -3+a;
 frmMain.nx70 := 3+a;


  ///3
 ///
 ///
 frmMain.nx71 := -4+a;
 frmMain.nx72 :=4+a;
 frmMain.nx73 := -4+a;
 frmMain.nx74 :=  4+a;
 frmMain.nx75 := -4+a;
 frmMain.nx76 := 4+a;
 frmMain.nx77 := -4+a;
 frmMain.nx78 := 4+a;
 frmMain.nx79 := -4+a;
 frmMain.nx80 := 4+a;
 frmMain.nx81 := -4+a;
 frmMain.nx82 := 4+a;
 frmMain.nx83 := -4+a;
 frmMain.nx84 := 4+a;
 frmMain.nx85 := -4+a;
 frmMain.nx86 := 4+a;
 frmMain.nx87 := -4+a;
 frmMain.nx88 := 4+a;
 frmMain.nx89 := -4+a;
 frmMain.nx90 := -2+a;

frmMain.nx94 :=0+a;
frmMain.nx95 :=-2+a;  //цифры
frmMain.nx96 :=-4+a;  //цифры
frmMain.nx97 :=-6+a;  //цифры
frmMain.nx98 := 2+a;  //цифры
frmMain.nx99 := 4+a;  //цифры
frmMain.nx100 := 6+a;  //цифры
frmMain.nx101 := 8+a;  //цифры
frmMain.nx102 := 10+a;  //цифры
frmMain.nx103 := 12+a;  //цифры

frmMain.nx104 := -8+a;  //буквы
frmMain.nx105 := -8+a;  //буквы
frmMain.nx106 := -8+a;  //буквы
frmMain.nx107 := -8+a;  //буквы
frmMain.nx108 := -8+a;  //буквы
frmMain.nx109 := -8+a;  //буквы
frmMain.nx110 := -8+a;  //буквы
frmMain.nx111 := -8+a;  //буквы
frmMain.nx112 := -8+a;  //буквы
frmMain.nx113 := -8+a;  //буквы

frmMain.nx114 := -6+a;  //корабль
frmMain.nx115 := 0+a;  //цифры
frmMain.nx116 :=-2+a;  //цифры
frmMain.nx117 :=-4+a;  //цифры
frmMain.nx118 :=-6+a;  //цифры
frmMain.nx119 := 2+a;  //цифры
frmMain.nx120 := 4+a;  //цифры
frmMain.nx121 := 6+a;  //цифры
frmMain.nx122 := 8+a;  //цифры
frmMain.nx123 := 10+a;  //цифры
frmMain.nx124 := 12+a;  //цифры
frmMain.nx125 := 0+a;
frmMain.nx126 := 0+a;
frmMain.nx127 := 0+a;
frmMain.nx128 := 2+a;
frmMain.nx129 := -2+a;
frmMain.nx130 := -4+a;
frmMain.nx131 := 4+a;
frmMain.nx132 := -6+a;
frmMain.nx133 := 6+a;
frmMain.nx134 := 8+a;
frmMain.nx135 := -8+a;
frmMain.nx136 := -2+a;
frmMain.nx137 := 2+a;
frmMain.nx138 := -4+a;
frmMain.nx139 := 4+a;
frmMain.nx140 := -2+a;
frmMain.nx141 := 2+a;
frmMain.nx142 := 0+a;
frmMain.nx143 := 2+a;
frmMain.nx144 := -2+a;
frmMain.nx145 := -4+a;
frmMain.nx146 := 4+a;
frmMain.nx147 := 6+a;
frmMain.nx148 := -6+a;
frmMain.nx149 := -6+a;
frmMain.nx150 := 6+a;
frmMain.nx151 := 2+a;
frmMain.nx152 := -2+a;
frmMain.nx153 := 2+a;
frmMain.nx154 := -2+a;
frmMain.nx155 := 0+a;
frmMain.nx156 := 0+a;
frmMain.nx157 := 4+a;
frmMain.nx158 := -4+a;
frmMain.nx159 := -6+a;
frmMain.nx160 := 6+a;
frmMain.nx161 := 4+a;
frmMain.nx162 := -4+a;
frmMain.nx163 := -6+a;
frmMain.nx164 := 6+a;
frmMain.nx165 := 4+a;
frmMain.nx166 := -4+a;
frmMain.nx167 := -6+a;
frmMain.nx168 := 6+a;
frmMain.nx169 := 4+a;
frmMain.nx170 := -4+a;
frmMain.nx171 := -6+a;
frmMain.nx172 := 6+a;
frmMain.nx173 := 4+a;
frmMain.nx174 := -4+a;
frmMain.nx175 := -6+a;
frmMain.nx176 := 6+a;
frmMain.nx177 := 4+a;
frmMain.nx178 := -4+a;
frmMain.nx179 := -6+a;
frmMain.nx180 := 6+a;
 frmMain.nx181 := 4+a;
 frmMain.nx182 := -4+a;
 frmMain.nx183 := -6+a;
 frmMain.nx184 := 6+a;
 frmMain.nx185 := 4+a;
 frmMain.nx186 := -4+a;
 frmMain.nx187 := -6+a;
 frmMain.nx188 := 6+a;
 frmMain.nx189 := -4+a;
 frmMain.nx190 := 4+a;
 frmMain.nx191 := -6+a;
 frmMain.nx192 := 6+a;
 frmMain.nx193 := -4+a;
 frmMain.nx194 := 4+a;
 frmMain.nx195 := -6+a;
 frmMain.nx196 := 6+a;
 frmMain.nx197 := -4+a;
 frmMain.nx198 := 4+a;
 frmMain.nx199 := -6+a;
 frmMain.nx200 := 6+a;
 frmMain.nx201 := -4+a;
 frmMain.nx202 := 4+a;
 frmMain.nx203 := -6+a;
 frmMain.nx204 := 6+a;
 frmMain.nx205 := 6+a;  //корабль
 frmMain.nx206 := 6+a;  //Подлодка
 frmMain.nx215 := -6+a;
 frmMain.frmGL.Width:=800;
 a:=0;
 frmMain.nz := 0+b;
  frmMain.nz1 := 0+b;
  frmMain.nz2 := 0+b;
 frmMain.nz3 := 1+b;
 frmMain.nz7 := 0+b;
 frmMain.nz8 := 2+b;
 frmMain.nz9 := 2+b;
  frmMain.nz10 := -2+b;
 frmMain.nz11 := -2+b;
 frmMain.nz12 := -2+b;
 frmMain.nz14 := -3+b;
 frmMain.nz15 := -3+b;
 frmMain.nz16 := -4+b;
 frmMain.nz17 := -4+b;
  frmMain.nz18 := -5+b;
 frmMain.nz19 := -5+b;
 frmMain.nz20 := -6+b;
 frmMain.nz21 := -7+b;
 frmMain.nz22 := -7+b;
  frmMain.nz23 := -8+b;
 frmMain.nz24 := -8+b;
  frmMain.nz25 := -9+b;
 frmMain.nz26 := -9+b;
 frmMain.nz27 := -10+b;
  frmMain.nz28 := -10+b;
  frmMain.nz29 := -11+b;
 frmMain.nz30 := -11+b;

// 1

 frmMain.nz31 := -2+b;
 frmMain.nz32 := -2+b;
 frmMain.nz33 := -3+b;
 frmMain.nz34 := -3+b;
 frmMain.nz35 := -4+b;
 frmMain.nz36 := -4+b;
  frmMain.nz37 := -5+b;
 frmMain.nz38 := -5+b;
 frmMain.nz39 := -6+b;
 frmMain.nz40 := -6+b;
 frmMain.nz41 := -7+b;
 frmMain.nz42 := -7+b;
 frmMain.nz43 := -8+b;
 frmMain.nz44 := -8+b;
 frmMain.nz45 := -9+b;  //////////////


 //////////////////////

 frmMain.nz46 := -9+b;
 frmMain.nz47 := -9+b;
 frmMain.nz48 := -10+b;
 frmMain.nz49 := -11+b;
 frmMain.nz50 := -11+b;
 frmMain.nz51 := -2+b;
 frmMain.nz52 :=-2+b;
 frmMain.nz53 := -3+b;
 frmMain.nz54 :=  3+b;
 frmMain.nz55 := -3+b;
 frmMain.nz56 := -4+b;
 frmMain.nz57 := -5+b;
 frmMain.nz58 := -5+b;
 frmMain.nz59 := -6+b;
 frmMain.nz60 := -6+b;
 frmMain.nz61 := -7+b;
 frmMain.nz62 := -7+b;
 frmMain.nz63 := -8+b;
 frmMain.nz64 := -8+b;
 frmMain.nz65 := -9+b;
 frmMain.nz66 := -9+b;
 frmMain.nz67 := -10+b;
 frmMain.nz68 := -10+b;
 frmMain.nz69 := -11+b;
 frmMain.nz70 := -11+b;


  ///3
 ///
 ///
 frmMain.nz71 := -2+b;
 frmMain.nz72 :=-2+b;
 frmMain.nz73 := -3+b;
 frmMain.nz74 :=  -3+b;
 frmMain.nz75 := -4+b;
 frmMain.nz76 := -4+b;
 frmMain.nz77 := -5+b;
 frmMain.nz78 := -5+b;
 frmMain.nz79 := -6+b;
 frmMain.nz80 := -6+b;
 frmMain.nz81 := -7+b;
 frmMain.nz82 := -7+b;
 frmMain.nz83 := -8+b;
 frmMain.nz84 := -8+b;
 frmMain.nz85 := -9+b;
 frmMain.nz86 := -9+b;
 frmMain.nz87 := -10+b;
 frmMain.nz88 := -10+b;
 frmMain.nz89 := -11+b;
 frmMain.nz90 := -2+b;

frmMain.nz94 :=1+b;
frmMain.nz95 :=1+b;  //цифры
frmMain.nz96 :=1+b;  //цифры
frmMain.nz97 :=1+b;  //цифры
frmMain.nz98 := 1+b;  //цифры
frmMain.nz99 := 1+b;  //цифры
frmMain.nz100 := 1+b;  //цифры
frmMain.nz101 := 1+b;  //цифры
frmMain.nz102 := 1+b;  //цифры
frmMain.nz103 := 1+b;  //цифры

frmMain.nz104 := -0+b;  //буквы
frmMain.nz105 := -2+b;  //буквы
frmMain.nz106 := -4+b;  //буквы
frmMain.nz107 := -6+b;  //буквы
frmMain.nz108 := -8+b;  //буквы
frmMain.nz109 := -10+b;  //буквы
frmMain.nz110 := -12+b;  //буквы
frmMain.nz111 := -14+b;  //буквы
frmMain.nz112 := -16+b;  //буквы
frmMain.nz113 := -18+b;  //буквы

frmMain.nz114 := -4+b;  //корабль
frmMain.nz115 := -18+b;  //цифры
frmMain.nz116 :=-18+b;  //цифры
frmMain.nz117 :=-18+b;  //цифры
frmMain.nz118 :=-18+b;  //цифры
frmMain.nz119 := -18+b;  //цифры
frmMain.nz120 := -18+b;  //цифры
frmMain.nz121 := -18+b;  //цифры
frmMain.nz122 := -18+b;  //цифры
frmMain.nz123 := -18+b;  //цифры
frmMain.nz124 := -18+b;  //цифры
frmMain.nz125 := -16+b;
frmMain.nz126 := -14+b;
frmMain.nz127 := -12+b;
frmMain.nz128 := -16+b;
frmMain.nz129 := -16+b;
frmMain.nz130 := -16+b;
frmMain.nz131 := -16+b;
frmMain.nz132 := -16+b;
frmMain.nz133 := -16+b;
frmMain.nz134 := -16+b;
frmMain.nz135 := -16+b;
frmMain.nz136 := -14+b;
frmMain.nz137 := -14+b;
frmMain.nz138 := -14+b;
frmMain.nz139 := -14+b;
frmMain.nz140 := -14+b;
frmMain.nz141 := -15+b;
frmMain.nz142 := -15+b;
frmMain.nz143 := -15+b;
frmMain.nz144 := -15+b;
frmMain.nz145 := -15+b;
frmMain.nz146 := -15+b;
frmMain.nz147 := -15+b;
frmMain.nz148 := -15+b;
frmMain.nz149 := -14+b;
frmMain.nz150 := -14+b;
frmMain.nz151 := -12+b;
frmMain.nz152 := -12+b;
frmMain.nz153 := -13+b;
frmMain.nz154 := -13+b;
frmMain.nz155 := -13+b;
frmMain.nz156 := -6+b;
frmMain.nz157 := -12+b;
frmMain.nz158 := -12+b;
frmMain.nz159 := -12+b;
frmMain.nz160 := -12+b;
frmMain.nz161 := -10+b;
frmMain.nz162 := -10+b;
frmMain.nz163 := -10+b;
frmMain.nz164 := -10+b;
frmMain.nz165 := -8+b;
frmMain.nz166 := -8+b;
frmMain.nz167 := -8+b;
frmMain.nz168 := -8+b;
frmMain.nz169 := -6+b;
frmMain.nz170 := -6+b;
frmMain.nz171 := -6+b;
frmMain.nz172 := -6+b;
frmMain.nz173 := -4+b;
frmMain.nz174 := -4+b;
frmMain.nz175 := -4+b;
frmMain.nz176 := -4+b;
frmMain.nz177 := -2+b;
frmMain.nz178 := -2+b;
frmMain.nz179 := -2+b;
frmMain.nz180 := -2+b;
 frmMain.nz181 := -3+b;
 frmMain.nz182 := -3+b;
 frmMain.nz183 := -3+b;
 frmMain.nz184 := -3+b;
 frmMain.nz185 := - 5+b;
 frmMain.nz186 := -5+b;
 frmMain.nz187 := -5+b;
 frmMain.nz188 := -5+b;
 frmMain.nz189 := -7+b;
 frmMain.nz190 := -7+b;
 frmMain.nz191 := -7+b;
 frmMain.nz192 := -7+b;
 frmMain.nz193 := -9+b;
 frmMain.nz194 := -9+b;
 frmMain.nz195 := -9+b;
 frmMain.nz196 := -9+b;
 frmMain.nz197 := -11+b;
 frmMain.nz198 := -11+b;
 frmMain.nz199 := -11+b;
 frmMain.nz200 := -11+b;
 frmMain.nz201 := -13+b;
 frmMain.nz202 := -13+b;
 frmMain.nz203 := -13+b;
 frmMain.nz204 := -13+b;
 frmMain.nz205 := -4+b;  //корабль
 frmMain.nz206 := -8+b;  //Подлодка
 frmMain.nz215 := -12+b;
 frmMain.frmGL.Width:=800;
 b:=0;

 end;






 if (c=7) and (d=3) then
begin
StringGrid1.Cells[c,d]:='1';
a:=a-3;
b:=b+15;
frmMain.nx := 0+a;
  frmMain.nx1 := 0+a;
  frmMain.nx2 := 0+a;
 frmMain.nx3 := 0+a;
 frmMain.nx7 := -1+a;
 frmMain.nx8 := 1+a;
 frmMain.nx9 := -1+a;
  frmMain.nx10 := -2+a;
 frmMain.nx11 := -1+a;
 frmMain.nx12 := 1+a;
 frmMain.nx14 := 1+a;
 frmMain.nx15 := -1+a;
 frmMain.nx16 := -1+a;
 frmMain.nx17 := 1+a;
  frmMain.nx18 := -1+a;
 frmMain.nx19 := 1+a;
 frmMain.nx20 := -1+a;
 frmMain.nx21 := -1+a;
 frmMain.nx22 := 1+a;
  frmMain.nx23 := -1+a;
 frmMain.nx24 := 1+a;
  frmMain.nx25 := 1+a;
 frmMain.nx26 := -1+a;
 frmMain.nx27 := 1+a;
  frmMain.nx28 := -1+a;
  frmMain.nx29 := 1+a;
 frmMain.nx30 := -1+a;

// 1

 frmMain.nx31 := -2+a;
 frmMain.nx32 := 2+a;
 frmMain.nx33 := -2+a;
 frmMain.nx34 :=  2+a;
 frmMain.nx35 := -2+a;
 frmMain.nx36 := 2+a;
  frmMain.nx37 := -2+a;
 frmMain.nx38 := 2+a;
 frmMain.nx39 := -2+a;
 frmMain.nx40 := 2+a;
 frmMain.nx41 := -2+a;
 frmMain.nx42 := 2+a;
 frmMain.nx43 := -2+a;
 frmMain.nx44 := 2+a;
 frmMain.nx45 := -2+a;  //////////////


 //////////////////////

 frmMain.nx46 := -2+a;
 frmMain.nx47 := -2+a;
 frmMain.nx48 := 2+a;
 frmMain.nx49 := -2+a;
 frmMain.nx50 := 2+a;
 frmMain.nx51 := -3+a;
 frmMain.nx52 :=3+a;
 frmMain.nx53 := -3+a;
 frmMain.nx54 :=  3+a;
 frmMain.nx55 := -3+a;
 frmMain.nx56 := 3+a;
 frmMain.nx57 := -3+a;
 frmMain.nx58 := 3+a;
 frmMain.nx59 := -3+a;
 frmMain.nx60 := 3+a;
 frmMain.nx61 := -3+a;
 frmMain.nx62 := 3+a;
 frmMain.nx63 := -3+a;
 frmMain.nx64 := 3+a;
 frmMain.nx65 := -3+a;
 frmMain.nx66 := 3+a;
 frmMain.nx67 := -3+a;
 frmMain.nx68 := 3+a;
 frmMain.nx69 := -3+a;
 frmMain.nx70 := 3+a;


  ///3
 ///
 ///
 frmMain.nx71 := -4+a;
 frmMain.nx72 :=4+a;
 frmMain.nx73 := -4+a;
 frmMain.nx74 :=  4+a;
 frmMain.nx75 := -4+a;
 frmMain.nx76 := 4+a;
 frmMain.nx77 := -4+a;
 frmMain.nx78 := 4+a;
 frmMain.nx79 := -4+a;
 frmMain.nx80 := 4+a;
 frmMain.nx81 := -4+a;
 frmMain.nx82 := 4+a;
 frmMain.nx83 := -4+a;
 frmMain.nx84 := 4+a;
 frmMain.nx85 := -4+a;
 frmMain.nx86 := 4+a;
 frmMain.nx87 := -4+a;
 frmMain.nx88 := 4+a;
 frmMain.nx89 := -4+a;
 frmMain.nx90 := -2+a;

frmMain.nx94 :=0+a;
frmMain.nx95 :=-2+a;  //цифры
frmMain.nx96 :=-4+a;  //цифры
frmMain.nx97 :=-6+a;  //цифры
frmMain.nx98 := 2+a;  //цифры
frmMain.nx99 := 4+a;  //цифры
frmMain.nx100 := 6+a;  //цифры
frmMain.nx101 := 8+a;  //цифры
frmMain.nx102 := 10+a;  //цифры
frmMain.nx103 := 12+a;  //цифры

frmMain.nx104 := -8+a;  //буквы
frmMain.nx105 := -8+a;  //буквы
frmMain.nx106 := -8+a;  //буквы
frmMain.nx107 := -8+a;  //буквы
frmMain.nx108 := -8+a;  //буквы
frmMain.nx109 := -8+a;  //буквы
frmMain.nx110 := -8+a;  //буквы
frmMain.nx111 := -8+a;  //буквы
frmMain.nx112 := -8+a;  //буквы
frmMain.nx113 := -8+a;  //буквы

frmMain.nx114 := -6+a;  //корабль
frmMain.nx115 := 0+a;  //цифры
frmMain.nx116 :=-2+a;  //цифры
frmMain.nx117 :=-4+a;  //цифры
frmMain.nx118 :=-6+a;  //цифры
frmMain.nx119 := 2+a;  //цифры
frmMain.nx120 := 4+a;  //цифры
frmMain.nx121 := 6+a;  //цифры
frmMain.nx122 := 8+a;  //цифры
frmMain.nx123 := 10+a;  //цифры
frmMain.nx124 := 12+a;  //цифры
frmMain.nx125 := 0+a;
frmMain.nx126 := 0+a;
frmMain.nx127 := 0+a;
frmMain.nx128 := 2+a;
frmMain.nx129 := -2+a;
frmMain.nx130 := -4+a;
frmMain.nx131 := 4+a;
frmMain.nx132 := -6+a;
frmMain.nx133 := 6+a;
frmMain.nx134 := 8+a;
frmMain.nx135 := -8+a;
frmMain.nx136 := -2+a;
frmMain.nx137 := 2+a;
frmMain.nx138 := -4+a;
frmMain.nx139 := 4+a;
frmMain.nx140 := -2+a;
frmMain.nx141 := 2+a;
frmMain.nx142 := 0+a;
frmMain.nx143 := 2+a;
frmMain.nx144 := -2+a;
frmMain.nx145 := -4+a;
frmMain.nx146 := 4+a;
frmMain.nx147 := 6+a;
frmMain.nx148 := -6+a;
frmMain.nx149 := -6+a;
frmMain.nx150 := 6+a;
frmMain.nx151 := 2+a;
frmMain.nx152 := -2+a;
frmMain.nx153 := 2+a;
frmMain.nx154 := -2+a;
frmMain.nx155 := 0+a;
frmMain.nx156 := 0+a;
frmMain.nx157 := 4+a;
frmMain.nx158 := -4+a;
frmMain.nx159 := -6+a;
frmMain.nx160 := 6+a;
frmMain.nx161 := 4+a;
frmMain.nx162 := -4+a;
frmMain.nx163 := -6+a;
frmMain.nx164 := 6+a;
frmMain.nx165 := 4+a;
frmMain.nx166 := -4+a;
frmMain.nx167 := -6+a;
frmMain.nx168 := 6+a;
frmMain.nx169 := 4+a;
frmMain.nx170 := -4+a;
frmMain.nx171 := -6+a;
frmMain.nx172 := 6+a;
frmMain.nx173 := 4+a;
frmMain.nx174 := -4+a;
frmMain.nx175 := -6+a;
frmMain.nx176 := 6+a;
frmMain.nx177 := 4+a;
frmMain.nx178 := -4+a;
frmMain.nx179 := -6+a;
frmMain.nx180 := 6+a;
 frmMain.nx181 := 4+a;
 frmMain.nx182 := -4+a;
 frmMain.nx183 := -6+a;
 frmMain.nx184 := 6+a;
 frmMain.nx185 := 4+a;
 frmMain.nx186 := -4+a;
 frmMain.nx187 := -6+a;
 frmMain.nx188 := 6+a;
 frmMain.nx189 := -4+a;
 frmMain.nx190 := 4+a;
 frmMain.nx191 := -6+a;
 frmMain.nx192 := 6+a;
 frmMain.nx193 := -4+a;
 frmMain.nx194 := 4+a;
 frmMain.nx195 := -6+a;
 frmMain.nx196 := 6+a;
 frmMain.nx197 := -4+a;
 frmMain.nx198 := 4+a;
 frmMain.nx199 := -6+a;
 frmMain.nx200 := 6+a;
 frmMain.nx201 := -4+a;
 frmMain.nx202 := 4+a;
 frmMain.nx203 := -6+a;
 frmMain.nx204 := 6+a;
 frmMain.nx205 := 6+a;  //корабль
 frmMain.nx206 := 6+a;  //Подлодка
 frmMain.nx215 := -6+a;
 frmMain.frmGL.Width:=800;
 a:=0;
 frmMain.nz := 0+b;
  frmMain.nz1 := 0+b;
  frmMain.nz2 := 0+b;
 frmMain.nz3 := 1+b;
 frmMain.nz7 := 0+b;
 frmMain.nz8 := 2+b;
 frmMain.nz9 := 2+b;
  frmMain.nz10 := -2+b;
 frmMain.nz11 := -2+b;
 frmMain.nz12 := -2+b;
 frmMain.nz14 := -3+b;
 frmMain.nz15 := -3+b;
 frmMain.nz16 := -4+b;
 frmMain.nz17 := -4+b;
  frmMain.nz18 := -5+b;
 frmMain.nz19 := -5+b;
 frmMain.nz20 := -6+b;
 frmMain.nz21 := -7+b;
 frmMain.nz22 := -7+b;
  frmMain.nz23 := -8+b;
 frmMain.nz24 := -8+b;
  frmMain.nz25 := -9+b;
 frmMain.nz26 := -9+b;
 frmMain.nz27 := -10+b;
  frmMain.nz28 := -10+b;
  frmMain.nz29 := -11+b;
 frmMain.nz30 := -11+b;

// 1

 frmMain.nz31 := -2+b;
 frmMain.nz32 := -2+b;
 frmMain.nz33 := -3+b;
 frmMain.nz34 := -3+b;
 frmMain.nz35 := -4+b;
 frmMain.nz36 := -4+b;
  frmMain.nz37 := -5+b;
 frmMain.nz38 := -5+b;
 frmMain.nz39 := -6+b;
 frmMain.nz40 := -6+b;
 frmMain.nz41 := -7+b;
 frmMain.nz42 := -7+b;
 frmMain.nz43 := -8+b;
 frmMain.nz44 := -8+b;
 frmMain.nz45 := -9+b;  //////////////


 //////////////////////

 frmMain.nz46 := -9+b;
 frmMain.nz47 := -9+b;
 frmMain.nz48 := -10+b;
 frmMain.nz49 := -11+b;
 frmMain.nz50 := -11+b;
 frmMain.nz51 := -2+b;
 frmMain.nz52 :=-2+b;
 frmMain.nz53 := -3+b;
 frmMain.nz54 :=  3+b;
 frmMain.nz55 := -3+b;
 frmMain.nz56 := -4+b;
 frmMain.nz57 := -5+b;
 frmMain.nz58 := -5+b;
 frmMain.nz59 := -6+b;
 frmMain.nz60 := -6+b;
 frmMain.nz61 := -7+b;
 frmMain.nz62 := -7+b;
 frmMain.nz63 := -8+b;
 frmMain.nz64 := -8+b;
 frmMain.nz65 := -9+b;
 frmMain.nz66 := -9+b;
 frmMain.nz67 := -10+b;
 frmMain.nz68 := -10+b;
 frmMain.nz69 := -11+b;
 frmMain.nz70 := -11+b;


  ///3
 ///
 ///
 frmMain.nz71 := -2+b;
 frmMain.nz72 :=-2+b;
 frmMain.nz73 := -3+b;
 frmMain.nz74 :=  -3+b;
 frmMain.nz75 := -4+b;
 frmMain.nz76 := -4+b;
 frmMain.nz77 := -5+b;
 frmMain.nz78 := -5+b;
 frmMain.nz79 := -6+b;
 frmMain.nz80 := -6+b;
 frmMain.nz81 := -7+b;
 frmMain.nz82 := -7+b;
 frmMain.nz83 := -8+b;
 frmMain.nz84 := -8+b;
 frmMain.nz85 := -9+b;
 frmMain.nz86 := -9+b;
 frmMain.nz87 := -10+b;
 frmMain.nz88 := -10+b;
 frmMain.nz89 := -11+b;
 frmMain.nz90 := -2+b;

frmMain.nz94 :=1+b;
frmMain.nz95 :=1+b;  //цифры
frmMain.nz96 :=1+b;  //цифры
frmMain.nz97 :=1+b;  //цифры
frmMain.nz98 := 1+b;  //цифры
frmMain.nz99 := 1+b;  //цифры
frmMain.nz100 := 1+b;  //цифры
frmMain.nz101 := 1+b;  //цифры
frmMain.nz102 := 1+b;  //цифры
frmMain.nz103 := 1+b;  //цифры

frmMain.nz104 := -0+b;  //буквы
frmMain.nz105 := -2+b;  //буквы
frmMain.nz106 := -4+b;  //буквы
frmMain.nz107 := -6+b;  //буквы
frmMain.nz108 := -8+b;  //буквы
frmMain.nz109 := -10+b;  //буквы
frmMain.nz110 := -12+b;  //буквы
frmMain.nz111 := -14+b;  //буквы
frmMain.nz112 := -16+b;  //буквы
frmMain.nz113 := -18+b;  //буквы

frmMain.nz114 := -4+b;  //корабль
frmMain.nz115 := -18+b;  //цифры
frmMain.nz116 :=-18+b;  //цифры
frmMain.nz117 :=-18+b;  //цифры
frmMain.nz118 :=-18+b;  //цифры
frmMain.nz119 := -18+b;  //цифры
frmMain.nz120 := -18+b;  //цифры
frmMain.nz121 := -18+b;  //цифры
frmMain.nz122 := -18+b;  //цифры
frmMain.nz123 := -18+b;  //цифры
frmMain.nz124 := -18+b;  //цифры
frmMain.nz125 := -16+b;
frmMain.nz126 := -14+b;
frmMain.nz127 := -12+b;
frmMain.nz128 := -16+b;
frmMain.nz129 := -16+b;
frmMain.nz130 := -16+b;
frmMain.nz131 := -16+b;
frmMain.nz132 := -16+b;
frmMain.nz133 := -16+b;
frmMain.nz134 := -16+b;
frmMain.nz135 := -16+b;
frmMain.nz136 := -14+b;
frmMain.nz137 := -14+b;
frmMain.nz138 := -14+b;
frmMain.nz139 := -14+b;
frmMain.nz140 := -14+b;
frmMain.nz141 := -15+b;
frmMain.nz142 := -15+b;
frmMain.nz143 := -15+b;
frmMain.nz144 := -15+b;
frmMain.nz145 := -15+b;
frmMain.nz146 := -15+b;
frmMain.nz147 := -15+b;
frmMain.nz148 := -15+b;
frmMain.nz149 := -14+b;
frmMain.nz150 := -14+b;
frmMain.nz151 := -12+b;
frmMain.nz152 := -12+b;
frmMain.nz153 := -13+b;
frmMain.nz154 := -13+b;
frmMain.nz155 := -13+b;
frmMain.nz156 := -6+b;
frmMain.nz157 := -12+b;
frmMain.nz158 := -12+b;
frmMain.nz159 := -12+b;
frmMain.nz160 := -12+b;
frmMain.nz161 := -10+b;
frmMain.nz162 := -10+b;
frmMain.nz163 := -10+b;
frmMain.nz164 := -10+b;
frmMain.nz165 := -8+b;
frmMain.nz166 := -8+b;
frmMain.nz167 := -8+b;
frmMain.nz168 := -8+b;
frmMain.nz169 := -6+b;
frmMain.nz170 := -6+b;
frmMain.nz171 := -6+b;
frmMain.nz172 := -6+b;
frmMain.nz173 := -4+b;
frmMain.nz174 := -4+b;
frmMain.nz175 := -4+b;
frmMain.nz176 := -4+b;
frmMain.nz177 := -2+b;
frmMain.nz178 := -2+b;
frmMain.nz179 := -2+b;
frmMain.nz180 := -2+b;
 frmMain.nz181 := -3+b;
 frmMain.nz182 := -3+b;
 frmMain.nz183 := -3+b;
 frmMain.nz184 := -3+b;
 frmMain.nz185 := - 5+b;
 frmMain.nz186 := -5+b;
 frmMain.nz187 := -5+b;
 frmMain.nz188 := -5+b;
 frmMain.nz189 := -7+b;
 frmMain.nz190 := -7+b;
 frmMain.nz191 := -7+b;
 frmMain.nz192 := -7+b;
 frmMain.nz193 := -9+b;
 frmMain.nz194 := -9+b;
 frmMain.nz195 := -9+b;
 frmMain.nz196 := -9+b;
 frmMain.nz197 := -11+b;
 frmMain.nz198 := -11+b;
 frmMain.nz199 := -11+b;
 frmMain.nz200 := -11+b;
 frmMain.nz201 := -13+b;
 frmMain.nz202 := -13+b;
 frmMain.nz203 := -13+b;
 frmMain.nz204 := -13+b;
 frmMain.nz205 := -4+b;  //корабль
 frmMain.nz206 := -8+b;  //Подлодка
 frmMain.nz215 := -12+b;
 frmMain.frmGL.Width:=800;
 b:=0;

 end;






 if (c=7) and (d=4) then
begin
StringGrid1.Cells[c,d]:='1';
a:=a-3;
b:=b+13;
frmMain.nx := 0+a;
  frmMain.nx1 := 0+a;
  frmMain.nx2 := 0+a;
 frmMain.nx3 := 0+a;
 frmMain.nx7 := -1+a;
 frmMain.nx8 := 1+a;
 frmMain.nx9 := -1+a;
  frmMain.nx10 := -2+a;
 frmMain.nx11 := -1+a;
 frmMain.nx12 := 1+a;
 frmMain.nx14 := 1+a;
 frmMain.nx15 := -1+a;
 frmMain.nx16 := -1+a;
 frmMain.nx17 := 1+a;
  frmMain.nx18 := -1+a;
 frmMain.nx19 := 1+a;
 frmMain.nx20 := -1+a;
 frmMain.nx21 := -1+a;
 frmMain.nx22 := 1+a;
  frmMain.nx23 := -1+a;
 frmMain.nx24 := 1+a;
  frmMain.nx25 := 1+a;
 frmMain.nx26 := -1+a;
 frmMain.nx27 := 1+a;
  frmMain.nx28 := -1+a;
  frmMain.nx29 := 1+a;
 frmMain.nx30 := -1+a;

// 1

 frmMain.nx31 := -2+a;
 frmMain.nx32 := 2+a;
 frmMain.nx33 := -2+a;
 frmMain.nx34 :=  2+a;
 frmMain.nx35 := -2+a;
 frmMain.nx36 := 2+a;
  frmMain.nx37 := -2+a;
 frmMain.nx38 := 2+a;
 frmMain.nx39 := -2+a;
 frmMain.nx40 := 2+a;
 frmMain.nx41 := -2+a;
 frmMain.nx42 := 2+a;
 frmMain.nx43 := -2+a;
 frmMain.nx44 := 2+a;
 frmMain.nx45 := -2+a;  //////////////


 //////////////////////

 frmMain.nx46 := -2+a;
 frmMain.nx47 := -2+a;
 frmMain.nx48 := 2+a;
 frmMain.nx49 := -2+a;
 frmMain.nx50 := 2+a;
 frmMain.nx51 := -3+a;
 frmMain.nx52 :=3+a;
 frmMain.nx53 := -3+a;
 frmMain.nx54 :=  3+a;
 frmMain.nx55 := -3+a;
 frmMain.nx56 := 3+a;
 frmMain.nx57 := -3+a;
 frmMain.nx58 := 3+a;
 frmMain.nx59 := -3+a;
 frmMain.nx60 := 3+a;
 frmMain.nx61 := -3+a;
 frmMain.nx62 := 3+a;
 frmMain.nx63 := -3+a;
 frmMain.nx64 := 3+a;
 frmMain.nx65 := -3+a;
 frmMain.nx66 := 3+a;
 frmMain.nx67 := -3+a;
 frmMain.nx68 := 3+a;
 frmMain.nx69 := -3+a;
 frmMain.nx70 := 3+a;


  ///3
 ///
 ///
 frmMain.nx71 := -4+a;
 frmMain.nx72 :=4+a;
 frmMain.nx73 := -4+a;
 frmMain.nx74 :=  4+a;
 frmMain.nx75 := -4+a;
 frmMain.nx76 := 4+a;
 frmMain.nx77 := -4+a;
 frmMain.nx78 := 4+a;
 frmMain.nx79 := -4+a;
 frmMain.nx80 := 4+a;
 frmMain.nx81 := -4+a;
 frmMain.nx82 := 4+a;
 frmMain.nx83 := -4+a;
 frmMain.nx84 := 4+a;
 frmMain.nx85 := -4+a;
 frmMain.nx86 := 4+a;
 frmMain.nx87 := -4+a;
 frmMain.nx88 := 4+a;
 frmMain.nx89 := -4+a;
 frmMain.nx90 := -2+a;

frmMain.nx94 :=0+a;
frmMain.nx95 :=-2+a;  //цифры
frmMain.nx96 :=-4+a;  //цифры
frmMain.nx97 :=-6+a;  //цифры
frmMain.nx98 := 2+a;  //цифры
frmMain.nx99 := 4+a;  //цифры
frmMain.nx100 := 6+a;  //цифры
frmMain.nx101 := 8+a;  //цифры
frmMain.nx102 := 10+a;  //цифры
frmMain.nx103 := 12+a;  //цифры

frmMain.nx104 := -8+a;  //буквы
frmMain.nx105 := -8+a;  //буквы
frmMain.nx106 := -8+a;  //буквы
frmMain.nx107 := -8+a;  //буквы
frmMain.nx108 := -8+a;  //буквы
frmMain.nx109 := -8+a;  //буквы
frmMain.nx110 := -8+a;  //буквы
frmMain.nx111 := -8+a;  //буквы
frmMain.nx112 := -8+a;  //буквы
frmMain.nx113 := -8+a;  //буквы

frmMain.nx114 := -6+a;  //корабль
frmMain.nx115 := 0+a;  //цифры
frmMain.nx116 :=-2+a;  //цифры
frmMain.nx117 :=-4+a;  //цифры
frmMain.nx118 :=-6+a;  //цифры
frmMain.nx119 := 2+a;  //цифры
frmMain.nx120 := 4+a;  //цифры
frmMain.nx121 := 6+a;  //цифры
frmMain.nx122 := 8+a;  //цифры
frmMain.nx123 := 10+a;  //цифры
frmMain.nx124 := 12+a;  //цифры
frmMain.nx125 := 0+a;
frmMain.nx126 := 0+a;
frmMain.nx127 := 0+a;
frmMain.nx128 := 2+a;
frmMain.nx129 := -2+a;
frmMain.nx130 := -4+a;
frmMain.nx131 := 4+a;
frmMain.nx132 := -6+a;
frmMain.nx133 := 6+a;
frmMain.nx134 := 8+a;
frmMain.nx135 := -8+a;
frmMain.nx136 := -2+a;
frmMain.nx137 := 2+a;
frmMain.nx138 := -4+a;
frmMain.nx139 := 4+a;
frmMain.nx140 := -2+a;
frmMain.nx141 := 2+a;
frmMain.nx142 := 0+a;
frmMain.nx143 := 2+a;
frmMain.nx144 := -2+a;
frmMain.nx145 := -4+a;
frmMain.nx146 := 4+a;
frmMain.nx147 := 6+a;
frmMain.nx148 := -6+a;
frmMain.nx149 := -6+a;
frmMain.nx150 := 6+a;
frmMain.nx151 := 2+a;
frmMain.nx152 := -2+a;
frmMain.nx153 := 2+a;
frmMain.nx154 := -2+a;
frmMain.nx155 := 0+a;
frmMain.nx156 := 0+a;
frmMain.nx157 := 4+a;
frmMain.nx158 := -4+a;
frmMain.nx159 := -6+a;
frmMain.nx160 := 6+a;
frmMain.nx161 := 4+a;
frmMain.nx162 := -4+a;
frmMain.nx163 := -6+a;
frmMain.nx164 := 6+a;
frmMain.nx165 := 4+a;
frmMain.nx166 := -4+a;
frmMain.nx167 := -6+a;
frmMain.nx168 := 6+a;
frmMain.nx169 := 4+a;
frmMain.nx170 := -4+a;
frmMain.nx171 := -6+a;
frmMain.nx172 := 6+a;
frmMain.nx173 := 4+a;
frmMain.nx174 := -4+a;
frmMain.nx175 := -6+a;
frmMain.nx176 := 6+a;
frmMain.nx177 := 4+a;
frmMain.nx178 := -4+a;
frmMain.nx179 := -6+a;
frmMain.nx180 := 6+a;
 frmMain.nx181 := 4+a;
 frmMain.nx182 := -4+a;
 frmMain.nx183 := -6+a;
 frmMain.nx184 := 6+a;
 frmMain.nx185 := 4+a;
 frmMain.nx186 := -4+a;
 frmMain.nx187 := -6+a;
 frmMain.nx188 := 6+a;
 frmMain.nx189 := -4+a;
 frmMain.nx190 := 4+a;
 frmMain.nx191 := -6+a;
 frmMain.nx192 := 6+a;
 frmMain.nx193 := -4+a;
 frmMain.nx194 := 4+a;
 frmMain.nx195 := -6+a;
 frmMain.nx196 := 6+a;
 frmMain.nx197 := -4+a;
 frmMain.nx198 := 4+a;
 frmMain.nx199 := -6+a;
 frmMain.nx200 := 6+a;
 frmMain.nx201 := -4+a;
 frmMain.nx202 := 4+a;
 frmMain.nx203 := -6+a;
 frmMain.nx204 := 6+a;
 frmMain.nx205 := 6+a;  //корабль
 frmMain.nx206 := 6+a;  //Подлодка
 frmMain.nx215 := -6+a;

 frmMain.frmGL.Width:=800;
 a:=0;
 frmMain.nz := 0+b;
  frmMain.nz1 := 0+b;
  frmMain.nz2 := 0+b;
 frmMain.nz3 := 1+b;
 frmMain.nz7 := 0+b;
 frmMain.nz8 := 2+b;
 frmMain.nz9 := 2+b;
  frmMain.nz10 := -2+b;
 frmMain.nz11 := -2+b;
 frmMain.nz12 := -2+b;
 frmMain.nz14 := -3+b;
 frmMain.nz15 := -3+b;
 frmMain.nz16 := -4+b;
 frmMain.nz17 := -4+b;
  frmMain.nz18 := -5+b;
 frmMain.nz19 := -5+b;
 frmMain.nz20 := -6+b;
 frmMain.nz21 := -7+b;
 frmMain.nz22 := -7+b;
  frmMain.nz23 := -8+b;
 frmMain.nz24 := -8+b;
  frmMain.nz25 := -9+b;
 frmMain.nz26 := -9+b;
 frmMain.nz27 := -10+b;
  frmMain.nz28 := -10+b;
  frmMain.nz29 := -11+b;
 frmMain.nz30 := -11+b;

// 1

 frmMain.nz31 := -2+b;
 frmMain.nz32 := -2+b;
 frmMain.nz33 := -3+b;
 frmMain.nz34 := -3+b;
 frmMain.nz35 := -4+b;
 frmMain.nz36 := -4+b;
  frmMain.nz37 := -5+b;
 frmMain.nz38 := -5+b;
 frmMain.nz39 := -6+b;
 frmMain.nz40 := -6+b;
 frmMain.nz41 := -7+b;
 frmMain.nz42 := -7+b;
 frmMain.nz43 := -8+b;
 frmMain.nz44 := -8+b;
 frmMain.nz45 := -9+b;  //////////////


 //////////////////////

 frmMain.nz46 := -9+b;
 frmMain.nz47 := -9+b;
 frmMain.nz48 := -10+b;
 frmMain.nz49 := -11+b;
 frmMain.nz50 := -11+b;
 frmMain.nz51 := -2+b;
 frmMain.nz52 :=-2+b;
 frmMain.nz53 := -3+b;
 frmMain.nz54 :=  3+b;
 frmMain.nz55 := -3+b;
 frmMain.nz56 := -4+b;
 frmMain.nz57 := -5+b;
 frmMain.nz58 := -5+b;
 frmMain.nz59 := -6+b;
 frmMain.nz60 := -6+b;
 frmMain.nz61 := -7+b;
 frmMain.nz62 := -7+b;
 frmMain.nz63 := -8+b;
 frmMain.nz64 := -8+b;
 frmMain.nz65 := -9+b;
 frmMain.nz66 := -9+b;
 frmMain.nz67 := -10+b;
 frmMain.nz68 := -10+b;
 frmMain.nz69 := -11+b;
 frmMain.nz70 := -11+b;


  ///3
 ///
 ///
 frmMain.nz71 := -2+b;
 frmMain.nz72 :=-2+b;
 frmMain.nz73 := -3+b;
 frmMain.nz74 :=  -3+b;
 frmMain.nz75 := -4+b;
 frmMain.nz76 := -4+b;
 frmMain.nz77 := -5+b;
 frmMain.nz78 := -5+b;
 frmMain.nz79 := -6+b;
 frmMain.nz80 := -6+b;
 frmMain.nz81 := -7+b;
 frmMain.nz82 := -7+b;
 frmMain.nz83 := -8+b;
 frmMain.nz84 := -8+b;
 frmMain.nz85 := -9+b;
 frmMain.nz86 := -9+b;
 frmMain.nz87 := -10+b;
 frmMain.nz88 := -10+b;
 frmMain.nz89 := -11+b;
 frmMain.nz90 := -2+b;

frmMain.nz94 :=1+b;
frmMain.nz95 :=1+b;  //цифры
frmMain.nz96 :=1+b;  //цифры
frmMain.nz97 :=1+b;  //цифры
frmMain.nz98 := 1+b;  //цифры
frmMain.nz99 := 1+b;  //цифры
frmMain.nz100 := 1+b;  //цифры
frmMain.nz101 := 1+b;  //цифры
frmMain.nz102 := 1+b;  //цифры
frmMain.nz103 := 1+b;  //цифры

frmMain.nz104 := -0+b;  //буквы
frmMain.nz105 := -2+b;  //буквы
frmMain.nz106 := -4+b;  //буквы
frmMain.nz107 := -6+b;  //буквы
frmMain.nz108 := -8+b;  //буквы
frmMain.nz109 := -10+b;  //буквы
frmMain.nz110 := -12+b;  //буквы
frmMain.nz111 := -14+b;  //буквы
frmMain.nz112 := -16+b;  //буквы
frmMain.nz113 := -18+b;  //буквы

frmMain.nz114 := -4+b;  //корабль
frmMain.nz115 := -18+b;  //цифры
frmMain.nz116 :=-18+b;  //цифры
frmMain.nz117 :=-18+b;  //цифры
frmMain.nz118 :=-18+b;  //цифры
frmMain.nz119 := -18+b;  //цифры
frmMain.nz120 := -18+b;  //цифры
frmMain.nz121 := -18+b;  //цифры
frmMain.nz122 := -18+b;  //цифры
frmMain.nz123 := -18+b;  //цифры
frmMain.nz124 := -18+b;  //цифры
frmMain.nz125 := -16+b;
frmMain.nz126 := -14+b;
frmMain.nz127 := -12+b;
frmMain.nz128 := -16+b;
frmMain.nz129 := -16+b;
frmMain.nz130 := -16+b;
frmMain.nz131 := -16+b;
frmMain.nz132 := -16+b;
frmMain.nz133 := -16+b;
frmMain.nz134 := -16+b;
frmMain.nz135 := -16+b;
frmMain.nz136 := -14+b;
frmMain.nz137 := -14+b;
frmMain.nz138 := -14+b;
frmMain.nz139 := -14+b;
frmMain.nz140 := -14+b;
frmMain.nz141 := -15+b;
frmMain.nz142 := -15+b;
frmMain.nz143 := -15+b;
frmMain.nz144 := -15+b;
frmMain.nz145 := -15+b;
frmMain.nz146 := -15+b;
frmMain.nz147 := -15+b;
frmMain.nz148 := -15+b;
frmMain.nz149 := -14+b;
frmMain.nz150 := -14+b;
frmMain.nz151 := -12+b;
frmMain.nz152 := -12+b;
frmMain.nz153 := -13+b;
frmMain.nz154 := -13+b;
frmMain.nz155 := -13+b;
frmMain.nz156 := -6+b;
frmMain.nz157 := -12+b;
frmMain.nz158 := -12+b;
frmMain.nz159 := -12+b;
frmMain.nz160 := -12+b;
frmMain.nz161 := -10+b;
frmMain.nz162 := -10+b;
frmMain.nz163 := -10+b;
frmMain.nz164 := -10+b;
frmMain.nz165 := -8+b;
frmMain.nz166 := -8+b;
frmMain.nz167 := -8+b;
frmMain.nz168 := -8+b;
frmMain.nz169 := -6+b;
frmMain.nz170 := -6+b;
frmMain.nz171 := -6+b;
frmMain.nz172 := -6+b;
frmMain.nz173 := -4+b;
frmMain.nz174 := -4+b;
frmMain.nz175 := -4+b;
frmMain.nz176 := -4+b;
frmMain.nz177 := -2+b;
frmMain.nz178 := -2+b;
frmMain.nz179 := -2+b;
frmMain.nz180 := -2+b;
 frmMain.nz181 := -3+b;
 frmMain.nz182 := -3+b;
 frmMain.nz183 := -3+b;
 frmMain.nz184 := -3+b;
 frmMain.nz185 := - 5+b;
 frmMain.nz186 := -5+b;
 frmMain.nz187 := -5+b;
 frmMain.nz188 := -5+b;
 frmMain.nz189 := -7+b;
 frmMain.nz190 := -7+b;
 frmMain.nz191 := -7+b;
 frmMain.nz192 := -7+b;
 frmMain.nz193 := -9+b;
 frmMain.nz194 := -9+b;
 frmMain.nz195 := -9+b;
 frmMain.nz196 := -9+b;
 frmMain.nz197 := -11+b;
 frmMain.nz198 := -11+b;
 frmMain.nz199 := -11+b;
 frmMain.nz200 := -11+b;
 frmMain.nz201 := -13+b;
 frmMain.nz202 := -13+b;
 frmMain.nz203 := -13+b;
 frmMain.nz204 := -13+b;
 frmMain.nz205 := -4+b;  //корабль
 frmMain.nz206 := -8+b;  //Подлодка
 frmMain.nz215 := -12+b;
 frmMain.frmGL.Width:=800;
 b:=0;

 end;




 if (c=7) and (d=5) then
begin
StringGrid1.Cells[c,d]:='1';
a:=a-3;
b:=b+11;
frmMain.nx := 0+a;
  frmMain.nx1 := 0+a;
  frmMain.nx2 := 0+a;
 frmMain.nx3 := 0+a;
 frmMain.nx7 := -1+a;
 frmMain.nx8 := 1+a;
 frmMain.nx9 := -1+a;
  frmMain.nx10 := -2+a;
 frmMain.nx11 := -1+a;
 frmMain.nx12 := 1+a;
 frmMain.nx14 := 1+a;
 frmMain.nx15 := -1+a;
 frmMain.nx16 := -1+a;
 frmMain.nx17 := 1+a;
  frmMain.nx18 := -1+a;
 frmMain.nx19 := 1+a;
 frmMain.nx20 := -1+a;
 frmMain.nx21 := -1+a;
 frmMain.nx22 := 1+a;
  frmMain.nx23 := -1+a;
 frmMain.nx24 := 1+a;
  frmMain.nx25 := 1+a;
 frmMain.nx26 := -1+a;
 frmMain.nx27 := 1+a;
  frmMain.nx28 := -1+a;
  frmMain.nx29 := 1+a;
 frmMain.nx30 := -1+a;

// 1

 frmMain.nx31 := -2+a;
 frmMain.nx32 := 2+a;
 frmMain.nx33 := -2+a;
 frmMain.nx34 :=  2+a;
 frmMain.nx35 := -2+a;
 frmMain.nx36 := 2+a;
  frmMain.nx37 := -2+a;
 frmMain.nx38 := 2+a;
 frmMain.nx39 := -2+a;
 frmMain.nx40 := 2+a;
 frmMain.nx41 := -2+a;
 frmMain.nx42 := 2+a;
 frmMain.nx43 := -2+a;
 frmMain.nx44 := 2+a;
 frmMain.nx45 := -2+a;  //////////////


 //////////////////////

 frmMain.nx46 := -2+a;
 frmMain.nx47 := -2+a;
 frmMain.nx48 := 2+a;
 frmMain.nx49 := -2+a;
 frmMain.nx50 := 2+a;
 frmMain.nx51 := -3+a;
 frmMain.nx52 :=3+a;
 frmMain.nx53 := -3+a;
 frmMain.nx54 :=  3+a;
 frmMain.nx55 := -3+a;
 frmMain.nx56 := 3+a;
 frmMain.nx57 := -3+a;
 frmMain.nx58 := 3+a;
 frmMain.nx59 := -3+a;
 frmMain.nx60 := 3+a;
 frmMain.nx61 := -3+a;
 frmMain.nx62 := 3+a;
 frmMain.nx63 := -3+a;
 frmMain.nx64 := 3+a;
 frmMain.nx65 := -3+a;
 frmMain.nx66 := 3+a;
 frmMain.nx67 := -3+a;
 frmMain.nx68 := 3+a;
 frmMain.nx69 := -3+a;
 frmMain.nx70 := 3+a;


  ///3
 ///
 ///
 frmMain.nx71 := -4+a;
 frmMain.nx72 :=4+a;
 frmMain.nx73 := -4+a;
 frmMain.nx74 :=  4+a;
 frmMain.nx75 := -4+a;
 frmMain.nx76 := 4+a;
 frmMain.nx77 := -4+a;
 frmMain.nx78 := 4+a;
 frmMain.nx79 := -4+a;
 frmMain.nx80 := 4+a;
 frmMain.nx81 := -4+a;
 frmMain.nx82 := 4+a;
 frmMain.nx83 := -4+a;
 frmMain.nx84 := 4+a;
 frmMain.nx85 := -4+a;
 frmMain.nx86 := 4+a;
 frmMain.nx87 := -4+a;
 frmMain.nx88 := 4+a;
 frmMain.nx89 := -4+a;
 frmMain.nx90 := -2+a;

frmMain.nx94 :=0+a;
frmMain.nx95 :=-2+a;  //цифры
frmMain.nx96 :=-4+a;  //цифры
frmMain.nx97 :=-6+a;  //цифры
frmMain.nx98 := 2+a;  //цифры
frmMain.nx99 := 4+a;  //цифры
frmMain.nx100 := 6+a;  //цифры
frmMain.nx101 := 8+a;  //цифры
frmMain.nx102 := 10+a;  //цифры
frmMain.nx103 := 12+a;  //цифры

frmMain.nx104 := -8+a;  //буквы
frmMain.nx105 := -8+a;  //буквы
frmMain.nx106 := -8+a;  //буквы
frmMain.nx107 := -8+a;  //буквы
frmMain.nx108 := -8+a;  //буквы
frmMain.nx109 := -8+a;  //буквы
frmMain.nx110 := -8+a;  //буквы
frmMain.nx111 := -8+a;  //буквы
frmMain.nx112 := -8+a;  //буквы
frmMain.nx113 := -8+a;  //буквы

frmMain.nx114 := -6+a;  //корабль
frmMain.nx115 := 0+a;  //цифры
frmMain.nx116 :=-2+a;  //цифры
frmMain.nx117 :=-4+a;  //цифры
frmMain.nx118 :=-6+a;  //цифры
frmMain.nx119 := 2+a;  //цифры
frmMain.nx120 := 4+a;  //цифры
frmMain.nx121 := 6+a;  //цифры
frmMain.nx122 := 8+a;  //цифры
frmMain.nx123 := 10+a;  //цифры
frmMain.nx124 := 12+a;  //цифры
frmMain.nx125 := 0+a;
frmMain.nx126 := 0+a;
frmMain.nx127 := 0+a;
frmMain.nx128 := 2+a;
frmMain.nx129 := -2+a;
frmMain.nx130 := -4+a;
frmMain.nx131 := 4+a;
frmMain.nx132 := -6+a;
frmMain.nx133 := 6+a;
frmMain.nx134 := 8+a;
frmMain.nx135 := -8+a;
frmMain.nx136 := -2+a;
frmMain.nx137 := 2+a;
frmMain.nx138 := -4+a;
frmMain.nx139 := 4+a;
frmMain.nx140 := -2+a;
frmMain.nx141 := 2+a;
frmMain.nx142 := 0+a;
frmMain.nx143 := 2+a;
frmMain.nx144 := -2+a;
frmMain.nx145 := -4+a;
frmMain.nx146 := 4+a;
frmMain.nx147 := 6+a;
frmMain.nx148 := -6+a;
frmMain.nx149 := -6+a;
frmMain.nx150 := 6+a;
frmMain.nx151 := 2+a;
frmMain.nx152 := -2+a;
frmMain.nx153 := 2+a;
frmMain.nx154 := -2+a;
frmMain.nx155 := 0+a;
frmMain.nx156 := 0+a;
frmMain.nx157 := 4+a;
frmMain.nx158 := -4+a;
frmMain.nx159 := -6+a;
frmMain.nx160 := 6+a;
frmMain.nx161 := 4+a;
frmMain.nx162 := -4+a;
frmMain.nx163 := -6+a;
frmMain.nx164 := 6+a;
frmMain.nx165 := 4+a;
frmMain.nx166 := -4+a;
frmMain.nx167 := -6+a;
frmMain.nx168 := 6+a;
frmMain.nx169 := 4+a;
frmMain.nx170 := -4+a;
frmMain.nx171 := -6+a;
frmMain.nx172 := 6+a;
frmMain.nx173 := 4+a;
frmMain.nx174 := -4+a;
frmMain.nx175 := -6+a;
frmMain.nx176 := 6+a;
frmMain.nx177 := 4+a;
frmMain.nx178 := -4+a;
frmMain.nx179 := -6+a;
frmMain.nx180 := 6+a;
 frmMain.nx181 := 4+a;
 frmMain.nx182 := -4+a;
 frmMain.nx183 := -6+a;
 frmMain.nx184 := 6+a;
 frmMain.nx185 := 4+a;
 frmMain.nx186 := -4+a;
 frmMain.nx187 := -6+a;
 frmMain.nx188 := 6+a;
 frmMain.nx189 := -4+a;
 frmMain.nx190 := 4+a;
 frmMain.nx191 := -6+a;
 frmMain.nx192 := 6+a;
 frmMain.nx193 := -4+a;
 frmMain.nx194 := 4+a;
 frmMain.nx195 := -6+a;
 frmMain.nx196 := 6+a;
 frmMain.nx197 := -4+a;
 frmMain.nx198 := 4+a;
 frmMain.nx199 := -6+a;
 frmMain.nx200 := 6+a;
 frmMain.nx201 := -4+a;
 frmMain.nx202 := 4+a;
 frmMain.nx203 := -6+a;
 frmMain.nx204 := 6+a;
 frmMain.nx205 := 6+a;  //корабль
 frmMain.nx206 := 6+a;  //Подлодка
 frmMain.nx215 := -6+a;
 frmMain.frmGL.Width:=800;
 a:=0;
 frmMain.nz := 0+b;
  frmMain.nz1 := 0+b;
  frmMain.nz2 := 0+b;
 frmMain.nz3 := 1+b;
 frmMain.nz7 := 0+b;
 frmMain.nz8 := 2+b;
 frmMain.nz9 := 2+b;
  frmMain.nz10 := -2+b;
 frmMain.nz11 := -2+b;
 frmMain.nz12 := -2+b;
 frmMain.nz14 := -3+b;
 frmMain.nz15 := -3+b;
 frmMain.nz16 := -4+b;
 frmMain.nz17 := -4+b;
  frmMain.nz18 := -5+b;
 frmMain.nz19 := -5+b;
 frmMain.nz20 := -6+b;
 frmMain.nz21 := -7+b;
 frmMain.nz22 := -7+b;
  frmMain.nz23 := -8+b;
 frmMain.nz24 := -8+b;
  frmMain.nz25 := -9+b;
 frmMain.nz26 := -9+b;
 frmMain.nz27 := -10+b;
  frmMain.nz28 := -10+b;
  frmMain.nz29 := -11+b;
 frmMain.nz30 := -11+b;

// 1

 frmMain.nz31 := -2+b;
 frmMain.nz32 := -2+b;
 frmMain.nz33 := -3+b;
 frmMain.nz34 := -3+b;
 frmMain.nz35 := -4+b;
 frmMain.nz36 := -4+b;
  frmMain.nz37 := -5+b;
 frmMain.nz38 := -5+b;
 frmMain.nz39 := -6+b;
 frmMain.nz40 := -6+b;
 frmMain.nz41 := -7+b;
 frmMain.nz42 := -7+b;
 frmMain.nz43 := -8+b;
 frmMain.nz44 := -8+b;
 frmMain.nz45 := -9+b;  //////////////


 //////////////////////

 frmMain.nz46 := -9+b;
 frmMain.nz47 := -9+b;
 frmMain.nz48 := -10+b;
 frmMain.nz49 := -11+b;
 frmMain.nz50 := -11+b;
 frmMain.nz51 := -2+b;
 frmMain.nz52 :=-2+b;
 frmMain.nz53 := -3+b;
 frmMain.nz54 :=  3+b;
 frmMain.nz55 := -3+b;
 frmMain.nz56 := -4+b;
 frmMain.nz57 := -5+b;
 frmMain.nz58 := -5+b;
 frmMain.nz59 := -6+b;
 frmMain.nz60 := -6+b;
 frmMain.nz61 := -7+b;
 frmMain.nz62 := -7+b;
 frmMain.nz63 := -8+b;
 frmMain.nz64 := -8+b;
 frmMain.nz65 := -9+b;
 frmMain.nz66 := -9+b;
 frmMain.nz67 := -10+b;
 frmMain.nz68 := -10+b;
 frmMain.nz69 := -11+b;
 frmMain.nz70 := -11+b;


  ///3
 ///
 ///
 frmMain.nz71 := -2+b;
 frmMain.nz72 :=-2+b;
 frmMain.nz73 := -3+b;
 frmMain.nz74 :=  -3+b;
 frmMain.nz75 := -4+b;
 frmMain.nz76 := -4+b;
 frmMain.nz77 := -5+b;
 frmMain.nz78 := -5+b;
 frmMain.nz79 := -6+b;
 frmMain.nz80 := -6+b;
 frmMain.nz81 := -7+b;
 frmMain.nz82 := -7+b;
 frmMain.nz83 := -8+b;
 frmMain.nz84 := -8+b;
 frmMain.nz85 := -9+b;
 frmMain.nz86 := -9+b;
 frmMain.nz87 := -10+b;
 frmMain.nz88 := -10+b;
 frmMain.nz89 := -11+b;
 frmMain.nz90 := -2+b;

frmMain.nz94 :=1+b;
frmMain.nz95 :=1+b;  //цифры
frmMain.nz96 :=1+b;  //цифры
frmMain.nz97 :=1+b;  //цифры
frmMain.nz98 := 1+b;  //цифры
frmMain.nz99 := 1+b;  //цифры
frmMain.nz100 := 1+b;  //цифры
frmMain.nz101 := 1+b;  //цифры
frmMain.nz102 := 1+b;  //цифры
frmMain.nz103 := 1+b;  //цифры

frmMain.nz104 := -0+b;  //буквы
frmMain.nz105 := -2+b;  //буквы
frmMain.nz106 := -4+b;  //буквы
frmMain.nz107 := -6+b;  //буквы
frmMain.nz108 := -8+b;  //буквы
frmMain.nz109 := -10+b;  //буквы
frmMain.nz110 := -12+b;  //буквы
frmMain.nz111 := -14+b;  //буквы
frmMain.nz112 := -16+b;  //буквы
frmMain.nz113 := -18+b;  //буквы

frmMain.nz114 := -4+b;  //корабль
frmMain.nz115 := -18+b;  //цифры
frmMain.nz116 :=-18+b;  //цифры
frmMain.nz117 :=-18+b;  //цифры
frmMain.nz118 :=-18+b;  //цифры
frmMain.nz119 := -18+b;  //цифры
frmMain.nz120 := -18+b;  //цифры
frmMain.nz121 := -18+b;  //цифры
frmMain.nz122 := -18+b;  //цифры
frmMain.nz123 := -18+b;  //цифры
frmMain.nz124 := -18+b;  //цифры
frmMain.nz125 := -16+b;
frmMain.nz126 := -14+b;
frmMain.nz127 := -12+b;
frmMain.nz128 := -16+b;
frmMain.nz129 := -16+b;
frmMain.nz130 := -16+b;
frmMain.nz131 := -16+b;
frmMain.nz132 := -16+b;
frmMain.nz133 := -16+b;
frmMain.nz134 := -16+b;
frmMain.nz135 := -16+b;
frmMain.nz136 := -14+b;
frmMain.nz137 := -14+b;
frmMain.nz138 := -14+b;
frmMain.nz139 := -14+b;
frmMain.nz140 := -14+b;
frmMain.nz141 := -15+b;
frmMain.nz142 := -15+b;
frmMain.nz143 := -15+b;
frmMain.nz144 := -15+b;
frmMain.nz145 := -15+b;
frmMain.nz146 := -15+b;
frmMain.nz147 := -15+b;
frmMain.nz148 := -15+b;
frmMain.nz149 := -14+b;
frmMain.nz150 := -14+b;
frmMain.nz151 := -12+b;
frmMain.nz152 := -12+b;
frmMain.nz153 := -13+b;
frmMain.nz154 := -13+b;
frmMain.nz155 := -13+b;
frmMain.nz156 := -6+b;
frmMain.nz157 := -12+b;
frmMain.nz158 := -12+b;
frmMain.nz159 := -12+b;
frmMain.nz160 := -12+b;
frmMain.nz161 := -10+b;
frmMain.nz162 := -10+b;
frmMain.nz163 := -10+b;
frmMain.nz164 := -10+b;
frmMain.nz165 := -8+b;
frmMain.nz166 := -8+b;
frmMain.nz167 := -8+b;
frmMain.nz168 := -8+b;
frmMain.nz169 := -6+b;
frmMain.nz170 := -6+b;
frmMain.nz171 := -6+b;
frmMain.nz172 := -6+b;
frmMain.nz173 := -4+b;
frmMain.nz174 := -4+b;
frmMain.nz175 := -4+b;
frmMain.nz176 := -4+b;
frmMain.nz177 := -2+b;
frmMain.nz178 := -2+b;
frmMain.nz179 := -2+b;
frmMain.nz180 := -2+b;
 frmMain.nz181 := -3+b;
 frmMain.nz182 := -3+b;
 frmMain.nz183 := -3+b;
 frmMain.nz184 := -3+b;
 frmMain.nz185 := - 5+b;
 frmMain.nz186 := -5+b;
 frmMain.nz187 := -5+b;
 frmMain.nz188 := -5+b;
 frmMain.nz189 := -7+b;
 frmMain.nz190 := -7+b;
 frmMain.nz191 := -7+b;
 frmMain.nz192 := -7+b;
 frmMain.nz193 := -9+b;
 frmMain.nz194 := -9+b;
 frmMain.nz195 := -9+b;
 frmMain.nz196 := -9+b;
 frmMain.nz197 := -11+b;
 frmMain.nz198 := -11+b;
 frmMain.nz199 := -11+b;
 frmMain.nz200 := -11+b;
 frmMain.nz201 := -13+b;
 frmMain.nz202 := -13+b;
 frmMain.nz203 := -13+b;
 frmMain.nz204 := -13+b;
 frmMain.nz205 := -4+b;  //корабль
 frmMain.nz206 := -8+b;  //Подлодка
 frmMain.nz215 := -12+b;
 frmMain.frmGL.Width:=800;
 b:=0;

 end;




 if (c=7) and (d=6) then
begin
StringGrid1.Cells[c,d]:='1';
c:=6;
StringGrid1.Cells[c,d]:='d';
podlodok:=podlodok+1;
label4.Caption:=inttostr(podlodok);
ochkofnabrano:=ochkofnabrano+300;
label6.Caption:=inttostr(ochkofnabrano);
c:=7;
a:=a-3;
b:=b+9;
frmMain.nx := 0+a;
  frmMain.nx1 := 0+a;
  frmMain.nx2 := 0+a;
 frmMain.nx3 := 0+a;
 frmMain.nx7 := -1+a;
 frmMain.nx8 := 1+a;
 frmMain.nx9 := -1+a;
  frmMain.nx10 := -2+a;
 frmMain.nx11 := -1+a;
 frmMain.nx12 := 1+a;
 frmMain.nx14 := 1+a;
 frmMain.nx15 := -1+a;
 frmMain.nx16 := -1+a;
 frmMain.nx17 := 1+a;
  frmMain.nx18 := -1+a;
 frmMain.nx19 := 1+a;
 frmMain.nx20 := -1+a;
 frmMain.nx21 := -1+a;
 frmMain.nx22 := 1+a;
  frmMain.nx23 := -1+a;
 frmMain.nx24 := 1+a;
  frmMain.nx25 := 1+a;
 frmMain.nx26 := -1+a;
 frmMain.nx27 := 1+a;
  frmMain.nx28 := -1+a;
  frmMain.nx29 := 1+a;
 frmMain.nx30 := -1+a;

// 1

 frmMain.nx31 := -2+a;
 frmMain.nx32 := 2+a;
 frmMain.nx33 := -2+a;
 frmMain.nx34 :=  2+a;
 frmMain.nx35 := -2+a;
 frmMain.nx36 := 2+a;
  frmMain.nx37 := -2+a;
 frmMain.nx38 := 2+a;
 frmMain.nx39 := -2+a;
 frmMain.nx40 := 2+a;
 frmMain.nx41 := -2+a;
 frmMain.nx42 := 2+a;
 frmMain.nx43 := -2+a;
 frmMain.nx44 := 2+a;
 frmMain.nx45 := -2+a;  //////////////


 //////////////////////

 frmMain.nx46 := -2+a;
 frmMain.nx47 := -2+a;
 frmMain.nx48 := 2+a;
 frmMain.nx49 := -2+a;
 frmMain.nx50 := 2+a;
 frmMain.nx51 := -3+a;
 frmMain.nx52 :=3+a;
 frmMain.nx53 := -3+a;
 frmMain.nx54 :=  3+a;
 frmMain.nx55 := -3+a;
 frmMain.nx56 := 3+a;
 frmMain.nx57 := -3+a;
 frmMain.nx58 := 3+a;
 frmMain.nx59 := -3+a;
 frmMain.nx60 := 3+a;
 frmMain.nx61 := -3+a;
 frmMain.nx62 := 3+a;
 frmMain.nx63 := -3+a;
 frmMain.nx64 := 3+a;
 frmMain.nx65 := -3+a;
 frmMain.nx66 := 3+a;
 frmMain.nx67 := -3+a;
 frmMain.nx68 := 3+a;
 frmMain.nx69 := -3+a;
 frmMain.nx70 := 3+a;


  ///3
 ///
 ///
 frmMain.nx71 := -4+a;
 frmMain.nx72 :=4+a;
 frmMain.nx73 := -4+a;
 frmMain.nx74 :=  4+a;
 frmMain.nx75 := -4+a;
 frmMain.nx76 := 4+a;
 frmMain.nx77 := -4+a;
 frmMain.nx78 := 4+a;
 frmMain.nx79 := -4+a;
 frmMain.nx80 := 4+a;
 frmMain.nx81 := -4+a;
 frmMain.nx82 := 4+a;
 frmMain.nx83 := -4+a;
 frmMain.nx84 := 4+a;
 frmMain.nx85 := -4+a;
 frmMain.nx86 := 4+a;
 frmMain.nx87 := -4+a;
 frmMain.nx88 := 4+a;
 frmMain.nx89 := -4+a;
 frmMain.nx90 := -2+a;

frmMain.nx94 :=0+a;
frmMain.nx95 :=-2+a;  //цифры
frmMain.nx96 :=-4+a;  //цифры
frmMain.nx97 :=-6+a;  //цифры
frmMain.nx98 := 2+a;  //цифры
frmMain.nx99 := 4+a;  //цифры
frmMain.nx100 := 6+a;  //цифры
frmMain.nx101 := 8+a;  //цифры
frmMain.nx102 := 10+a;  //цифры
frmMain.nx103 := 12+a;  //цифры

frmMain.nx104 := -8+a;  //буквы
frmMain.nx105 := -8+a;  //буквы
frmMain.nx106 := -8+a;  //буквы
frmMain.nx107 := -8+a;  //буквы
frmMain.nx108 := -8+a;  //буквы
frmMain.nx109 := -8+a;  //буквы
frmMain.nx110 := -8+a;  //буквы
frmMain.nx111 := -8+a;  //буквы
frmMain.nx112 := -8+a;  //буквы
frmMain.nx113 := -8+a;  //буквы

frmMain.nx114 := -6+a;  //корабль
frmMain.nx115 := 0+a;  //цифры
frmMain.nx116 :=-2+a;  //цифры
frmMain.nx117 :=-4+a;  //цифры
frmMain.nx118 :=-6+a;  //цифры
frmMain.nx119 := 2+a;  //цифры
frmMain.nx120 := 4+a;  //цифры
frmMain.nx121 := 6+a;  //цифры
frmMain.nx122 := 8+a;  //цифры
frmMain.nx123 := 10+a;  //цифры
frmMain.nx124 := 12+a;  //цифры
frmMain.nx125 := 0+a;
frmMain.nx126 := 0+a;
frmMain.nx127 := 0+a;
frmMain.nx128 := 2+a;
frmMain.nx129 := -2+a;
frmMain.nx130 := -4+a;
frmMain.nx131 := 4+a;
frmMain.nx132 := -6+a;
frmMain.nx133 := 6+a;
frmMain.nx134 := 8+a;
frmMain.nx135 := -8+a;
frmMain.nx136 := -2+a;
frmMain.nx137 := 2+a;
frmMain.nx138 := -4+a;
frmMain.nx139 := 4+a;
frmMain.nx140 := -2+a;
frmMain.nx141 := 2+a;
frmMain.nx142 := 0+a;
frmMain.nx143 := 2+a;
frmMain.nx144 := -2+a;
frmMain.nx145 := -4+a;
frmMain.nx146 := 4+a;
frmMain.nx147 := 6+a;
frmMain.nx148 := -6+a;
frmMain.nx149 := -6+a;
frmMain.nx150 := 6+a;
frmMain.nx151 := 2+a;
frmMain.nx152 := -2+a;
frmMain.nx153 := 2+a;
frmMain.nx154 := -2+a;
frmMain.nx155 := 0+a;
frmMain.nx156 := 0+a;
frmMain.nx157 := 4+a;
frmMain.nx158 := -4+a;
frmMain.nx159 := -6+a;
frmMain.nx160 := 6+a;
frmMain.nx161 := 4+a;
frmMain.nx162 := -4+a;
frmMain.nx163 := -6+a;
frmMain.nx164 := 6+a;
frmMain.nx165 := 4+a;
frmMain.nx166 := -4+a;
frmMain.nx167 := -6+a;
frmMain.nx168 := 6+a;
frmMain.nx169 := 4+a;
frmMain.nx170 := -4+a;
frmMain.nx171 := -6+a;
frmMain.nx172 := 6+a;
frmMain.nx173 := 4+a;
frmMain.nx174 := -4+a;
frmMain.nx175 := -6+a;
frmMain.nx176 := 6+a;
frmMain.nx177 := 4+a;
frmMain.nx178 := -4+a;
frmMain.nx179 := -6+a;
frmMain.nx180 := 6+a;
 frmMain.nx181 := 4+a;
 frmMain.nx182 := -4+a;
 frmMain.nx183 := -6+a;
 frmMain.nx184 := 6+a;
 frmMain.nx185 := 4+a;
 frmMain.nx186 := -4+a;
 frmMain.nx187 := -6+a;
 frmMain.nx188 := 6+a;
 frmMain.nx189 := -4+a;
 frmMain.nx190 := 4+a;
 frmMain.nx191 := -6+a;
 frmMain.nx192 := 6+a;
 frmMain.nx193 := -4+a;
 frmMain.nx194 := 4+a;
 frmMain.nx195 := -6+a;
 frmMain.nx196 := 6+a;
 frmMain.nx197 := -4+a;
 frmMain.nx198 := 4+a;
 frmMain.nx199 := -6+a;
 frmMain.nx200 := 6+a;
 frmMain.nx201 := -4+a;
 frmMain.nx202 := 4+a;
 frmMain.nx203 := -6+a;
 frmMain.nx204 := 6+a;
 frmMain.nx205 := 6+a;  //корабль
 frmMain.nx206 := 6+a;  //Подлодка
 frmMain.nx215 := -6+a;
 frmMain.frmGL.Width:=800;
 a:=0;
 frmMain.nz := 0+b;
  frmMain.nz1 := 0+b;
  frmMain.nz2 := 0+b;
 frmMain.nz3 := 1+b;
 frmMain.nz7 := 0+b;
 frmMain.nz8 := 2+b;
 frmMain.nz9 := 2+b;
  frmMain.nz10 := -2+b;
 frmMain.nz11 := -2+b;
 frmMain.nz12 := -2+b;
 frmMain.nz14 := -3+b;
 frmMain.nz15 := -3+b;
 frmMain.nz16 := -4+b;
 frmMain.nz17 := -4+b;
  frmMain.nz18 := -5+b;
 frmMain.nz19 := -5+b;
 frmMain.nz20 := -6+b;
 frmMain.nz21 := -7+b;
 frmMain.nz22 := -7+b;
  frmMain.nz23 := -8+b;
 frmMain.nz24 := -8+b;
  frmMain.nz25 := -9+b;
 frmMain.nz26 := -9+b;
 frmMain.nz27 := -10+b;
  frmMain.nz28 := -10+b;
  frmMain.nz29 := -11+b;
 frmMain.nz30 := -11+b;

// 1

 frmMain.nz31 := -2+b;
 frmMain.nz32 := -2+b;
 frmMain.nz33 := -3+b;
 frmMain.nz34 := -3+b;
 frmMain.nz35 := -4+b;
 frmMain.nz36 := -4+b;
  frmMain.nz37 := -5+b;
 frmMain.nz38 := -5+b;
 frmMain.nz39 := -6+b;
 frmMain.nz40 := -6+b;
 frmMain.nz41 := -7+b;
 frmMain.nz42 := -7+b;
 frmMain.nz43 := -8+b;
 frmMain.nz44 := -8+b;
 frmMain.nz45 := -9+b;  //////////////


 //////////////////////

 frmMain.nz46 := -9+b;
 frmMain.nz47 := -9+b;
 frmMain.nz48 := -10+b;
 frmMain.nz49 := -11+b;
 frmMain.nz50 := -11+b;
 frmMain.nz51 := -2+b;
 frmMain.nz52 :=-2+b;
 frmMain.nz53 := -3+b;
 frmMain.nz54 :=  3+b;
 frmMain.nz55 := -3+b;
 frmMain.nz56 := -4+b;
 frmMain.nz57 := -5+b;
 frmMain.nz58 := -5+b;
 frmMain.nz59 := -6+b;
 frmMain.nz60 := -6+b;
 frmMain.nz61 := -7+b;
 frmMain.nz62 := -7+b;
 frmMain.nz63 := -8+b;
 frmMain.nz64 := -8+b;
 frmMain.nz65 := -9+b;
 frmMain.nz66 := -9+b;
 frmMain.nz67 := -10+b;
 frmMain.nz68 := -10+b;
 frmMain.nz69 := -11+b;
 frmMain.nz70 := -11+b;


  ///3
 ///
 ///
 frmMain.nz71 := -2+b;
 frmMain.nz72 :=-2+b;
 frmMain.nz73 := -3+b;
 frmMain.nz74 :=  -3+b;
 frmMain.nz75 := -4+b;
 frmMain.nz76 := -4+b;
 frmMain.nz77 := -5+b;
 frmMain.nz78 := -5+b;
 frmMain.nz79 := -6+b;
 frmMain.nz80 := -6+b;
 frmMain.nz81 := -7+b;
 frmMain.nz82 := -7+b;
 frmMain.nz83 := -8+b;
 frmMain.nz84 := -8+b;
 frmMain.nz85 := -9+b;
 frmMain.nz86 := -9+b;
 frmMain.nz87 := -10+b;
 frmMain.nz88 := -10+b;
 frmMain.nz89 := -11+b;
 frmMain.nz90 := -2+b;

frmMain.nz94 :=1+b;
frmMain.nz95 :=1+b;  //цифры
frmMain.nz96 :=1+b;  //цифры
frmMain.nz97 :=1+b;  //цифры
frmMain.nz98 := 1+b;  //цифры
frmMain.nz99 := 1+b;  //цифры
frmMain.nz100 := 1+b;  //цифры
frmMain.nz101 := 1+b;  //цифры
frmMain.nz102 := 1+b;  //цифры
frmMain.nz103 := 1+b;  //цифры

frmMain.nz104 := -0+b;  //буквы
frmMain.nz105 := -2+b;  //буквы
frmMain.nz106 := -4+b;  //буквы
frmMain.nz107 := -6+b;  //буквы
frmMain.nz108 := -8+b;  //буквы
frmMain.nz109 := -10+b;  //буквы
frmMain.nz110 := -12+b;  //буквы
frmMain.nz111 := -14+b;  //буквы
frmMain.nz112 := -16+b;  //буквы
frmMain.nz113 := -18+b;  //буквы

frmMain.nz114 := -4+b;  //корабль
frmMain.nz115 := -18+b;  //цифры
frmMain.nz116 :=-18+b;  //цифры
frmMain.nz117 :=-18+b;  //цифры
frmMain.nz118 :=-18+b;  //цифры
frmMain.nz119 := -18+b;  //цифры
frmMain.nz120 := -18+b;  //цифры
frmMain.nz121 := -18+b;  //цифры
frmMain.nz122 := -18+b;  //цифры
frmMain.nz123 := -18+b;  //цифры
frmMain.nz124 := -18+b;  //цифры
frmMain.nz125 := -16+b;
frmMain.nz126 := -14+b;
frmMain.nz127 := -12+b;
frmMain.nz128 := -16+b;
frmMain.nz129 := -16+b;
frmMain.nz130 := -16+b;
frmMain.nz131 := -16+b;
frmMain.nz132 := -16+b;
frmMain.nz133 := -16+b;
frmMain.nz134 := -16+b;
frmMain.nz135 := -16+b;
frmMain.nz136 := -14+b;
frmMain.nz137 := -14+b;
frmMain.nz138 := -14+b;
frmMain.nz139 := -14+b;
frmMain.nz140 := -14+b;
frmMain.nz141 := -15+b;
frmMain.nz142 := -15+b;
frmMain.nz143 := -15+b;
frmMain.nz144 := -15+b;
frmMain.nz145 := -15+b;
frmMain.nz146 := -15+b;
frmMain.nz147 := -15+b;
frmMain.nz148 := -15+b;
frmMain.nz149 := -14+b;
frmMain.nz150 := -14+b;
frmMain.nz151 := -12+b;
frmMain.nz152 := -12+b;
frmMain.nz153 := -13+b;
frmMain.nz154 := -13+b;
frmMain.nz155 := -13+b;
frmMain.nz156 := -6+b;
frmMain.nz157 := -12+b;
frmMain.nz158 := -12+b;
frmMain.nz159 := -12+b;
frmMain.nz160 := -12+b;
frmMain.nz161 := -10+b;
frmMain.nz162 := -10+b;
frmMain.nz163 := -10+b;
frmMain.nz164 := -10+b;
frmMain.nz165 := -8+b;
frmMain.nz166 := -8+b;
frmMain.nz167 := -8+b;
frmMain.nz168 := -8+b;
frmMain.nz169 := -6+b;
frmMain.nz170 := -6+b;
frmMain.nz171 := -6+b;
frmMain.nz172 := -6+b;
frmMain.nz173 := -4+b;
frmMain.nz174 := -4+b;
frmMain.nz175 := -4+b;
frmMain.nz176 := -4+b;
frmMain.nz177 := -2+b;
frmMain.nz178 := -2+b;
frmMain.nz179 := -2+b;
frmMain.nz180 := -2+b;
 frmMain.nz181 := -3+b;
 frmMain.nz182 := -3+b;
 frmMain.nz183 := -3+b;
 frmMain.nz184 := -3+b;
 frmMain.nz185 := - 5+b;
 frmMain.nz186 := -5+b;
 frmMain.nz187 := -5+b;
 frmMain.nz188 := -5+b;
 frmMain.nz189 := -7+b;
 frmMain.nz190 := -7+b;
 frmMain.nz191 := -7+b;
 frmMain.nz192 := -7+b;
 frmMain.nz193 := -9+b;
 frmMain.nz194 := -9+b;
 frmMain.nz195 := -9+b;
 frmMain.nz196 := -9+b;
 frmMain.nz197 := -11+b;
 frmMain.nz198 := -11+b;
 frmMain.nz199 := -11+b;
 frmMain.nz200 := -11+b;
 frmMain.nz201 := -13+b;
 frmMain.nz202 := -13+b;
 frmMain.nz203 := -13+b;
 frmMain.nz204 := -13+b;
 frmMain.nz205 := -4+b;  //корабль
 frmMain.nz206 := -8+b;  //Подлодка
 frmMain.nz215 := -12+b;
 frmMain.frmGL.Width:=800;
 b:=0;

 end;





 if (c=7) and (d=7) then
begin
StringGrid1.Cells[c,d]:='1';
a:=a-3;
b:=b+7;
frmMain.nx := 0+a;
  frmMain.nx1 := 0+a;
  frmMain.nx2 := 0+a;
 frmMain.nx3 := 0+a;
 frmMain.nx7 := -1+a;
 frmMain.nx8 := 1+a;
 frmMain.nx9 := -1+a;
  frmMain.nx10 := -2+a;
 frmMain.nx11 := -1+a;
 frmMain.nx12 := 1+a;
 frmMain.nx14 := 1+a;
 frmMain.nx15 := -1+a;
 frmMain.nx16 := -1+a;
 frmMain.nx17 := 1+a;
  frmMain.nx18 := -1+a;
 frmMain.nx19 := 1+a;
 frmMain.nx20 := -1+a;
 frmMain.nx21 := -1+a;
 frmMain.nx22 := 1+a;
  frmMain.nx23 := -1+a;
 frmMain.nx24 := 1+a;
  frmMain.nx25 := 1+a;
 frmMain.nx26 := -1+a;
 frmMain.nx27 := 1+a;
  frmMain.nx28 := -1+a;
  frmMain.nx29 := 1+a;
 frmMain.nx30 := -1+a;

// 1

 frmMain.nx31 := -2+a;
 frmMain.nx32 := 2+a;
 frmMain.nx33 := -2+a;
 frmMain.nx34 :=  2+a;
 frmMain.nx35 := -2+a;
 frmMain.nx36 := 2+a;
  frmMain.nx37 := -2+a;
 frmMain.nx38 := 2+a;
 frmMain.nx39 := -2+a;
 frmMain.nx40 := 2+a;
 frmMain.nx41 := -2+a;
 frmMain.nx42 := 2+a;
 frmMain.nx43 := -2+a;
 frmMain.nx44 := 2+a;
 frmMain.nx45 := -2+a;  //////////////


 //////////////////////

 frmMain.nx46 := -2+a;
 frmMain.nx47 := -2+a;
 frmMain.nx48 := 2+a;
 frmMain.nx49 := -2+a;
 frmMain.nx50 := 2+a;
 frmMain.nx51 := -3+a;
 frmMain.nx52 :=3+a;
 frmMain.nx53 := -3+a;
 frmMain.nx54 :=  3+a;
 frmMain.nx55 := -3+a;
 frmMain.nx56 := 3+a;
 frmMain.nx57 := -3+a;
 frmMain.nx58 := 3+a;
 frmMain.nx59 := -3+a;
 frmMain.nx60 := 3+a;
 frmMain.nx61 := -3+a;
 frmMain.nx62 := 3+a;
 frmMain.nx63 := -3+a;
 frmMain.nx64 := 3+a;
 frmMain.nx65 := -3+a;
 frmMain.nx66 := 3+a;
 frmMain.nx67 := -3+a;
 frmMain.nx68 := 3+a;
 frmMain.nx69 := -3+a;
 frmMain.nx70 := 3+a;


  ///3
 ///
 ///
 frmMain.nx71 := -4+a;
 frmMain.nx72 :=4+a;
 frmMain.nx73 := -4+a;
 frmMain.nx74 :=  4+a;
 frmMain.nx75 := -4+a;
 frmMain.nx76 := 4+a;
 frmMain.nx77 := -4+a;
 frmMain.nx78 := 4+a;
 frmMain.nx79 := -4+a;
 frmMain.nx80 := 4+a;
 frmMain.nx81 := -4+a;
 frmMain.nx82 := 4+a;
 frmMain.nx83 := -4+a;
 frmMain.nx84 := 4+a;
 frmMain.nx85 := -4+a;
 frmMain.nx86 := 4+a;
 frmMain.nx87 := -4+a;
 frmMain.nx88 := 4+a;
 frmMain.nx89 := -4+a;
 frmMain.nx90 := -2+a;

frmMain.nx94 :=0+a;
frmMain.nx95 :=-2+a;  //цифры
frmMain.nx96 :=-4+a;  //цифры
frmMain.nx97 :=-6+a;  //цифры
frmMain.nx98 := 2+a;  //цифры
frmMain.nx99 := 4+a;  //цифры
frmMain.nx100 := 6+a;  //цифры
frmMain.nx101 := 8+a;  //цифры
frmMain.nx102 := 10+a;  //цифры
frmMain.nx103 := 12+a;  //цифры

frmMain.nx104 := -8+a;  //буквы
frmMain.nx105 := -8+a;  //буквы
frmMain.nx106 := -8+a;  //буквы
frmMain.nx107 := -8+a;  //буквы
frmMain.nx108 := -8+a;  //буквы
frmMain.nx109 := -8+a;  //буквы
frmMain.nx110 := -8+a;  //буквы
frmMain.nx111 := -8+a;  //буквы
frmMain.nx112 := -8+a;  //буквы
frmMain.nx113 := -8+a;  //буквы

frmMain.nx114 := -6+a;  //корабль
frmMain.nx115 := 0+a;  //цифры
frmMain.nx116 :=-2+a;  //цифры
frmMain.nx117 :=-4+a;  //цифры
frmMain.nx118 :=-6+a;  //цифры
frmMain.nx119 := 2+a;  //цифры
frmMain.nx120 := 4+a;  //цифры
frmMain.nx121 := 6+a;  //цифры
frmMain.nx122 := 8+a;  //цифры
frmMain.nx123 := 10+a;  //цифры
frmMain.nx124 := 12+a;  //цифры
frmMain.nx125 := 0+a;
frmMain.nx126 := 0+a;
frmMain.nx127 := 0+a;
frmMain.nx128 := 2+a;
frmMain.nx129 := -2+a;
frmMain.nx130 := -4+a;
frmMain.nx131 := 4+a;
frmMain.nx132 := -6+a;
frmMain.nx133 := 6+a;
frmMain.nx134 := 8+a;
frmMain.nx135 := -8+a;
frmMain.nx136 := -2+a;
frmMain.nx137 := 2+a;
frmMain.nx138 := -4+a;
frmMain.nx139 := 4+a;
frmMain.nx140 := -2+a;
frmMain.nx141 := 2+a;
frmMain.nx142 := 0+a;
frmMain.nx143 := 2+a;
frmMain.nx144 := -2+a;
frmMain.nx145 := -4+a;
frmMain.nx146 := 4+a;
frmMain.nx147 := 6+a;
frmMain.nx148 := -6+a;
frmMain.nx149 := -6+a;
frmMain.nx150 := 6+a;
frmMain.nx151 := 2+a;
frmMain.nx152 := -2+a;
frmMain.nx153 := 2+a;
frmMain.nx154 := -2+a;
frmMain.nx155 := 0+a;
frmMain.nx156 := 0+a;
frmMain.nx157 := 4+a;
frmMain.nx158 := -4+a;
frmMain.nx159 := -6+a;
frmMain.nx160 := 6+a;
frmMain.nx161 := 4+a;
frmMain.nx162 := -4+a;
frmMain.nx163 := -6+a;
frmMain.nx164 := 6+a;
frmMain.nx165 := 4+a;
frmMain.nx166 := -4+a;
frmMain.nx167 := -6+a;
frmMain.nx168 := 6+a;
frmMain.nx169 := 4+a;
frmMain.nx170 := -4+a;
frmMain.nx171 := -6+a;
frmMain.nx172 := 6+a;
frmMain.nx173 := 4+a;
frmMain.nx174 := -4+a;
frmMain.nx175 := -6+a;
frmMain.nx176 := 6+a;
frmMain.nx177 := 4+a;
frmMain.nx178 := -4+a;
frmMain.nx179 := -6+a;
frmMain.nx180 := 6+a;
 frmMain.nx181 := 4+a;
 frmMain.nx182 := -4+a;
 frmMain.nx183 := -6+a;
 frmMain.nx184 := 6+a;
 frmMain.nx185 := 4+a;
 frmMain.nx186 := -4+a;
 frmMain.nx187 := -6+a;
 frmMain.nx188 := 6+a;
 frmMain.nx189 := -4+a;
 frmMain.nx190 := 4+a;
 frmMain.nx191 := -6+a;
 frmMain.nx192 := 6+a;
 frmMain.nx193 := -4+a;
 frmMain.nx194 := 4+a;
 frmMain.nx195 := -6+a;
 frmMain.nx196 := 6+a;
 frmMain.nx197 := -4+a;
 frmMain.nx198 := 4+a;
 frmMain.nx199 := -6+a;
 frmMain.nx200 := 6+a;
 frmMain.nx201 := -4+a;
 frmMain.nx202 := 4+a;
 frmMain.nx203 := -6+a;
 frmMain.nx204 := 6+a;
 frmMain.nx205 := 6+a;  //корабль
 frmMain.nx206 := 6+a;  //Подлодка
 frmMain.nx215 := -6+a;
 frmMain.frmGL.Width:=800;
 a:=0;
 frmMain.nz := 0+b;
  frmMain.nz1 := 0+b;
  frmMain.nz2 := 0+b;
 frmMain.nz3 := 1+b;
 frmMain.nz7 := 0+b;
 frmMain.nz8 := 2+b;
 frmMain.nz9 := 2+b;
  frmMain.nz10 := -2+b;
 frmMain.nz11 := -2+b;
 frmMain.nz12 := -2+b;
 frmMain.nz14 := -3+b;
 frmMain.nz15 := -3+b;
 frmMain.nz16 := -4+b;
 frmMain.nz17 := -4+b;
  frmMain.nz18 := -5+b;
 frmMain.nz19 := -5+b;
 frmMain.nz20 := -6+b;
 frmMain.nz21 := -7+b;
 frmMain.nz22 := -7+b;
  frmMain.nz23 := -8+b;
 frmMain.nz24 := -8+b;
  frmMain.nz25 := -9+b;
 frmMain.nz26 := -9+b;
 frmMain.nz27 := -10+b;
  frmMain.nz28 := -10+b;
  frmMain.nz29 := -11+b;
 frmMain.nz30 := -11+b;

// 1

 frmMain.nz31 := -2+b;
 frmMain.nz32 := -2+b;
 frmMain.nz33 := -3+b;
 frmMain.nz34 := -3+b;
 frmMain.nz35 := -4+b;
 frmMain.nz36 := -4+b;
  frmMain.nz37 := -5+b;
 frmMain.nz38 := -5+b;
 frmMain.nz39 := -6+b;
 frmMain.nz40 := -6+b;
 frmMain.nz41 := -7+b;
 frmMain.nz42 := -7+b;
 frmMain.nz43 := -8+b;
 frmMain.nz44 := -8+b;
 frmMain.nz45 := -9+b;  //////////////


 //////////////////////

 frmMain.nz46 := -9+b;
 frmMain.nz47 := -9+b;
 frmMain.nz48 := -10+b;
 frmMain.nz49 := -11+b;
 frmMain.nz50 := -11+b;
 frmMain.nz51 := -2+b;
 frmMain.nz52 :=-2+b;
 frmMain.nz53 := -3+b;
 frmMain.nz54 :=  3+b;
 frmMain.nz55 := -3+b;
 frmMain.nz56 := -4+b;
 frmMain.nz57 := -5+b;
 frmMain.nz58 := -5+b;
 frmMain.nz59 := -6+b;
 frmMain.nz60 := -6+b;
 frmMain.nz61 := -7+b;
 frmMain.nz62 := -7+b;
 frmMain.nz63 := -8+b;
 frmMain.nz64 := -8+b;
 frmMain.nz65 := -9+b;
 frmMain.nz66 := -9+b;
 frmMain.nz67 := -10+b;
 frmMain.nz68 := -10+b;
 frmMain.nz69 := -11+b;
 frmMain.nz70 := -11+b;


  ///3
 ///
 ///
 frmMain.nz71 := -2+b;
 frmMain.nz72 :=-2+b;
 frmMain.nz73 := -3+b;
 frmMain.nz74 :=  -3+b;
 frmMain.nz75 := -4+b;
 frmMain.nz76 := -4+b;
 frmMain.nz77 := -5+b;
 frmMain.nz78 := -5+b;
 frmMain.nz79 := -6+b;
 frmMain.nz80 := -6+b;
 frmMain.nz81 := -7+b;
 frmMain.nz82 := -7+b;
 frmMain.nz83 := -8+b;
 frmMain.nz84 := -8+b;
 frmMain.nz85 := -9+b;
 frmMain.nz86 := -9+b;
 frmMain.nz87 := -10+b;
 frmMain.nz88 := -10+b;
 frmMain.nz89 := -11+b;
 frmMain.nz90 := -2+b;

frmMain.nz94 :=1+b;
frmMain.nz95 :=1+b;  //цифры
frmMain.nz96 :=1+b;  //цифры
frmMain.nz97 :=1+b;  //цифры
frmMain.nz98 := 1+b;  //цифры
frmMain.nz99 := 1+b;  //цифры
frmMain.nz100 := 1+b;  //цифры
frmMain.nz101 := 1+b;  //цифры
frmMain.nz102 := 1+b;  //цифры
frmMain.nz103 := 1+b;  //цифры

frmMain.nz104 := -0+b;  //буквы
frmMain.nz105 := -2+b;  //буквы
frmMain.nz106 := -4+b;  //буквы
frmMain.nz107 := -6+b;  //буквы
frmMain.nz108 := -8+b;  //буквы
frmMain.nz109 := -10+b;  //буквы
frmMain.nz110 := -12+b;  //буквы
frmMain.nz111 := -14+b;  //буквы
frmMain.nz112 := -16+b;  //буквы
frmMain.nz113 := -18+b;  //буквы

frmMain.nz114 := -4+b;  //корабль
frmMain.nz115 := -18+b;  //цифры
frmMain.nz116 :=-18+b;  //цифры
frmMain.nz117 :=-18+b;  //цифры
frmMain.nz118 :=-18+b;  //цифры
frmMain.nz119 := -18+b;  //цифры
frmMain.nz120 := -18+b;  //цифры
frmMain.nz121 := -18+b;  //цифры
frmMain.nz122 := -18+b;  //цифры
frmMain.nz123 := -18+b;  //цифры
frmMain.nz124 := -18+b;  //цифры
frmMain.nz125 := -16+b;
frmMain.nz126 := -14+b;
frmMain.nz127 := -12+b;
frmMain.nz128 := -16+b;
frmMain.nz129 := -16+b;
frmMain.nz130 := -16+b;
frmMain.nz131 := -16+b;
frmMain.nz132 := -16+b;
frmMain.nz133 := -16+b;
frmMain.nz134 := -16+b;
frmMain.nz135 := -16+b;
frmMain.nz136 := -14+b;
frmMain.nz137 := -14+b;
frmMain.nz138 := -14+b;
frmMain.nz139 := -14+b;
frmMain.nz140 := -14+b;
frmMain.nz141 := -15+b;
frmMain.nz142 := -15+b;
frmMain.nz143 := -15+b;
frmMain.nz144 := -15+b;
frmMain.nz145 := -15+b;
frmMain.nz146 := -15+b;
frmMain.nz147 := -15+b;
frmMain.nz148 := -15+b;
frmMain.nz149 := -14+b;
frmMain.nz150 := -14+b;
frmMain.nz151 := -12+b;
frmMain.nz152 := -12+b;
frmMain.nz153 := -13+b;
frmMain.nz154 := -13+b;
frmMain.nz155 := -13+b;
frmMain.nz156 := -6+b;
frmMain.nz157 := -12+b;
frmMain.nz158 := -12+b;
frmMain.nz159 := -12+b;
frmMain.nz160 := -12+b;
frmMain.nz161 := -10+b;
frmMain.nz162 := -10+b;
frmMain.nz163 := -10+b;
frmMain.nz164 := -10+b;
frmMain.nz165 := -8+b;
frmMain.nz166 := -8+b;
frmMain.nz167 := -8+b;
frmMain.nz168 := -8+b;
frmMain.nz169 := -6+b;
frmMain.nz170 := -6+b;
frmMain.nz171 := -6+b;
frmMain.nz172 := -6+b;
frmMain.nz173 := -4+b;
frmMain.nz174 := -4+b;
frmMain.nz175 := -4+b;
frmMain.nz176 := -4+b;
frmMain.nz177 := -2+b;
frmMain.nz178 := -2+b;
frmMain.nz179 := -2+b;
frmMain.nz180 := -2+b;
 frmMain.nz181 := -3+b;
 frmMain.nz182 := -3+b;
 frmMain.nz183 := -3+b;
 frmMain.nz184 := -3+b;
 frmMain.nz185 := - 5+b;
 frmMain.nz186 := -5+b;
 frmMain.nz187 := -5+b;
 frmMain.nz188 := -5+b;
 frmMain.nz189 := -7+b;
 frmMain.nz190 := -7+b;
 frmMain.nz191 := -7+b;
 frmMain.nz192 := -7+b;
 frmMain.nz193 := -9+b;
 frmMain.nz194 := -9+b;
 frmMain.nz195 := -9+b;
 frmMain.nz196 := -9+b;
 frmMain.nz197 := -11+b;
 frmMain.nz198 := -11+b;
 frmMain.nz199 := -11+b;
 frmMain.nz200 := -11+b;
 frmMain.nz201 := -13+b;
 frmMain.nz202 := -13+b;
 frmMain.nz203 := -13+b;
 frmMain.nz204 := -13+b;
 frmMain.nz205 := -4+b;  //корабль
 frmMain.nz206 := -8+b;  //Подлодка
 frmMain.nz215 := -12+b;
 frmMain.frmGL.Width:=800;
 b:=0;

 end;



 if (c=7) and (d=8) then
begin
c:=7; d:=8;
StringGrid1.Cells[c,d]:='1';
c:=8; d:=8;
StringGrid1.Cells[c,d]:='d';
a:=a-3;
b:=b+5;
korabley:=korabley+1;
label2.Caption:=inttostr(korabley);
ochkofnabrano:=ochkofnabrano+200;
label6.Caption:=inttostr(ochkofnabrano);
frmMain.nx := 0+a;
  frmMain.nx1 := 0+a;
  frmMain.nx2 := 0+a;
 frmMain.nx3 := 0+a;
 frmMain.nx7 := -1+a;
 frmMain.nx8 := 1+a;
 frmMain.nx9 := -1+a;
  frmMain.nx10 := -2+a;
 frmMain.nx11 := -1+a;
 frmMain.nx12 := 1+a;
 frmMain.nx14 := 1+a;
 frmMain.nx15 := -1+a;
 frmMain.nx16 := -1+a;
 frmMain.nx17 := 1+a;
  frmMain.nx18 := -1+a;
 frmMain.nx19 := 1+a;
 frmMain.nx20 := -1+a;
 frmMain.nx21 := -1+a;
 frmMain.nx22 := 1+a;
  frmMain.nx23 := -1+a;
 frmMain.nx24 := 1+a;
  frmMain.nx25 := 1+a;
 frmMain.nx26 := -1+a;
 frmMain.nx27 := 1+a;
  frmMain.nx28 := -1+a;
  frmMain.nx29 := 1+a;
 frmMain.nx30 := -1+a;

// 1

 frmMain.nx31 := -2+a;
 frmMain.nx32 := 2+a;
 frmMain.nx33 := -2+a;
 frmMain.nx34 :=  2+a;
 frmMain.nx35 := -2+a;
 frmMain.nx36 := 2+a;
  frmMain.nx37 := -2+a;
 frmMain.nx38 := 2+a;
 frmMain.nx39 := -2+a;
 frmMain.nx40 := 2+a;
 frmMain.nx41 := -2+a;
 frmMain.nx42 := 2+a;
 frmMain.nx43 := -2+a;
 frmMain.nx44 := 2+a;
 frmMain.nx45 := -2+a;  //////////////


 //////////////////////

 frmMain.nx46 := -2+a;
 frmMain.nx47 := -2+a;
 frmMain.nx48 := 2+a;
 frmMain.nx49 := -2+a;
 frmMain.nx50 := 2+a;
 frmMain.nx51 := -3+a;
 frmMain.nx52 :=3+a;
 frmMain.nx53 := -3+a;
 frmMain.nx54 :=  3+a;
 frmMain.nx55 := -3+a;
 frmMain.nx56 := 3+a;
 frmMain.nx57 := -3+a;
 frmMain.nx58 := 3+a;
 frmMain.nx59 := -3+a;
 frmMain.nx60 := 3+a;
 frmMain.nx61 := -3+a;
 frmMain.nx62 := 3+a;
 frmMain.nx63 := -3+a;
 frmMain.nx64 := 3+a;
 frmMain.nx65 := -3+a;
 frmMain.nx66 := 3+a;
 frmMain.nx67 := -3+a;
 frmMain.nx68 := 3+a;
 frmMain.nx69 := -3+a;
 frmMain.nx70 := 3+a;


  ///3
 ///
 ///
 frmMain.nx71 := -4+a;
 frmMain.nx72 :=4+a;
 frmMain.nx73 := -4+a;
 frmMain.nx74 :=  4+a;
 frmMain.nx75 := -4+a;
 frmMain.nx76 := 4+a;
 frmMain.nx77 := -4+a;
 frmMain.nx78 := 4+a;
 frmMain.nx79 := -4+a;
 frmMain.nx80 := 4+a;
 frmMain.nx81 := -4+a;
 frmMain.nx82 := 4+a;
 frmMain.nx83 := -4+a;
 frmMain.nx84 := 4+a;
 frmMain.nx85 := -4+a;
 frmMain.nx86 := 4+a;
 frmMain.nx87 := -4+a;
 frmMain.nx88 := 4+a;
 frmMain.nx89 := -4+a;
 frmMain.nx90 := -2+a;

frmMain.nx94 :=0+a;
frmMain.nx95 :=-2+a;  //цифры
frmMain.nx96 :=-4+a;  //цифры
frmMain.nx97 :=-6+a;  //цифры
frmMain.nx98 := 2+a;  //цифры
frmMain.nx99 := 4+a;  //цифры
frmMain.nx100 := 6+a;  //цифры
frmMain.nx101 := 8+a;  //цифры
frmMain.nx102 := 10+a;  //цифры
frmMain.nx103 := 12+a;  //цифры

frmMain.nx104 := -8+a;  //буквы
frmMain.nx105 := -8+a;  //буквы
frmMain.nx106 := -8+a;  //буквы
frmMain.nx107 := -8+a;  //буквы
frmMain.nx108 := -8+a;  //буквы
frmMain.nx109 := -8+a;  //буквы
frmMain.nx110 := -8+a;  //буквы
frmMain.nx111 := -8+a;  //буквы
frmMain.nx112 := -8+a;  //буквы
frmMain.nx113 := -8+a;  //буквы

frmMain.nx114 := -6+a;  //корабль
frmMain.nx115 := 0+a;  //цифры
frmMain.nx116 :=-2+a;  //цифры
frmMain.nx117 :=-4+a;  //цифры
frmMain.nx118 :=-6+a;  //цифры
frmMain.nx119 := 2+a;  //цифры
frmMain.nx120 := 4+a;  //цифры
frmMain.nx121 := 6+a;  //цифры
frmMain.nx122 := 8+a;  //цифры
frmMain.nx123 := 10+a;  //цифры
frmMain.nx124 := 12+a;  //цифры
frmMain.nx125 := 0+a;
frmMain.nx126 := 0+a;
frmMain.nx127 := 0+a;
frmMain.nx128 := 2+a;
frmMain.nx129 := -2+a;
frmMain.nx130 := -4+a;
frmMain.nx131 := 4+a;
frmMain.nx132 := -6+a;
frmMain.nx133 := 6+a;
frmMain.nx134 := 8+a;
frmMain.nx135 := -8+a;
frmMain.nx136 := -2+a;
frmMain.nx137 := 2+a;
frmMain.nx138 := -4+a;
frmMain.nx139 := 4+a;
frmMain.nx140 := -2+a;
frmMain.nx141 := 2+a;
frmMain.nx142 := 0+a;
frmMain.nx143 := 2+a;
frmMain.nx144 := -2+a;
frmMain.nx145 := -4+a;
frmMain.nx146 := 4+a;
frmMain.nx147 := 6+a;
frmMain.nx148 := -6+a;
frmMain.nx149 := -6+a;
frmMain.nx150 := 6+a;
frmMain.nx151 := 2+a;
frmMain.nx152 := -2+a;
frmMain.nx153 := 2+a;
frmMain.nx154 := -2+a;
frmMain.nx155 := 0+a;
frmMain.nx156 := 0+a;
frmMain.nx157 := 4+a;
frmMain.nx158 := -4+a;
frmMain.nx159 := -6+a;
frmMain.nx160 := 6+a;
frmMain.nx161 := 4+a;
frmMain.nx162 := -4+a;
frmMain.nx163 := -6+a;
frmMain.nx164 := 6+a;
frmMain.nx165 := 4+a;
frmMain.nx166 := -4+a;
frmMain.nx167 := -6+a;
frmMain.nx168 := 6+a;
frmMain.nx169 := 4+a;
frmMain.nx170 := -4+a;
frmMain.nx171 := -6+a;
frmMain.nx172 := 6+a;
frmMain.nx173 := 4+a;
frmMain.nx174 := -4+a;
frmMain.nx175 := -6+a;
frmMain.nx176 := 6+a;
frmMain.nx177 := 4+a;
frmMain.nx178 := -4+a;
frmMain.nx179 := -6+a;
frmMain.nx180 := 6+a;
 frmMain.nx181 := 4+a;
 frmMain.nx182 := -4+a;
 frmMain.nx183 := -6+a;
 frmMain.nx184 := 6+a;
 frmMain.nx185 := 4+a;
 frmMain.nx186 := -4+a;
 frmMain.nx187 := -6+a;
 frmMain.nx188 := 6+a;
 frmMain.nx189 := -4+a;
 frmMain.nx190 := 4+a;
 frmMain.nx191 := -6+a;
 frmMain.nx192 := 6+a;
 frmMain.nx193 := -4+a;
 frmMain.nx194 := 4+a;
 frmMain.nx195 := -6+a;
 frmMain.nx196 := 6+a;
 frmMain.nx197 := -4+a;
 frmMain.nx198 := 4+a;
 frmMain.nx199 := -6+a;
 frmMain.nx200 := 6+a;
 frmMain.nx201 := -4+a;
 frmMain.nx202 := 4+a;
 frmMain.nx203 := -6+a;
 frmMain.nx204 := 6+a;
 frmMain.nx205 := 6+a;  //корабль
 frmMain.nx206 := 6+a;  //Подлодка
 frmMain.nx215 := -6+a;
 frmMain.frmGL.Width:=800;
 a:=0;
 frmMain.nz := 0+b;
  frmMain.nz1 := 0+b;
  frmMain.nz2 := 0+b;
 frmMain.nz3 := 1+b;
 frmMain.nz7 := 0+b;
 frmMain.nz8 := 2+b;
 frmMain.nz9 := 2+b;
  frmMain.nz10 := -2+b;
 frmMain.nz11 := -2+b;
 frmMain.nz12 := -2+b;
 frmMain.nz14 := -3+b;
 frmMain.nz15 := -3+b;
 frmMain.nz16 := -4+b;
 frmMain.nz17 := -4+b;
  frmMain.nz18 := -5+b;
 frmMain.nz19 := -5+b;
 frmMain.nz20 := -6+b;
 frmMain.nz21 := -7+b;
 frmMain.nz22 := -7+b;
  frmMain.nz23 := -8+b;
 frmMain.nz24 := -8+b;
  frmMain.nz25 := -9+b;
 frmMain.nz26 := -9+b;
 frmMain.nz27 := -10+b;
  frmMain.nz28 := -10+b;
  frmMain.nz29 := -11+b;
 frmMain.nz30 := -11+b;

// 1

 frmMain.nz31 := -2+b;
 frmMain.nz32 := -2+b;
 frmMain.nz33 := -3+b;
 frmMain.nz34 := -3+b;
 frmMain.nz35 := -4+b;
 frmMain.nz36 := -4+b;
  frmMain.nz37 := -5+b;
 frmMain.nz38 := -5+b;
 frmMain.nz39 := -6+b;
 frmMain.nz40 := -6+b;
 frmMain.nz41 := -7+b;
 frmMain.nz42 := -7+b;
 frmMain.nz43 := -8+b;
 frmMain.nz44 := -8+b;
 frmMain.nz45 := -9+b;  //////////////


 //////////////////////

 frmMain.nz46 := -9+b;
 frmMain.nz47 := -9+b;
 frmMain.nz48 := -10+b;
 frmMain.nz49 := -11+b;
 frmMain.nz50 := -11+b;
 frmMain.nz51 := -2+b;
 frmMain.nz52 :=-2+b;
 frmMain.nz53 := -3+b;
 frmMain.nz54 :=  3+b;
 frmMain.nz55 := -3+b;
 frmMain.nz56 := -4+b;
 frmMain.nz57 := -5+b;
 frmMain.nz58 := -5+b;
 frmMain.nz59 := -6+b;
 frmMain.nz60 := -6+b;
 frmMain.nz61 := -7+b;
 frmMain.nz62 := -7+b;
 frmMain.nz63 := -8+b;
 frmMain.nz64 := -8+b;
 frmMain.nz65 := -9+b;
 frmMain.nz66 := -9+b;
 frmMain.nz67 := -10+b;
 frmMain.nz68 := -10+b;
 frmMain.nz69 := -11+b;
 frmMain.nz70 := -11+b;


  ///3
 ///
 ///
 frmMain.nz71 := -2+b;
 frmMain.nz72 :=-2+b;
 frmMain.nz73 := -3+b;
 frmMain.nz74 :=  -3+b;
 frmMain.nz75 := -4+b;
 frmMain.nz76 := -4+b;
 frmMain.nz77 := -5+b;
 frmMain.nz78 := -5+b;
 frmMain.nz79 := -6+b;
 frmMain.nz80 := -6+b;
 frmMain.nz81 := -7+b;
 frmMain.nz82 := -7+b;
 frmMain.nz83 := -8+b;
 frmMain.nz84 := -8+b;
 frmMain.nz85 := -9+b;
 frmMain.nz86 := -9+b;
 frmMain.nz87 := -10+b;
 frmMain.nz88 := -10+b;
 frmMain.nz89 := -11+b;
 frmMain.nz90 := -2+b;

frmMain.nz94 :=1+b;
frmMain.nz95 :=1+b;  //цифры
frmMain.nz96 :=1+b;  //цифры
frmMain.nz97 :=1+b;  //цифры
frmMain.nz98 := 1+b;  //цифры
frmMain.nz99 := 1+b;  //цифры
frmMain.nz100 := 1+b;  //цифры
frmMain.nz101 := 1+b;  //цифры
frmMain.nz102 := 1+b;  //цифры
frmMain.nz103 := 1+b;  //цифры

frmMain.nz104 := -0+b;  //буквы
frmMain.nz105 := -2+b;  //буквы
frmMain.nz106 := -4+b;  //буквы
frmMain.nz107 := -6+b;  //буквы
frmMain.nz108 := -8+b;  //буквы
frmMain.nz109 := -10+b;  //буквы
frmMain.nz110 := -12+b;  //буквы
frmMain.nz111 := -14+b;  //буквы
frmMain.nz112 := -16+b;  //буквы
frmMain.nz113 := -18+b;  //буквы

frmMain.nz114 := -4+b;  //корабль
frmMain.nz115 := -18+b;  //цифры
frmMain.nz116 :=-18+b;  //цифры
frmMain.nz117 :=-18+b;  //цифры
frmMain.nz118 :=-18+b;  //цифры
frmMain.nz119 := -18+b;  //цифры
frmMain.nz120 := -18+b;  //цифры
frmMain.nz121 := -18+b;  //цифры
frmMain.nz122 := -18+b;  //цифры
frmMain.nz123 := -18+b;  //цифры
frmMain.nz124 := -18+b;  //цифры
frmMain.nz125 := -16+b;
frmMain.nz126 := -14+b;
frmMain.nz127 := -12+b;
frmMain.nz128 := -16+b;
frmMain.nz129 := -16+b;
frmMain.nz130 := -16+b;
frmMain.nz131 := -16+b;
frmMain.nz132 := -16+b;
frmMain.nz133 := -16+b;
frmMain.nz134 := -16+b;
frmMain.nz135 := -16+b;
frmMain.nz136 := -14+b;
frmMain.nz137 := -14+b;
frmMain.nz138 := -14+b;
frmMain.nz139 := -14+b;
frmMain.nz140 := -14+b;
frmMain.nz141 := -15+b;
frmMain.nz142 := -15+b;
frmMain.nz143 := -15+b;
frmMain.nz144 := -15+b;
frmMain.nz145 := -15+b;
frmMain.nz146 := -15+b;
frmMain.nz147 := -15+b;
frmMain.nz148 := -15+b;
frmMain.nz149 := -14+b;
frmMain.nz150 := -14+b;
frmMain.nz151 := -12+b;
frmMain.nz152 := -12+b;
frmMain.nz153 := -13+b;
frmMain.nz154 := -13+b;
frmMain.nz155 := -13+b;
frmMain.nz156 := -6+b;
frmMain.nz157 := -12+b;
frmMain.nz158 := -12+b;
frmMain.nz159 := -12+b;
frmMain.nz160 := -12+b;
frmMain.nz161 := -10+b;
frmMain.nz162 := -10+b;
frmMain.nz163 := -10+b;
frmMain.nz164 := -10+b;
frmMain.nz165 := -8+b;
frmMain.nz166 := -8+b;
frmMain.nz167 := -8+b;
frmMain.nz168 := -8+b;
frmMain.nz169 := -6+b;
frmMain.nz170 := -6+b;
frmMain.nz171 := -6+b;
frmMain.nz172 := -6+b;
frmMain.nz173 := -4+b;
frmMain.nz174 := -4+b;
frmMain.nz175 := -4+b;
frmMain.nz176 := -4+b;
frmMain.nz177 := -2+b;
frmMain.nz178 := -2+b;
frmMain.nz179 := -2+b;
frmMain.nz180 := -2+b;
 frmMain.nz181 := -3+b;
 frmMain.nz182 := -3+b;
 frmMain.nz183 := -3+b;
 frmMain.nz184 := -3+b;
 frmMain.nz185 := - 5+b;
 frmMain.nz186 := -5+b;
 frmMain.nz187 := -5+b;
 frmMain.nz188 := -5+b;
 frmMain.nz189 := -7+b;
 frmMain.nz190 := -7+b;
 frmMain.nz191 := -7+b;
 frmMain.nz192 := -7+b;
 frmMain.nz193 := -9+b;
 frmMain.nz194 := -9+b;
 frmMain.nz195 := -9+b;
 frmMain.nz196 := -9+b;
 frmMain.nz197 := -11+b;
 frmMain.nz198 := -11+b;
 frmMain.nz199 := -11+b;
 frmMain.nz200 := -11+b;
 frmMain.nz201 := -13+b;
 frmMain.nz202 := -13+b;
 frmMain.nz203 := -13+b;
 frmMain.nz204 := -13+b;
 frmMain.nz205 := -4+b;  //корабль
 frmMain.nz206 := -8+b;  //Подлодка
 frmMain.nz215 := -12+b;
 frmMain.frmGL.Width:=800;
 b:=0;

 end;






end;

procedure TForm1.Timer1Timer(Sender: TObject);
begin
//Button1.Click;
end;

end.
