Advertisement
Gromov

Untitled

Dec 19th, 2018
159
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 9.49 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.  
  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. circle(450,175,20);
  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. //start
  100.  
  101. line(300,750,400,750); //house
  102. line(400,750,400,850);
  103. line(400,850,300,850);
  104. line(300,850,300,750);
  105. line(300,750,350,700);
  106. line(350,700,400,750);
  107.  
  108. line(340,790,360,790); //window
  109. line(340,830,360,830);
  110. line(340,790,340,830);
  111. line(360,790,360,830);
  112. line(350,790,350,830);
  113.  
  114. rectangle(25,150,75,950); //Tribune
  115. circle(50,175,5);
  116. setfillstyle(5,11);
  117. fillEllipse(50,175, 10, 10);
  118. circle(50,225,5);
  119. setfillstyle(4,10);
  120. fillEllipse(50,225, 10, 10);
  121. circle(50,275,5);
  122. setfillstyle(3,12);
  123. fillEllipse(50,275, 10, 10);
  124. circle(50,325,5);
  125. setfillstyle(2,13);
  126. fillEllipse(50,325, 10, 10);
  127. circle(50,375,5);
  128. setfillstyle(6,6);
  129. fillEllipse(50,375, 10, 10);
  130. circle(50,425,5);
  131. setfillstyle(1,8);
  132. fillEllipse(50,425, 10, 10);
  133. circle(50,475,5);
  134. setfillstyle(2,3);
  135. fillEllipse(50,475, 10, 10);
  136. circle(50,525,5);
  137. setfillstyle(7,2);
  138. fillEllipse(50,525, 10, 10);
  139. circle(50,575,5);
  140. setfillstyle(3,9);
  141. fillEllipse(50,575, 10, 10);
  142. circle(50,625,5);
  143. setfillstyle(6,1);
  144. fillEllipse(50,625, 10, 10);
  145. circle(50,675,5);
  146. setfillstyle(2,7);
  147. fillEllipse(50,675, 10, 10);
  148. circle(50,725,5);
  149. setfillstyle(8,5);
  150. fillEllipse(50,725, 10, 10);
  151. circle(50,775,5);
  152. setfillstyle(5,15);
  153. fillEllipse(50,775, 10, 10);
  154. circle(50,825,5);
  155. setfillstyle(2,12);
  156. fillEllipse(50,825, 10, 10);
  157. circle(50,875,5);
  158. setfillstyle(4,7);
  159. fillEllipse(50,875, 10, 10);
  160. circle(50,925,5);
  161. setfillstyle(6,6);
  162. fillEllipse(50,925, 10, 10);
  163. rectangle(75,950,125,150);
  164. circle(100,175,5);
  165. setfillstyle(4,16);
  166. fillEllipse(100,175, 10, 10);
  167. circle(100,225,5);
  168. setfillstyle(5,13);
  169. fillEllipse(100,225, 10, 10);
  170. circle(100,275,5);
  171. setfillstyle(3,12);
  172. fillEllipse(100,275, 10, 10);
  173. circle(100,325,5);
  174. setfillstyle(2,13);
  175. fillEllipse(100,325, 10, 10);
  176. circle(100,375,5);
  177. setfillstyle(6,11);
  178. fillEllipse(100,375, 10, 10);
  179. circle(100,425,5);
  180. setfillstyle(2,4);
  181. fillEllipse(100,425, 10, 10);
  182. circle(100,475,5);
  183. setfillstyle(5,7);
  184. fillEllipse(100,475, 10, 10);
  185. circle(100,525,5);
  186. setfillstyle(4,8);
  187. fillEllipse(100,525, 10, 10);
  188. circle(100,575,5);
  189. setfillstyle(2,8);
  190. fillEllipse(100,575, 10, 10);
  191. circle(100,625,5);
  192. setfillstyle(5,15);
  193. fillEllipse(100,625, 10, 10);
  194. circle(100,675,5);
  195. setfillstyle(4,16);
  196. fillEllipse(100,675, 10, 10);
  197. circle(100,725,5);
  198. setfillstyle(5,11);
  199. fillEllipse(100,725, 10, 10);
  200. circle(100,775,5);
  201. setfillstyle(1,9);
  202. fillEllipse(100,775, 10, 10);
  203. circle(100,825,5);
  204. setfillstyle(6,6);
  205. fillEllipse(100,825, 10, 10);
  206. circle(100,875,5);
  207. setfillstyle(4,10);
  208. fillEllipse(100,875, 10, 10);
  209. circle(100,925,5);
  210. setfillstyle(5,7);
  211. fillEllipse(100,925, 10, 10);
  212.  
  213. circle(400,450,5); //extra people
  214. setfillstyle(6,1);
  215. fillEllipse(400,450, 10, 10);
  216. circle(430,455,5);
  217. setfillstyle(6,6);
  218. fillEllipse(430,455, 10, 10);
  219. circle(390,330,5);
  220. setfillstyle(3,12);
  221. fillEllipse(390,330, 10, 10);
  222.  
  223. setFillStyle(1,brown); //tree
  224. setcolor(black);
  225. bar(700,730,720,760);
  226. setFillStyle(1,green);
  227. setcolor(black);
  228. fillellipse(710,680,15,15);
  229. setcolor(green);
  230. fillellipse(710,705,30,30);
  231.  
  232. setFillStyle(1,brown);
  233. setcolor(black);
  234. bar(700,730,720,760);
  235. setFillStyle(1,green);
  236. setcolor(black);
  237. fillellipse(710,680,15,15);
  238. setcolor(green);
  239. fillellipse(710,705,30,30);
  240.  
  241. setFillStyle(1,brown);
  242. setcolor(black);
  243. bar(500,530,520,560);
  244. setFillStyle(1,green);
  245. setcolor(black);
  246. fillellipse(510,480,15,15);
  247. setcolor(green);
  248. fillellipse(510,505,30,30);
  249.  
  250. setcolor(RED); //text
  251. settextstyle(1,HorizDir,5);
  252. outtextxy(200,900,'RTK WINTER EVENT 2019');
  253.  
  254. setcolor(RED);
  255. settextstyle(1,HorizDir,5);
  256. outtextxy(30,50,'WELCOME!');
  257.  
  258.  
  259. SetFillStyle(1,16);
  260. setcolor(black);
  261.  
  262. for b:=1 to 475 do //moving
  263. begin
  264. setcolor(white);
  265. circle(650-b,625,20);
  266. setcolor(black);
  267. delay(1);
  268. circle(650-b, 625, 20);
  269. end;
  270.  
  271. for b:=1 to 450 do
  272. begin
  273. setcolor(white);
  274. circle(175,625-b,20);
  275. setcolor(black);
  276. delay(1);
  277. circle(175,625-b,20);
  278. end;
  279.  
  280. for b:=1 to 275 do
  281. begin
  282. setcolor(white);
  283. circle(175+b,175,20);
  284. setcolor(black);
  285. delay(1);
  286. circle(175+b,175,20);
  287. end;
  288. setcolor(white);
  289. circle(450,175,20);
  290. //Shooting
  291.  
  292. writeln('Ievadi X(1-33) un Y(1-33) koordinatus');
  293. Readln(x1);
  294. readln(y1);
  295. if (x1>=1) and (x1<=10) then begin
  296. TX1:=1;
  297. end
  298. ELSE IF(x1<1) and (x1>10) then begin
  299. TX1:=0;
  300. END;
  301. IF (y1>=1) and (y1<=10) then begin
  302. TY1:=1;
  303. end
  304. ELSE IF(y1<1) and (y1>10) then begin
  305. TY1:=0;
  306. END;
  307. begin
  308. P1:= TY1+TX1;
  309. end;
  310. IF(P1=2)THEN BEGIN setfillstyle(1,red);
  311. fillEllipse(400,50, 20, 20);
  312. M1:=0
  313. END
  314. ELSE IF (P1<4) THEN BEGIN
  315. M1:=1;
  316. END;
  317. Writeln(' Koordinats 11-33(X),11-33(Y) ! ');
  318. Readln(x2);
  319. readln(y2);
  320. if (x2>=11) and (x2<=20) then begin
  321. TX2:=1;
  322. end
  323. ELSE IF(x2<11) and (x2>20) then begin
  324. TX2:=0;
  325. END;
  326. IF (y2>=11) and (y2<=20) then begin
  327. TY2:=1;
  328. end
  329. ELSE IF(y2<11) and (y2>20) then begin
  330. TY2:=0; END; begin
  331. P2:= TY2+TX2;
  332. end;
  333. IF(P2=2)THEN BEGIN setfillstyle(1,red);
  334. fillEllipse(450,50, 20, 20);
  335. M2:=0
  336.  
  337. END
  338. ELSE IF (P2<4) THEN BEGIN
  339. M2:=1;
  340. END;
  341. Writeln(' Koordinats 21-44(X),21-44(Y) ! ');
  342. Readln(x3);
  343. readln(y3);
  344. if (x3>=21) and (x3<=30) then begin
  345. TX3:=1;
  346. end
  347. ELSE IF(x3<21) and (x3>30) then begin
  348. TX3:=0;
  349. END;
  350. IF (y3>=21) and (y3<=30) then begin
  351. TY3:=1;
  352. end
  353. ELSE IF(y3<21) and (y3>30) then begin
  354. TY3:=0;
  355. END;
  356. begin
  357. P3:= TY3+TX3;
  358. end;
  359. IF(P3=2)THEN BEGIN
  360. setfillstyle(1,red);
  361. fillEllipse(500,50,20,20);
  362. M3:=0
  363. END
  364. ELSE IF (P3<4) THEN BEGIN M3:=1;
  365. END;
  366. IF (M3+M2+M1=0) THEN BEGIN
  367. WRITELN('WELL DONE!');
  368. end
  369. ELSE IF (M3+M2+M1=1) THEN BEGIN
  370. writeln('Jus nokavejat, tapec jums ir soda punkts');
  371. rep;
  372. end
  373. ELSE IF (M3+M2+M1=2) THEN BEGIN
  374. writeln('Jus nokavejat 2 reizes, tapec jums ir 2 soda punkti');
  375. rep;
  376. rep;
  377. end
  378. ELSE IF (M3+M2+M1=3) THEN BEGIN
  379. writeln('Jus nokavejat 3 reizes, tapec jums ir 3 soda punkti');
  380. rep;
  381. rep;
  382. rep;
  383. end; //moving
  384. setcolor(black);
  385. bar(440,170,460,180);
  386.  
  387. for b:=1 to 375 do
  388. begin
  389. setcolor(white);
  390. circle(450+b,175,20);
  391. setcolor(black);
  392. delay(1);
  393. circle(450+b,175,20);
  394. end;
  395. for b:=1 to 460 do
  396. begin
  397. setcolor(white);
  398. circle(825,165+b,20);
  399. setcolor(black);
  400. delay(1);
  401. circle(825,165+b,20);
  402.  
  403. end;
  404. for b:=1 to 200 do
  405. begin
  406. setcolor(white);
  407. circle(825-b,625,20);
  408. setcolor(black);
  409. delay(1);
  410. circle(825-b,625,20);
  411. end;
  412. writeln('FINISH!'); //final
  413. readln;
  414. closegraph;
  415. end.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement