吗了:
uses crt;
var
w,a,s,d:longint;//绉诲姩鍐呭瓨
x,y,z:longint;//鎵€鍦ㄥ潗鏍?
xx,yy,zz:longint;//杈撳嚭鏂瑰潡
dt:array[1..1000,1..1000,1..100]of 0..40;
yn:char;
procedure whtoconfigure(whtoconfigurenumber:longint);
begin
TextBackground(whtoconfigurenumber);
write(' ');
TextBackground(0);
end;
procedure wh;
var
i,ii,iii,iiii,i5,i6,lc:longint;
begin
clrscr;
for i:=1 to 7 do write(' ');
writeln('V');
for i:=x-6 to x+6 do
begin
if i-x=0 then write('>')
else write(' ');
for ii:=y-6 to y+6 do begin
lc:=0;
while dt[i,ii,z-lc]=0 do lc:=lc+1;
whtoconfigure(dt[i,ii,z-lc]);
end;
if i-x=0 then writeln('<')
else writeln;
end;
for i:=1 to 7 do write(' ');
writeln('A');
lc:=0;
while dt[x,y+1,z-lc]=0 do lc:=lc+1;
gotoxy(38,6);
writeln('w: Drop ',lc);
lc:=0;
while dt[x-1,y,z-lc]=0 do lc:=lc+1;
gotoxy(38,7);
writeln('a: Drop ',lc);
lc:=0;
while dt[x,y-1,z-lc]=0 do lc:=lc+1;
gotoxy(38,8);
writeln('s: Drop ',lc);
lc:=0;
while dt[x+1,y,z-lc]=0 do lc:=lc+1;
gotoxy(38,9);
writeln('d: Drop ',lc);
iii:=15;
gotoxy(42,iii-1);
writeln('V');
for i:=z+6 downto z-6 do
begin
gotoxy(14*2,iii);
iii:=iii+1;
if 0=i-z then write('>')
else write(' ');
for ii:=y-6 to y+6 do
begin
whtoconfigure(dt[x,ii,i-lc]);
end;
if 0=i-z then writeln('<')
else writeln;
end;
gotoxy(42,iii);
writeln('A');
end;
begin
(*地图编辑,可以改*)
for xx:=1 to 15 do
for yy:=1 to 15 do
for zz:=1 to 15 do
dt[xx,yy,zz]:=31;
x:=10;
y:=10;
z:=10;
dt[x-1,y,z]:=0;
dt[x+1,y,z]:=5;
dt[x,y-1,z]:=0;
dt[x,y+1,z]:=5;
dt[x,y,z]:=22;
dt[x-1,y-1,z]:=0;
dt[x+1,y+1,z]:=7;
dt[x+1,y-1,z]:=1;
dt[x-1,y+1,z]:=12;
dt[x+2,y-1,z]:=3;
wh;
readln;
end.
2021年05月14日 01点05分
5