Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- program pianinko;
- uses crt,graph;
- var
- ster,tryb,x,y,z:integer;
- a:char;
- function Beep(a:Cardinal; b:Cardinal): LongBool; cdecl; external 'kernel32' name 'Beep';
- BEGIN
- DetectGraph(ster,tryb);
- InitGraph(ster,tryb,'C:\FPC\2.2.4\units\i386-win32\graph');
- x:=10;
- setColor(white);
- Line(10,75,745,75);
- Line(10,0,745,0);
- repeat
- line(x,75,x,0);
- x:=x+35;
- until x=780;
- x:=35;
- z:=0;
- repeat
- y:=0;
- repeat
- setcolor(white);
- line(x,30,x+20,30);
- Line(x,30,x,0);
- line(x+20,30,x+20,0);
- setcolor(0);
- line(x+10,29,x+10,0);
- x:=x+35;
- y:=y+1;
- until y=2;
- x:=x+35;
- y:=0;
- repeat
- setcolor(white);
- line(x,30,x+20,30);
- Line(x,30,x,0);
- line(x+20,30,x+20,0);
- setcolor(0);
- line(x+10,29,x+10,0);
- x:=x+35;
- y:=y+1;
- until y=3;
- x:=x+35;
- z:=z+1;
- until z=3;
- repeat
- a:=readkey;
- if a='q' then
- Begin
- setcolor(green);
- circle (27,50,10);
- beep(261,100);
- setcolor(black);
- circle (27,50,10);
- end;
- if a='w' then
- Begin
- setcolor(green);
- circle (62,50,10);
- beep(293,100);
- setcolor(black);
- circle (62,50,10);
- end;
- if a='e' then
- Begin
- setcolor(green);
- circle (97,50,10);
- beep(329,100);
- setcolor(black);
- circle (97,50,10);
- end;
- if a='r' then
- Begin
- setcolor(green);
- circle (132,50,10);
- beep(349,100);
- setcolor(black);
- circle (132,50,10);
- end;
- if a='t' then
- Begin
- setcolor(green);
- circle (167,50,10);
- beep(391,100);
- setcolor(black);
- circle (167,50,10);
- end;
- if a='y' then
- Begin
- setcolor(green);
- circle (202,50,10);
- beep(440,100);
- setcolor(black);
- circle (202,50,10);
- end;
- if a='u' then
- Begin
- setcolor(green);
- circle (237,50,10);
- beep(493,100);
- setcolor(black);
- circle (237,50,10);
- end;
- if a='a' then
- Begin
- setcolor(green);
- circle (272,50,10);
- beep(523,100);
- setcolor(black);
- circle (272,50,10);
- end;
- if a='s' then
- Begin
- setcolor(green);
- circle (307,50,10);
- beep(587,100);
- setcolor(black);
- circle (307,50,10);
- end;
- if a='d' then
- Begin
- setcolor(green);
- circle (342,50,10);
- beep(658,100);
- setcolor(black);
- circle (342,50,10);
- end;
- if a='f' then
- Begin
- setcolor(green);
- circle (377,50,10);
- beep(699,100);
- setcolor(black);
- circle (377,50,10);
- end;
- if a='g' then
- Begin
- setcolor(green);
- circle (412,50,10);
- beep(783,100);
- setcolor(black);
- circle (412,50,10);
- end;
- if a='h' then
- Begin
- setcolor(green);
- circle (447,50,10);
- beep(880,100);
- setcolor(black);
- circle (447,50,10);
- end;
- if a='j' then
- Begin
- setcolor(green);
- circle (482,50,10);
- beep(987,100);
- setcolor(black);
- circle (482,50,10);
- end;
- if a='z' then
- Begin
- setcolor(green);
- circle (517,50,10);
- beep(1046,100);
- setcolor(black);
- circle (517,50,10);
- end;
- if a='x' then
- Begin
- setcolor(green);
- circle (552,50,10);
- beep(1174,100);
- setcolor(black);
- circle (552,50,10);
- end;
- if a='c' then
- Begin
- setcolor(green);
- circle (587,50,10);
- beep(1316,100);
- setcolor(black);
- circle (587,50,10);
- end;
- if a='v' then
- Begin
- setcolor(green);
- circle (622,50,10);
- beep(1396,100);
- setcolor(black);
- circle (622,50,10);
- end;
- if a='b' then
- Begin
- setcolor(green);
- circle (657,50,10);
- beep(1567,100);
- setcolor(black);
- circle (657,50,10);
- end;
- if a='n' then
- Begin
- setcolor(green);
- circle (692,50,10);
- beep(1760,100);
- setcolor(black);
- circle (692,50,10);
- end;
- if a='m' then
- Begin
- setcolor(green);
- circle (727,50,10);
- beep(1975,100);
- setcolor(black);
- circle (727,50,10);
- end;
- until a='`';
- END.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement