Hello!
I want to make the tetris game in pascal...
here it's what i've done so far...
uses crt;
var x,y,i,c:byte;
begin x:=5;
y:=1;
repeat
clrscr;
for i:=1 to y-1 do
writeln('| |');
if y<49 then
begin writeln('| a |');
writeln('| a |');
writeln('| a |');
writeln('| aaa |');
for i:=y+4 to 49 do
writeln('| |');
writeln('|____________________________________|');
delay(100)
end
else
begin writeln('| a |');
writeln('| a |');
writeln('| a |');
writeln('|________________aaa_________________|')
end;
y:=y+1;
until y=50;
readln
end.
and i want to know how to do this....
when i press a or d
to move to left(dec(x)) or to move to right(inc(x))... i tried to make repeat this until bla='a' but it doesn't work...
and there is another problem... the pieces that will hit the ground will dissapear after the first test, so i want to make them stay there and i don't know how...
can someone help me?