Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- program unknow;
- uses crt;
- type int = integer;
- var
- k : char;
- co : int;
- procedure movement(var i,j:int);
- var io,jo:int;
- begin
- k:=readkey;
- case k of
- 'M' : if(j<80) then begin
- textcolor(co);
- gotoxy(j,i); write('>');
- j:=j+1;
- textcolor(black);
- gotoxy(j,i); write('>');
- end;
- 'K' : if (j>1) then begin
- textcolor(co);
- gotoxy(j,i); write('<');
- textcolor(black);
- j:=j-1;
- gotoxy(j,i); write('<');
- end;
- 'H' : if (i>1) then begin
- textcolor(co);
- gotoxy(j,i); write('^');
- i:=i-1;
- textcolor(black);
- gotoxy(j,i); write('^');
- end;
- 'P' : if (i<24) then begin
- textcolor(co);
- gotoxy(j,i); write('V');
- textcolor(black);
- i:=i+1;
- gotoxy(j,i); write('V');
- end;
- 'c' : begin
- inc(co);
- textcolor(co);
- textbackground(co);
- if co=8 then begin
- co:=1;
- textcolor(co+blink);
- textbackground(co+blink);
- end;
- end;
- 'e' :begin
- co:=7;
- textcolor(co);
- textbackground(co);
- end;
- 'a' :begin
- co:=0;
- repeat
- inc(co);
- textcolor(co);
- textbackground(co);
- for io:=1 to 25 do for jo:=1 to 80 do write('C');
- until co=7;
- textcolor(black);
- gotoxy(1,25); write('COLOR : ');
- end;
- end;
- end;
- procedure play;
- var i,j:int;
- begin
- textbackground(white);
- for i:=1 to 25 do for j:=1 to 80 do write('C');
- textcolor(black);
- textbackground(white);
- gotoxy(1,1); write('Y'); i:=1; j:=i; co:=7;
- textcolor(black);
- gotoxy(1,25); write('COLOR : ');
- while k<>#27 do
- begin
- movement(i,j); textcolor(co);
- gotoxy(9,25); write('0 ',co);
- end;
- end;
- procedure head;
- begin
- end;
- begin
- clrscr;
- play;
- end.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement