Advertisement
Gromov

Untitled

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