Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- program bio1;
- Uses GRAPH,CRT;
- var
- d,m:smallint;
- c:char;
- a,b,e:integer;
- point:array [1..3] of real;
- x,x1,x2,x3,y,y1,y2,y3,M1,M2,M3:integer;
- P1,P2,P3,TX1,TY1,TX2,TY2,TX3,TY3:Integer;
- procedure rep;
- var
- m:integer;
- begin
- SetFillStyle(1,16); //extra laps
- setcolor(black);
- circle(450,175,20);
- for m:=1 to 125 do
- begin
- setcolor(white);
- circle(450+m,175,20);
- setcolor(black);
- delay(1);
- circle(450+m,175,20);
- end;
- for m:=1 to 195 do
- begin
- setcolor(white);
- circle(575,175+m,20);
- setcolor(black);
- delay(1);
- circle(575,175+m,20);
- end;
- for m:=1 to 250 do
- begin
- setcolor(white);
- circle(575-m,375,20);
- setcolor(black);
- delay(1);
- circle(575-m,375,20);
- end;
- for m:=1 to 195 do
- begin
- setcolor(white);
- circle(325,370-m,20);
- setcolor(black);
- delay(1);
- circle(325,370-m,20);
- end;
- for m:=1 to 125 do
- begin
- setcolor(white);
- circle(325+m,175,20);
- setcolor(black);
- delay(1);
- circle(325+m,175,20);
- end;
- end;
- begin
- Initgraph(d,m,'');
- SetFillStyle(1,15);
- randomize;
- line(200,200,300,200); //main
- line(300,200,300,400);
- line(300,400,600,400);
- line(600,400,600,200);
- line(600,200,800,200);
- line(800,200,800,600);
- line(800,600,200,600);
- line(200,600,200,200);
- line(350,200,350,350); //cube
- line(350,350,550,350);
- line(550,350,550,200);
- line(550,200,350,200);
- line(150,150,150,650); //external
- line(150,650,850,650);
- line(850,650,850,150);
- line(850,150,150,150);
- line(350,150,350,125); //extra
- line(350,125,550,125);
- line(550,125,550,150);
- circle(400,50,20); //target
- circle(450,50,20);
- circle(500,50,20);
- fillellipse(400,50,5,5);
- fillellipse(450,50,5,5);
- fillellipse(500,50,5,5);
- setFillStyle(1,red);
- bar(620,600,630,575); //start
- bar(620,650,630,675);
- line(300,750,400,750); //house
- line(400,750,400,850);
- line(400,850,300,850);
- line(300,850,300,750);
- line(300,750,350,700);
- line(350,700,400,750);
- line(340,790,360,790); //window
- line(340,830,360,830);
- line(340,790,340,830);
- line(360,790,360,830);
- line(350,790,350,830);
- rectangle(25,150,75,950); //Tribune
- circle(50,175,5);
- setfillstyle(1,11);
- fillEllipse(50,175, 10, 10);
- circle(50,225,5);
- setfillstyle(2,10);
- fillEllipse(50,225, 10, 10);
- circle(50,275,5);
- setfillstyle(3,12);
- fillEllipse(50,275, 10, 10);
- circle(50,325,5);
- setfillstyle(4,13);
- fillEllipse(50,325, 10, 10);
- circle(50,375,5);
- setfillstyle(5,6);
- fillEllipse(50,375, 10, 10);
- circle(50,425,5);
- setfillstyle(6,8);
- fillEllipse(50,425, 10, 10);
- circle(50,475,5);
- setfillstyle(7,3);
- fillEllipse(50,475, 10, 10);
- circle(50,525,5);
- setfillstyle(7,2);
- fillEllipse(50,525, 10, 10);
- circle(50,575,5);
- setfillstyle(3,9);
- fillEllipse(50,575, 10, 10);
- circle(50,625,5);
- setfillstyle(6,1);
- fillEllipse(50,625, 10, 10);
- circle(50,675,5);
- setfillstyle(2,7);
- fillEllipse(50,675, 10, 10);
- circle(50,725,5);
- setfillstyle(8,5);
- fillEllipse(50,725, 10, 10);
- circle(50,775,5);
- setfillstyle(5,15);
- fillEllipse(50,775, 10, 10);
- circle(50,825,5);
- setfillstyle(1,12);
- fillEllipse(50,825, 10, 10);
- circle(50,875,5);
- setfillstyle(2,7);
- fillEllipse(50,875, 10, 10);
- circle(50,925,5);
- setfillstyle(3,6);
- fillEllipse(50,925, 10, 10);
- rectangle(75,950,125,150);
- circle(100,175,5);
- setfillstyle(4,16);
- fillEllipse(100,175, 10, 10);
- circle(100,225,5);
- setfillstyle(5,13);
- fillEllipse(100,225, 10, 10);
- circle(100,275,5);
- setfillstyle(6,12);
- fillEllipse(100,275, 10, 10);
- circle(100,325,5);
- setfillstyle(7,13);
- fillEllipse(100,325, 10, 10);
- circle(100,375,5);
- setfillstyle(8,11);
- fillEllipse(100,375, 10, 10);
- circle(100,425,5);
- setfillstyle(2,4);
- fillEllipse(100,425, 10, 10);
- circle(100,475,5);
- setfillstyle(5,7);
- fillEllipse(100,475, 10, 10);
- circle(100,525,5);
- setfillstyle(4,8);
- fillEllipse(100,525, 10, 10);
- circle(100,575,5);
- setfillstyle(2,8);
- fillEllipse(100,575, 10, 10);
- circle(100,625,5);
- setfillstyle(5,15);
- fillEllipse(100,625, 10, 10);
- circle(100,675,5);
- setfillstyle(4,16);
- fillEllipse(100,675, 10, 10);
- circle(100,725,5);
- setfillstyle(5,11);
- fillEllipse(100,725, 10, 10);
- circle(100,775,5);
- setfillstyle(1,9);
- fillEllipse(100,775, 10, 10);
- circle(100,825,5);
- setfillstyle(6,6);
- fillEllipse(100,825, 10, 10);
- circle(100,875,5);
- setfillstyle(4,10);
- fillEllipse(100,875, 10, 10);
- circle(100,925,5);
- setfillstyle(5,7);
- fillEllipse(100,925, 10, 10);
- circle(400,450,5); //extra people
- setfillstyle(6,1);
- fillEllipse(400,450, 10, 10);
- circle(430,455,5);
- setfillstyle(6,6);
- fillEllipse(430,455, 10, 10);
- for a:=1 to 7 do
- begin
- b:=a*30;
- circle(650,220+b,5);
- setfillstyle(1+a,1+a);
- fillEllipse(650,220+b, 10, 10);
- end;
- for a:=1 to 7 do
- begin
- b:=a*30;
- circle(250,220+b,5);
- setfillstyle(8-a,8-a);
- fillEllipse(250,220+b, 10, 10);
- end;
- setFillStyle(1,brown); //tree
- setcolor(black);
- bar(700,730,720,760);
- setFillStyle(1,green);
- setcolor(black);
- fillellipse(710,680,15,15);
- setcolor(green);
- fillellipse(710,705,30,30);
- setFillStyle(1,brown);
- setcolor(black);
- bar(700,730,720,760);
- setFillStyle(1,green);
- setcolor(black);
- fillellipse(710,680,15,15);
- setcolor(green);
- fillellipse(710,705,30,30);
- setFillStyle(1,brown);
- setcolor(black);
- bar(500,530,520,560);
- setFillStyle(1,green);
- setcolor(black);
- fillellipse(510,480,15,15);
- setcolor(green);
- fillellipse(510,505,30,30);
- setFillStyle(1,brown);
- setcolor(black);
- bar(600,530,620,560);
- setFillStyle(1,green);
- setcolor(black);
- fillellipse(610,480,15,15);
- setcolor(green);
- fillellipse(610,505,30,30);
- setFillStyle(1,brown);
- setcolor(black);
- bar(900,120,920,150);
- setFillStyle(1,green);
- setcolor(black);
- fillellipse(910,70,15,15);
- setcolor(green);
- fillellipse(910,95,30,30);
- setFillStyle(1,brown);
- setcolor(black);
- bar(900,120+120,920,150+120);
- setFillStyle(1,green);
- setcolor(black);
- fillellipse(910,70+120,15,15);
- setcolor(green);
- fillellipse(910,95+120,30,30);
- for b:=1 to 7 do
- begin
- a:=b*120;
- setFillStyle(1,brown);
- setcolor(black);
- bar(900,120+a,920,150+a);
- setFillStyle(1,green);
- setcolor(black);
- fillellipse(910,70+a,15,15);
- setcolor(green);
- fillellipse(910,95+a,30,30);
- end;
- setcolor(RED); //text
- settextstyle(1,HorizDir,5);
- outtextxy(200,900,'RTK SPORT EVENT 2019');
- setcolor(RED);
- settextstyle(1,HorizDir,5);
- outtextxy(30,50,'WELCOME!');
- setcolor(RED);
- settextstyle(1,HorizDir,2);
- outtextxy(640,580,'START');
- SetFillStyle(1,16);
- setcolor(black);
- for b:=1 to 475 do //moving
- begin
- setcolor(white);
- circle(650-b,625,20);
- setcolor(black);
- delay(1);
- circle(650-b, 625, 20);
- end;
- for b:=1 to 450 do
- begin
- setcolor(white);
- circle(175,625-b,20);
- setcolor(black);
- delay(1);
- circle(175,625-b,20);
- end;
- for b:=1 to 275 do
- begin
- setcolor(white);
- circle(175+b,175,20);
- setcolor(black);
- delay(1);
- circle(175+b,175,20);
- end;
- setcolor(white);
- circle(450,175,20);
- //Shooting
- writeln('Ievadi X(1-33) un Y(1-33) koordinatus');
- Readln(x1);
- readln(y1);
- if (x1>=1) and (x1<=10) then begin
- TX1:=1;
- end
- ELSE IF(x1<1) and (x1>10) then begin //first shot
- TX1:=0;
- END;
- IF (y1>=1) and (y1<=10) then begin
- TY1:=1;
- end
- ELSE IF(y1<1) and (y1>10) then begin
- TY1:=0;
- END;
- begin
- P1:= TY1+TX1;
- end;
- IF(P1=2)THEN BEGIN setfillstyle(1,red);
- fillEllipse(400,50, 20, 20);
- M1:=0
- END
- ELSE IF (P1<4) THEN BEGIN
- M1:=1;
- END;
- Writeln(' Koordinats 11-33(X),11-33(Y) ! ');
- Readln(x2);
- readln(y2);
- if (x2>=11) and (x2<=20) then begin //second shot
- TX2:=1;
- end
- ELSE IF(x2<11) and (x2>20) then begin
- TX2:=0;
- END;
- IF (y2>=11) and (y2<=20) then begin
- TY2:=1;
- end
- ELSE IF(y2<11) and (y2>20) then begin
- TY2:=0; END; begin
- P2:= TY2+TX2;
- end;
- IF(P2=2)THEN BEGIN setfillstyle(1,red);
- fillEllipse(450,50, 20, 20);
- M2:=0
- END
- ELSE IF (P2<4) THEN BEGIN
- M2:=1;
- END;
- Writeln(' Koordinats 21-44(X),21-44(Y) ! ');
- Readln(x3);
- readln(y3);
- if (x3>=21) and (x3<=30) then begin
- TX3:=1;
- end
- ELSE IF(x3<21) and (x3>30) then begin //third shot
- TX3:=0;
- END;
- IF (y3>=21) and (y3<=30) then begin
- TY3:=1;
- end
- ELSE IF(y3<21) and (y3>30) then begin
- TY3:=0;
- END;
- begin
- P3:= TY3+TX3;
- end;
- IF(P3=2)THEN BEGIN
- setfillstyle(1,red);
- fillEllipse(500,50,20,20);
- M3:=0
- END //Penalty points
- ELSE IF (P3<4) THEN BEGIN M3:=1;
- END;
- IF (M3+M2+M1=0) THEN BEGIN
- WRITELN('WELL DONE!');
- setcolor(black);
- circle(450,175,20);
- setcolor(RED);
- settextstyle(1,HorizDir,13);
- outtextxy(370,230,'=)');
- end
- ELSE IF (M3+M2+M1=1) THEN BEGIN
- writeln('Jus nokavejat, tapec jums ir soda punkts');
- setcolor(RED);
- settextstyle(1,HorizDir,13);
- outtextxy(410,230,'1');
- rep;
- end
- ELSE IF (M3+M2+M1=2) THEN BEGIN
- writeln('Jus nokavejat 2 reizes, tapec jums ir 2 soda punkti');
- setcolor(RED);
- settextstyle(1,HorizDir,13);
- outtextxy(410,230,'2');
- rep;
- rep;
- end
- ELSE IF (M3+M2+M1=3) THEN BEGIN
- writeln('Jus nokavejat 3 reizes, tapec jums ir 3 soda punkti');
- setcolor(RED);
- settextstyle(1,HorizDir,13);
- outtextxy(410,230,'3');
- rep;
- rep;
- rep;
- end; //moving final
- for b:=1 to 375 do
- begin
- setcolor(white);
- circle(450+b,175,20);
- setcolor(black);
- delay(1);
- circle(450+b,175,20);
- end;
- for b:=1 to 455 do
- begin
- setcolor(white);
- circle(825,170+b,20);
- setcolor(black);
- delay(1);
- circle(825,170+b,20);
- end;
- for b:=1 to 200 do
- begin
- setcolor(white);
- circle(825-b,625,20);
- setcolor(black);
- delay(1);
- circle(825-b,625,20);
- end;
- setcolor(white);
- circle(625,625,20);
- writeln('FINISH!'); //final
- readln;
- closegraph;
- end.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement