Respuestas

2013-05-23T06:48:29+02:00
Program movimientos;
uses crt;
var
letra:char;
x,y:integer;
begin
x:=30;
y:=12;
textcolor (white);gotoxy (x,y);write ('|');
repeat
letra:=readkey;
if (letra='w') then
begin
textcolor (black);gotoxy (x,y);write (' ');
y:=y-1;
textcolor (white);gotoxy (x,y);write ('|');
if (y=1) then
begin
repeat
letra:=readkey;
until (letra='x') or (letra='s') or (letra='a') or (letra='d');
end;
end;

if (letra='x') then
begin
textcolor (black);gotoxy (x,y);write (' ');
y:=y+1;
textcolor (white);gotoxy (x,y);write ('|');
if (y=24) then
begin
repeat
letra:=readkey;
until (letra='w') or (letra='s') or (letra='a') or (letra='d');
end;
end;

if (letra='a') then
begin
textcolor (black);gotoxy (x,y);write (' ');
x:=x-1;
textcolor (white);gotoxy (x,y);write ('|');
if (x=1) then
begin
repeat
letra:=readkey;
until (letra='d') or (letra='s') or (letra='w') or (letra='x');
end;
end;

if (letra='d') then
begin
textcolor (black);gotoxy (x,y);write (' ');
x:=x+1;
textcolor (white);gotoxy (x,y);write ('|');
if (x=80) then
begin
repeat
letra:=readkey;
until (letra='a') or (letra='s') or (letra='w') or (letra='x');
end;
end;
until (letra='s');

if (letra='s') then
exit;
readln;
end.
 en este link esta mas explicado 
http://es.answers.yahoo.com/question/index;_ylt=AjzBujXqSPcCb1Z6Xlqkok1p.gt.;_ylv=3?qid=20100219093339AA5RDD8&show=7#profile-info-AmhTJBjCaa
espero q te ayude