Advertisement
Guest User

Untitled

a guest
May 29th, 2013
135
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.48 KB | None | 0 0
  1. program pianinko;
  2.  
  3. uses crt,graph;
  4. var
  5. ster,tryb,x,y,z:integer;
  6. a:char;
  7.  
  8. function Beep(a:Cardinal; b:Cardinal): LongBool; cdecl; external 'kernel32' name 'Beep';
  9.  
  10.  
  11. BEGIN
  12.  
  13.  
  14. DetectGraph(ster,tryb);
  15. InitGraph(ster,tryb,'C:\FPC\2.2.4\units\i386-win32\graph');
  16.  
  17. x:=10;
  18. setColor(white);
  19. Line(10,75,745,75);
  20. Line(10,0,745,0);
  21. repeat
  22. line(x,75,x,0);
  23. x:=x+35;
  24. until x=780;
  25.  
  26. x:=35;
  27. z:=0;
  28. repeat
  29. y:=0;
  30. repeat
  31.  
  32. setcolor(white);
  33. line(x,30,x+20,30);
  34. Line(x,30,x,0);
  35. line(x+20,30,x+20,0);
  36. setcolor(0);
  37. line(x+10,29,x+10,0);
  38.  
  39. x:=x+35;
  40. y:=y+1;
  41.  
  42. until y=2;
  43.  
  44. x:=x+35;
  45.  
  46. y:=0;
  47. repeat
  48.  
  49. setcolor(white);
  50. line(x,30,x+20,30);
  51. Line(x,30,x,0);
  52. line(x+20,30,x+20,0);
  53. setcolor(0);
  54. line(x+10,29,x+10,0);
  55.  
  56. x:=x+35;
  57. y:=y+1;
  58.  
  59. until y=3;
  60.  
  61. x:=x+35;
  62. z:=z+1;
  63. until z=3;
  64.  
  65.  
  66.  
  67. repeat
  68. a:=readkey;
  69. if a='q' then
  70. Begin
  71. setcolor(green);
  72. circle (27,50,10);
  73. beep(261,100);
  74. setcolor(black);
  75. circle (27,50,10);
  76. end;
  77. if a='w' then
  78. Begin
  79. setcolor(green);
  80. circle (62,50,10);
  81. beep(293,100);
  82. setcolor(black);
  83. circle (62,50,10);
  84. end;
  85. if a='e' then
  86. Begin
  87. setcolor(green);
  88. circle (97,50,10);
  89. beep(329,100);
  90. setcolor(black);
  91. circle (97,50,10);
  92. end;
  93. if a='r' then
  94. Begin
  95. setcolor(green);
  96. circle (132,50,10);
  97. beep(349,100);
  98. setcolor(black);
  99. circle (132,50,10);
  100. end;
  101. if a='t' then
  102. Begin
  103. setcolor(green);
  104. circle (167,50,10);
  105. beep(391,100);
  106. setcolor(black);
  107. circle (167,50,10);
  108. end;
  109. if a='y' then
  110. Begin
  111. setcolor(green);
  112. circle (202,50,10);
  113. beep(440,100);
  114. setcolor(black);
  115. circle (202,50,10);
  116. end;
  117. if a='u' then
  118. Begin
  119. setcolor(green);
  120. circle (237,50,10);
  121. beep(493,100);
  122. setcolor(black);
  123. circle (237,50,10);
  124. end;
  125.  
  126. if a='a' then
  127. Begin
  128. setcolor(green);
  129. circle (272,50,10);
  130. beep(523,100);
  131. setcolor(black);
  132. circle (272,50,10);
  133. end;
  134. if a='s' then
  135. Begin
  136. setcolor(green);
  137. circle (307,50,10);
  138. beep(587,100);
  139. setcolor(black);
  140. circle (307,50,10);
  141. end;
  142. if a='d' then
  143. Begin
  144. setcolor(green);
  145. circle (342,50,10);
  146. beep(658,100);
  147. setcolor(black);
  148. circle (342,50,10);
  149. end;
  150. if a='f' then
  151. Begin
  152. setcolor(green);
  153. circle (377,50,10);
  154. beep(699,100);
  155. setcolor(black);
  156. circle (377,50,10);
  157. end;
  158. if a='g' then
  159. Begin
  160. setcolor(green);
  161. circle (412,50,10);
  162. beep(783,100);
  163. setcolor(black);
  164. circle (412,50,10);
  165. end;
  166. if a='h' then
  167. Begin
  168. setcolor(green);
  169. circle (447,50,10);
  170. beep(880,100);
  171. setcolor(black);
  172. circle (447,50,10);
  173. end;
  174. if a='j' then
  175. Begin
  176. setcolor(green);
  177. circle (482,50,10);
  178. beep(987,100);
  179. setcolor(black);
  180. circle (482,50,10);
  181. end;
  182.  
  183. if a='z' then
  184. Begin
  185. setcolor(green);
  186. circle (517,50,10);
  187. beep(1046,100);
  188. setcolor(black);
  189. circle (517,50,10);
  190. end;
  191. if a='x' then
  192. Begin
  193. setcolor(green);
  194. circle (552,50,10);
  195. beep(1174,100);
  196. setcolor(black);
  197. circle (552,50,10);
  198. end;
  199. if a='c' then
  200. Begin
  201. setcolor(green);
  202. circle (587,50,10);
  203. beep(1316,100);
  204. setcolor(black);
  205. circle (587,50,10);
  206. end;
  207. if a='v' then
  208. Begin
  209. setcolor(green);
  210. circle (622,50,10);
  211. beep(1396,100);
  212. setcolor(black);
  213. circle (622,50,10);
  214. end;
  215. if a='b' then
  216. Begin
  217. setcolor(green);
  218. circle (657,50,10);
  219. beep(1567,100);
  220. setcolor(black);
  221. circle (657,50,10);
  222. end;
  223. if a='n' then
  224. Begin
  225. setcolor(green);
  226. circle (692,50,10);
  227. beep(1760,100);
  228. setcolor(black);
  229. circle (692,50,10);
  230. end;
  231. if a='m' then
  232. Begin
  233. setcolor(green);
  234. circle (727,50,10);
  235. beep(1975,100);
  236. setcolor(black);
  237. circle (727,50,10);
  238. end;
  239. until a='`';
  240. END.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement