Ask Question

Name:
Title:
Your Question:

Answer Question

Name:
Your Answer:
User Submitted Source Code!


Description:
  asdas
Language: C/C++
Code:
Program Banam;
uses crt;
var
a,d,X,Y,Z,U,r,m,n,cont:integer;
f:char;
s:string;
begin
randomize;
writeln('Come ti chiami?');
readln(s);
cursoroff;

X:=2;
Y:=2;
clrscr;
r:=-1;
Z:=2;
U:=2;
gotoXY (0,0);
writeln('O----------------------------------------------------O');
writeln('|                                                    |');
writeln('|                                                    |');
writeln('|                                                    |');
writeln('|                                                    |            SCORE:');
writeln('|                                                    |                        ');
writeln('|                                                    |');
writeln('|                                                    |');
writeln('|                                                    |            PASSI:');
writeln('|                                                    |');
writeln('|                                                    |');
writeln('|                                                    |');
writeln('|                                                    |            Player ');
writeln('|                                                    |            ',s);
writeln('|                                                    |');
writeln('|                                                    |');
writeln('|                                                    |            Level 1');
writeln('|                                                    |');
writeln('|                                                    |');
writeln('|                                                    |');
writeln('|                                                    |');
writeln('|                                                    |');
writeln('|                                                    |');
writeln('O----------------------------------------------------O');
repeat;
if (Z=Y)and(U=X)
then
begin
r:=r+1;
gotoXY(Z,U);
write(' ');
Z:=random(51)+2;
U:=random(21)+2;
gotoXY(Z,U);
write('X');
gotoXY(67,6);
write(r);
end;
if Y>=53 then
Y:=53;
if X>=23 then
X:=23;
gotoXY (Y,X);
if Y<2 then
Y:=2;
if X<2 then
X:=2;
gotoXY (Y,X);
write('+');
m:=y;
n:=X;
f:=readkey;
case f of
'a': Y:=Y-1;
's': X:=X+1;
'd': Y:=Y+1;
'w': X:=X-1;
'A': Y:=Y-1;
'S': X:=X+1;
'D': Y:=Y+1;
'W': X:=X-1;
end;
cont:=cont+1;
gotoXY(67,10);
write(cont);
if r mod 5=0 then
randomize;
gotoXY (m,n);
write(' ');
until (r=50);
gotoXY(Z,U);
write(' ');
gotoXY(20,12);
writeln('CODE: 53cr67f34d');
repeat
f:=readkey;
until (f=' ');
end.
          
Comments: