Создание игры "Морской бой"

Автор работы: Пользователь скрыл имя, 26 Октября 2010 в 17:19, Не определен

Описание работы

Игрушка, созданная на языке Delphi

Файлы: 26 файлов

BMBACK.bmp

— 111.40 Кб (Скачать файл)

BMBMENU.jpg

— 12.91 Кб (Скачать файл)

morb.cnt

— 74 байт (Скачать файл)

morb.GID

— 10.57 Кб (Скачать файл)

morb.HLP

— 1.15 Мб (Скачать файл)

morb.ico

— 766 байт (Скачать файл)

Project1.cfg

— 434 байт (Скачать файл)

Project1.dof

— 2.24 Кб (Скачать файл)

Project1.dpr

— 419 байт (Скачать файл)

Project1.res

— 876 байт (Скачать файл)

Project1.~dpr

— 263 байт (Скачать файл)

Unit1.dcu

— 31.99 Кб (Скачать файл)

Unit1.ddp

— 51 байт (Скачать файл)

Unit1.dfm

— 5.70 Кб (Скачать файл)

Unit1.pas

— 35.84 Кб (Скачать файл)

Unit1.~ddp

— 51 байт (Скачать файл)

Unit1.~dfm

— 5.70 Кб (Скачать файл)

Unit1.~pas

— 35.86 Кб (Скачать файл)

Unit2.dcu

— 4.08 Кб (Скачать файл)

Unit2.ddp

— 51 байт (Скачать файл)

Unit2.dfm

— 29.88 Кб (Скачать файл)

Unit2.pas

— 798 байт (Скачать файл)

Unit2.~ddp

— 51 байт (Скачать файл)

Unit2.~dfm

— 29.72 Кб (Скачать файл)

Unit2.~pas

— 658 байт (Скачать файл)

Курсовая по Delphi.doc

— 487.00 Кб (Скачать файл)

                           (b2[m+1,n+2]<>2) and

                           (b2[m-1,n+2]<>2) and

                           (b2[m,n+2]<>2) and 
 

                           (b2[m+1,n+3]<>2) and

                           (b2[m-1,n+3]<>2) and

                           (b2[m,n+3]<>2) and 

                           (b2[m,n+3]<>2)  then

                              begin 

                          for i:=0 to 2 do

                          b2[m,n+i]:=2;

                            m3:=m3+1

                              end;

                  end 

     end;

   8..10:

     case m of

      1..7: case z of

                 0:  if   (b2[m,n]<>2) and

                           (b2[m+1,n+1]<>2) and

                           (b2[m,n+1]<>2) and

                           (b2[m-1,n+1]<>2) and

                           (b2[m-1,n]<>2)and

                           (b2[m-1,n-1]<>2)and

                           (b2[m,n-1]<>2) and

                           (b2[m+1,n-1]<>2) and 

                           (b2[m+2,n-1]<>2) and

                           (b2[m+2,n+1]<>2) and

                           (b2[m+2,n]<>2) and 

                           (b2[m+3,n-1]<>2) and

                           (b2[m+3,n+1]<>2) and 

                           (b2[m+3,n]<>2)  then begin

                          for i:=0 to 2 do

                             b2[m+i,n]:=2;

                             m3:=m3+1

                                            end;

                 1:     if  (b2[m,n]<>2) and

                           (b2[m-1,n-1]<>2) and

                           (b2[m-1,n]<>2) and

                           (b2[m-1,n+1]<>2) and

                           (b2[m,n-1]<>2)and

                           (b2[m+1,n+1]<>2)and

                           (b2[m+1,n]<>2) and

                           (b2[m+1,n-1]<>2) and 

                           (b2[m+1,n-2]<>2) and

                           (b2[m-1,n-2]<>2) and

                           (b2[m,n-2]<>2) and 

                           (b2[m+1,n-3]<>2) and

                           (b2[m-1,n-3]<>2) and 

                           (b2[m,n-3]<>2)  then

                              begin

                          for i:=0 to 2 do

                             b2[m,n-i]:=2;

                                m3:=m3+1

                              end

                  end; 

      8..10: case z of

                 0:    if  (b2[m,n]<>2) and

                           (b2[m-1,n-1]<>2) and

                           (b2[m-1,n]<>2) and

                           (b2[m-1,n+1]<>2) and

                           (b2[m,n-1]<>2)and

                           (b2[m+1,n+1]<>2)and

                           (b2[m+1,n]<>2) and

                           (b2[m+1,n-1]<>2) and 

                           (b2[m+1,n-2]<>2) and

                           (b2[m-1,n-2]<>2) and

                           (b2[m,n-2]<>2) and 

                           (b2[m+1,n-3]<>2) and

                           (b2[m-1,n-3]<>2) and 

                           (b2[m,n-3]<>2)  then

                              begin

                          for i:=0 to 2 do

                             b2[m,n-i]:=2;

                                m3:=m3+1

                              end;

                 1: if     (b2[m,n]<>2) and

                           (b2[m+1,n+1]<>2) and

                           (b2[m,n+1]<>2) and

                           (b2[m-1,n+1]<>2) and

                           (b2[m-1,n]<>2)and

                           (b2[m-1,n-1]<>2)and

                           (b2[m,n-1]<>2) and

                           (b2[m+1,n-1]<>2) and 

                           (b2[m-2,n-1]<>2) and

                           (b2[m-2,n+1]<>2) and

                           (b2[m-2,n]<>2) and 

                           (b2[m-3,n-1]<>2) and

                           (b2[m-3,n+1]<>2) and 

                           (b2[m-3,n]<>2)  then

                       begin

                          for i:=0 to 2 do

                             b2[m-i,n]:=2;

                               m3:=m3+1

                      end 

                  end 

      end 

