Добавил:
Upload Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
Скачиваний:
6
Добавлен:
09.03.2016
Размер:
1.25 Кб
Скачать
program battle;
uses
crt,graph;
var
i,j,c:integer;
tx,ty,tx1,ty1,x,y,w,x1,y1,x2,y2,mx,my:integer;
grdriver,grmode,errcode:integer;
begin
grdriver := detect;
initgraph(grdriver,grmode,'d:\tp70\tp70\bgi');
errcode:=graphresult;
if errcode<>grok then begin
writeln('graphics error:',grapherrormsg(errcode));
halt;
end;
mx:=getmaxx;
my:=getmaxy;
c:=getmaxcolor;
rectangle(0,0,mx,my);
circle(30,450,28);
tx:=55;
ty:=438;
line(tx,ty,tx+80,ty-60);
tx1:=45;
ty1:=426;
line(tx1,ty1,tx1+80,ty1-60);
line(tx+80,ty-60,tx1+80,ty1-60);
line(67,465,50,400);
line(50,400,30,380);
rectangle(490,430,560,my-1);
line(490,430,525,390);
line(560,430,525,390);
for i:=135 downto 35 do begin
x:=trunc(300-230*sin((i-90)*pi/180));
y:=trunc(my+50-230*cos((i-90)*pi/180));
setcolor(c);
circle(x,y,10);
delay(10);
setcolor(0);
circle(x,y,10);
end;
setcolor(black);
line(490,430,525,390);
line(560,430,525,390);
for j:=1 to 150 do begin
setcolor(white);
line(490,430,560,430);
line(490+j,430,525+j,390);
line(560+j,430,525+j,390);
line(490+j,430,560+j,430);
delay(20);
setcolor(black);
line(490+j,430,525+j,390);
line(560+j,430,525+j,390);
line(490+j,430,560+j,430);
end;
readkey;
closegraph;
end.
Соседние файлы в папке graph