【没事】做了个3Dcrt地图输出
pascal吧
全部回复
仅看楼主
level 7
2021年05月12日 05点05分 1
level 7
2021年05月12日 05点05分 2
level 11
az,我macos没办法用windows单元……你能发个效果图吗?
2021年05月13日 14点05分 3
uses dos,crt;//这样也行
2021年05月14日 01点05分
@贴吧用户_QtG5y1W dos单元应该也没办法用吧……我再试试
2021年05月14日 07点05分
@星尘喵🌌😺 那我改了,放5楼了
2021年05月14日 07点05分
2021年05月14日 08点05分
level 7
uses dos,crt;//这样也行
2021年05月14日 01点05分 4
level 7
吗了:
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
level 7
上面的是平面图,下面的是侧面图
2021年05月14日 01点05分 6
1