end 

end; 

//двухпалубные

while m2<3 do begin

  m:=random(10)+1;

  n:=random(10)+1;

  z:=(random(100) mod 2); 
 

case n of

  1..8:

    case m of

      1..8: case z of

                 0:    if  (b2[m,n]<>2) and

                           (b2[m-1,n-1]<>2) and

                           (b2[m-1,n]<>2) and

                           (b2[m-1,n+1]<>2) and

                           (b2[m,n-1]<>2)and

                           (b2[m+1,n+1]<>2)and

                           (b2[m+1,n]<>2) and

                           (b2[m+1,n-1]<>2) and

                           (b2[m,n+1]<>2) and 

                           (b2[m+1,n+2]<>2) and

                           (b2[m-1,n+2]<>2) and

                           (b2[m,n+2]<>2)  then

                              begin 

                          for i:=0 to 1 do

                          b2[m,n+i]:=2;

                            m2:=m2+1

                              end;

                   1:  if  (b2[m,n]<>2) and

                           (b2[m+1,n+1]<>2) and

                           (b2[m,n+1]<>2) and

                           (b2[m-1,n+1]<>2) and

                           (b2[m-1,n]<>2)and

                           (b2[m-1,n-1]<>2)and

                           (b2[m,n-1]<>2) and

                           (b2[m+1,n-1]<>2) and

                           (b2[m+1,n]<>2) and 

                           (b2[m+2,n-1]<>2) and

                           (b2[m+2,n+1]<>2) and

                           (b2[m+2,n]<>2)  then  begin

                          for i:=0 to 1 do

                             b2[m+i,n]:=2;

                             m2:=m2+1

                                                  end

            end;

      9..10: case z of

                 0: if     (b2[m,n]<>2) and

                           (b2[m+1,n+1]<>2) and

                           (b2[m,n+1]<>2) and

                           (b2[m-1,n+1]<>2) and

                           (b2[m-1,n]<>2)and

                           (b2[m-1,n-1]<>2)and

                           (b2[m,n-1]<>2) and

                           (b2[m+1,n-1]<>2) and 

                           (b2[m-2,n-1]<>2) and

                           (b2[m-2,n+1]<>2) and

                           (b2[m-2,n]<>2)  then

                       begin

                          for i:=0 to 1 do

                             b2[m-i,n]:=2;

                               m2:=m2+1

                      end; 

                   1:    if  (b2[m,n]<>2) and

                           (b2[m-1,n-1]<>2) and

                           (b2[m-1,n]<>2) and

                           (b2[m-1,n+1]<>2) and

                           (b2[m,n-1]<>2)and

                           (b2[m+1,n+1]<>2)and

                           (b2[m+1,n]<>2) and

                           (b2[m+1,n-1]<>2) and

                           (b2[m,n+1]<>2) and 

                           (b2[m+1,n+2]<>2) and

                           (b2[m-1,n+2]<>2) and

                           (b2[m,n+2]<>2)  then

                              begin 

                          for i:=0 to 1 do

                          b2[m,n+i]:=2;

                            m2:=m2+1

                              end;

                  end 

     end;

   9..10:

Информация о работе Создание игры "Морской бой"