Advertisement
Gromov

bio

Dec 19th, 2018
270
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 11.38 KB | None | 0 0
  1. program bio1;
  2. Uses GRAPH,CRT;
  3. var
  4. d,m:smallint;
  5. c:char;
  6. a,b,e:integer;
  7. point:array [1..3] of real;
  8. x,x1,x2,x3,y,y1,y2,y3,M1,M2,M3:integer;
  9. P1,P2,P3,TX1,TY1,TX2,TY2,TX3,TY3:Integer;
  10. procedure rep;
  11. var
  12. m:integer;
  13. begin
  14. SetFillStyle(1,16); //extra laps
  15. setcolor(black);
  16. circle(450,175,20);
  17. for m:=1 to 125 do
  18. begin
  19. setcolor(white);
  20. circle(450+m,175,20);
  21. setcolor(black);
  22. delay(1);
  23. circle(450+m,175,20);
  24. end;
  25.  
  26. for m:=1 to 195 do
  27. begin
  28. setcolor(white);
  29. circle(575,175+m,20);
  30. setcolor(black);
  31. delay(1);
  32. circle(575,175+m,20);
  33. end;
  34.  
  35. for m:=1 to 250 do
  36. begin
  37. setcolor(white);
  38. circle(575-m,375,20);
  39. setcolor(black);
  40. delay(1);
  41. circle(575-m,375,20);
  42. end;
  43.  
  44. for m:=1 to 195 do
  45. begin
  46. setcolor(white);
  47. circle(325,370-m,20);
  48. setcolor(black);
  49. delay(1);
  50. circle(325,370-m,20);
  51. end;
  52.  
  53. for m:=1 to 125 do
  54. begin
  55. setcolor(white);
  56. circle(325+m,175,20);
  57. setcolor(black);
  58. delay(1);
  59. circle(325+m,175,20);
  60. end;
  61.  
  62. end;
  63.  
  64. begin
  65. Initgraph(d,m,'');
  66. SetFillStyle(1,15);
  67. randomize;
  68.  
  69. line(200,200,300,200); //main
  70. line(300,200,300,400);
  71. line(300,400,600,400);
  72. line(600,400,600,200);
  73. line(600,200,800,200);
  74. line(800,200,800,600);
  75. line(800,600,200,600);
  76. line(200,600,200,200);
  77.  
  78. line(350,200,350,350); //cube
  79. line(350,350,550,350);
  80. line(550,350,550,200);
  81. line(550,200,350,200);
  82.  
  83. line(150,150,150,650); //external
  84. line(150,650,850,650);
  85. line(850,650,850,150);
  86. line(850,150,150,150);
  87.  
  88. line(350,150,350,125); //extra
  89. line(350,125,550,125);
  90. line(550,125,550,150);
  91.  
  92. circle(400,50,20); //target
  93. circle(450,50,20);
  94. circle(500,50,20);
  95. fillellipse(400,50,5,5);
  96. fillellipse(450,50,5,5);
  97. fillellipse(500,50,5,5);
  98.  
  99. setFillStyle(1,red);
  100. bar(620,600,630,575); //start
  101. bar(620,650,630,675);
  102.  
  103.  
  104. line(300,750,400,750); //house
  105. line(400,750,400,850);
  106. line(400,850,300,850);
  107. line(300,850,300,750);
  108. line(300,750,350,700);
  109. line(350,700,400,750);
  110.  
  111. line(340,790,360,790); //window
  112. line(340,830,360,830);
  113. line(340,790,340,830);
  114. line(360,790,360,830);
  115. line(350,790,350,830);
  116.  
  117. rectangle(25,150,75,950); //Tribune
  118. circle(50,175,5);
  119. setfillstyle(1,11);
  120. fillEllipse(50,175, 10, 10);
  121. circle(50,225,5);
  122. setfillstyle(2,10);
  123. fillEllipse(50,225, 10, 10);
  124. circle(50,275,5);
  125. setfillstyle(3,12);
  126. fillEllipse(50,275, 10, 10);
  127. circle(50,325,5);
  128. setfillstyle(4,13);
  129. fillEllipse(50,325, 10, 10);
  130. circle(50,375,5);
  131. setfillstyle(5,6);
  132. fillEllipse(50,375, 10, 10);
  133. circle(50,425,5);
  134. setfillstyle(6,8);
  135. fillEllipse(50,425, 10, 10);
  136. circle(50,475,5);
  137. setfillstyle(7,3);
  138. fillEllipse(50,475, 10, 10);
  139. circle(50,525,5);
  140. setfillstyle(7,2);
  141. fillEllipse(50,525, 10, 10);
  142. circle(50,575,5);
  143. setfillstyle(3,9);
  144. fillEllipse(50,575, 10, 10);
  145. circle(50,625,5);
  146. setfillstyle(6,1);
  147. fillEllipse(50,625, 10, 10);
  148. circle(50,675,5);
  149. setfillstyle(2,7);
  150. fillEllipse(50,675, 10, 10);
  151. circle(50,725,5);
  152. setfillstyle(8,5);
  153. fillEllipse(50,725, 10, 10);
  154. circle(50,775,5);
  155. setfillstyle(5,15);
  156. fillEllipse(50,775, 10, 10);
  157. circle(50,825,5);
  158. setfillstyle(1,12);
  159. fillEllipse(50,825, 10, 10);
  160. circle(50,875,5);
  161. setfillstyle(2,7);
  162. fillEllipse(50,875, 10, 10);
  163. circle(50,925,5);
  164. setfillstyle(3,6);
  165. fillEllipse(50,925, 10, 10);
  166. rectangle(75,950,125,150);
  167. circle(100,175,5);
  168. setfillstyle(4,16);
  169. fillEllipse(100,175, 10, 10);
  170. circle(100,225,5);
  171. setfillstyle(5,13);
  172. fillEllipse(100,225, 10, 10);
  173. circle(100,275,5);
  174. setfillstyle(6,12);
  175. fillEllipse(100,275, 10, 10);
  176. circle(100,325,5);
  177. setfillstyle(7,13);
  178. fillEllipse(100,325, 10, 10);
  179. circle(100,375,5);
  180. setfillstyle(8,11);
  181. fillEllipse(100,375, 10, 10);
  182. circle(100,425,5);
  183. setfillstyle(2,4);
  184. fillEllipse(100,425, 10, 10);
  185. circle(100,475,5);
  186. setfillstyle(5,7);
  187. fillEllipse(100,475, 10, 10);
  188. circle(100,525,5);
  189. setfillstyle(4,8);
  190. fillEllipse(100,525, 10, 10);
  191. circle(100,575,5);
  192. setfillstyle(2,8);
  193. fillEllipse(100,575, 10, 10);
  194. circle(100,625,5);
  195. setfillstyle(5,15);
  196. fillEllipse(100,625, 10, 10);
  197. circle(100,675,5);
  198. setfillstyle(4,16);
  199. fillEllipse(100,675, 10, 10);
  200. circle(100,725,5);
  201. setfillstyle(5,11);
  202. fillEllipse(100,725, 10, 10);
  203. circle(100,775,5);
  204. setfillstyle(1,9);
  205. fillEllipse(100,775, 10, 10);
  206. circle(100,825,5);
  207. setfillstyle(6,6);
  208. fillEllipse(100,825, 10, 10);
  209. circle(100,875,5);
  210. setfillstyle(4,10);
  211. fillEllipse(100,875, 10, 10);
  212. circle(100,925,5);
  213. setfillstyle(5,7);
  214. fillEllipse(100,925, 10, 10);
  215.  
  216. circle(400,450,5); //extra people
  217. setfillstyle(6,1);
  218. fillEllipse(400,450, 10, 10);
  219. circle(430,455,5);
  220. setfillstyle(6,6);
  221. fillEllipse(430,455, 10, 10);
  222.  
  223. for a:=1 to 7 do
  224. begin
  225. b:=a*30;
  226. circle(650,220+b,5);
  227. setfillstyle(1+a,1+a);
  228. fillEllipse(650,220+b, 10, 10);
  229. end;
  230. for a:=1 to 7 do
  231. begin
  232. b:=a*30;
  233. circle(250,220+b,5);
  234. setfillstyle(8-a,8-a);
  235. fillEllipse(250,220+b, 10, 10);
  236. end;
  237.  
  238. setFillStyle(1,brown); //tree
  239. setcolor(black);
  240. bar(700,730,720,760);
  241. setFillStyle(1,green);
  242. setcolor(black);
  243. fillellipse(710,680,15,15);
  244. setcolor(green);
  245. fillellipse(710,705,30,30);
  246.  
  247. setFillStyle(1,brown);
  248. setcolor(black);
  249. bar(700,730,720,760);
  250. setFillStyle(1,green);
  251. setcolor(black);
  252. fillellipse(710,680,15,15);
  253. setcolor(green);
  254. fillellipse(710,705,30,30);
  255.  
  256. setFillStyle(1,brown);
  257. setcolor(black);
  258. bar(500,530,520,560);
  259. setFillStyle(1,green);
  260. setcolor(black);
  261. fillellipse(510,480,15,15);
  262. setcolor(green);
  263. fillellipse(510,505,30,30);
  264.  
  265. setFillStyle(1,brown);
  266. setcolor(black);
  267. bar(600,530,620,560);
  268. setFillStyle(1,green);
  269. setcolor(black);
  270. fillellipse(610,480,15,15);
  271. setcolor(green);
  272. fillellipse(610,505,30,30);
  273.  
  274. setFillStyle(1,brown);
  275. setcolor(black);
  276. bar(900,120,920,150);
  277. setFillStyle(1,green);
  278. setcolor(black);
  279. fillellipse(910,70,15,15);
  280. setcolor(green);
  281. fillellipse(910,95,30,30);
  282.  
  283. setFillStyle(1,brown);
  284. setcolor(black);
  285. bar(900,120+120,920,150+120);
  286. setFillStyle(1,green);
  287. setcolor(black);
  288. fillellipse(910,70+120,15,15);
  289. setcolor(green);
  290. fillellipse(910,95+120,30,30);
  291.  
  292. for b:=1 to 7 do
  293. begin
  294. a:=b*120;
  295. setFillStyle(1,brown);
  296. setcolor(black);
  297. bar(900,120+a,920,150+a);
  298. setFillStyle(1,green);
  299. setcolor(black);
  300. fillellipse(910,70+a,15,15);
  301. setcolor(green);
  302. fillellipse(910,95+a,30,30);
  303. end;
  304.  
  305. setcolor(RED); //text
  306. settextstyle(1,HorizDir,5);
  307. outtextxy(200,900,'RTK SPORT EVENT 2019');
  308.  
  309. setcolor(RED);
  310. settextstyle(1,HorizDir,5);
  311. outtextxy(30,50,'WELCOME!');
  312.  
  313. setcolor(RED);
  314. settextstyle(1,HorizDir,2);
  315. outtextxy(640,580,'START');
  316.  
  317.  
  318.  
  319.  
  320. SetFillStyle(1,16);
  321. setcolor(black);
  322.  
  323. for b:=1 to 475 do //moving
  324. begin
  325. setcolor(white);
  326. circle(650-b,625,20);
  327. setcolor(black);
  328. delay(1);
  329. circle(650-b, 625, 20);
  330. end;
  331.  
  332. for b:=1 to 450 do
  333. begin
  334. setcolor(white);
  335. circle(175,625-b,20);
  336. setcolor(black);
  337. delay(1);
  338. circle(175,625-b,20);
  339. end;
  340.  
  341. for b:=1 to 275 do
  342. begin
  343. setcolor(white);
  344. circle(175+b,175,20);
  345. setcolor(black);
  346. delay(1);
  347. circle(175+b,175,20);
  348. end;
  349. setcolor(white);
  350. circle(450,175,20);
  351. //Shooting
  352.  
  353. writeln('Ievadi X(1-33) un Y(1-33) koordinatus');
  354. Readln(x1);
  355. readln(y1);
  356. if (x1>=1) and (x1<=10) then begin
  357. TX1:=1;
  358. end
  359. ELSE IF(x1<1) and (x1>10) then begin //first shot
  360. TX1:=0;
  361. END;
  362. IF (y1>=1) and (y1<=10) then begin
  363. TY1:=1;
  364. end
  365. ELSE IF(y1<1) and (y1>10) then begin
  366. TY1:=0;
  367. END;
  368. begin
  369. P1:= TY1+TX1;
  370. end;
  371. IF(P1=2)THEN BEGIN setfillstyle(1,red);
  372. fillEllipse(400,50, 20, 20);
  373. M1:=0
  374. END
  375. ELSE IF (P1<4) THEN BEGIN
  376. M1:=1;
  377. END;
  378. Writeln(' Koordinats 11-33(X),11-33(Y) ! ');
  379. Readln(x2);
  380. readln(y2);
  381. if (x2>=11) and (x2<=20) then begin //second shot
  382. TX2:=1;
  383. end
  384. ELSE IF(x2<11) and (x2>20) then begin
  385. TX2:=0;
  386. END;
  387. IF (y2>=11) and (y2<=20) then begin
  388. TY2:=1;
  389. end
  390. ELSE IF(y2<11) and (y2>20) then begin
  391. TY2:=0; END; begin
  392. P2:= TY2+TX2;
  393. end;
  394. IF(P2=2)THEN BEGIN setfillstyle(1,red);
  395. fillEllipse(450,50, 20, 20);
  396. M2:=0
  397.  
  398. END
  399. ELSE IF (P2<4) THEN BEGIN
  400. M2:=1;
  401. END;
  402. Writeln(' Koordinats 21-44(X),21-44(Y) ! ');
  403. Readln(x3);
  404. readln(y3);
  405. if (x3>=21) and (x3<=30) then begin
  406. TX3:=1;
  407. end
  408. ELSE IF(x3<21) and (x3>30) then begin //third shot
  409. TX3:=0;
  410. END;
  411. IF (y3>=21) and (y3<=30) then begin
  412. TY3:=1;
  413. end
  414. ELSE IF(y3<21) and (y3>30) then begin
  415. TY3:=0;
  416. END;
  417. begin
  418. P3:= TY3+TX3;
  419. end;
  420. IF(P3=2)THEN BEGIN
  421. setfillstyle(1,red);
  422. fillEllipse(500,50,20,20);
  423. M3:=0
  424. END //Penalty points
  425. ELSE IF (P3<4) THEN BEGIN M3:=1;
  426. END;
  427. IF (M3+M2+M1=0) THEN BEGIN
  428. WRITELN('WELL DONE!');
  429. setcolor(black);
  430. circle(450,175,20);
  431. setcolor(RED);
  432. settextstyle(1,HorizDir,13);
  433. outtextxy(370,230,'=)');
  434. end
  435. ELSE IF (M3+M2+M1=1) THEN BEGIN
  436. writeln('Jus nokavejat, tapec jums ir soda punkts');
  437. setcolor(RED);
  438. settextstyle(1,HorizDir,13);
  439. outtextxy(410,230,'1');
  440. rep;
  441. end
  442. ELSE IF (M3+M2+M1=2) THEN BEGIN
  443. writeln('Jus nokavejat 2 reizes, tapec jums ir 2 soda punkti');
  444. setcolor(RED);
  445. settextstyle(1,HorizDir,13);
  446. outtextxy(410,230,'2');
  447. rep;
  448. rep;
  449. end
  450. ELSE IF (M3+M2+M1=3) THEN BEGIN
  451. writeln('Jus nokavejat 3 reizes, tapec jums ir 3 soda punkti');
  452. setcolor(RED);
  453. settextstyle(1,HorizDir,13);
  454. outtextxy(410,230,'3');
  455. rep;
  456. rep;
  457. rep;
  458. end; //moving final
  459.  
  460.  
  461. for b:=1 to 375 do
  462. begin
  463. setcolor(white);
  464. circle(450+b,175,20);
  465. setcolor(black);
  466. delay(1);
  467. circle(450+b,175,20);
  468. end;
  469. for b:=1 to 455 do
  470. begin
  471. setcolor(white);
  472. circle(825,170+b,20);
  473. setcolor(black);
  474. delay(1);
  475. circle(825,170+b,20);
  476.  
  477. end;
  478. for b:=1 to 200 do
  479. begin
  480. setcolor(white);
  481. circle(825-b,625,20);
  482. setcolor(black);
  483. delay(1);
  484. circle(825-b,625,20);
  485. end;
  486. setcolor(white);
  487. circle(625,625,20);
  488. writeln('FINISH!'); //final
  489. readln;
  490. closegraph;
  491. end.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement