9个回答
展开全部
答案是肯定的,但没有这样做过。
比如可以编写贪吃蛇之类,
制作当然需要PASCAL编程软件,不需要其他的,到时编译成可执行的文件就可以了。
比如可以编写贪吃蛇之类,
制作当然需要PASCAL编程软件,不需要其他的,到时编译成可执行的文件就可以了。
本回答被提问者采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
可以,要调用Pascal的单元,给个Pascal编的小游戏吧:
最好用turbo Pascal,free Pascal 也可以;
program wxtw;
uses crt;
type
zbdy=record
x,y:integer; end;
var n,i,x,y,t,sjs,js,gx,gy,sf:integer; ml:char;
zb: array [1..13] of zbdy;
begin
randomize;
zb[1].x:=15; zb[1].y:=15;
clrscr;
gotoxy(zb[1].x,zb[1].y);
write('☆');
delay(100);
zb[2].x:=1; zb[2].y:=20;
gotoxy(zb[2].x,zb[2].y);
write('◎');
zb[10].x:=18; zb[10].y:=20;
gotoxy(zb[10].x,zb[10].y);
write('◎');
zb[11].x:=36; zb[11].y:=20;
gotoxy(zb[11].x,zb[11].y);
write('◎');
zb[12].x:=53; zb[12].y:=20;
gotoxy(zb[12].x,zb[12].y);
write('◎');
zb[3].x:=1; zb[3].y:=5;
gotoxy(zb[3].x,zb[3].y);
write('◎');
zb[4].x:=18; zb[4].y:=5;
gotoxy(zb[4].x,zb[4].y);
write('◎');
zb[5].x:=36; zb[5].y:=5;
gotoxy(zb[5].x,zb[5].y);
write('◎');
zb[6].x:=53; zb[6].y:=5;
gotoxy(zb[6].x,zb[6].y);
write('◎');
zb[7].x:=1; zb[7].y:=9;
gotoxy(zb[7].x,zb[7].y);
write('△');
zb[8].x:=7; zb[8].y:=23;
gotoxy(zb[8].x,zb[8].y);
write('△');
zb[9].x:=16; zb[9].y:=4;
gotoxy(zb[9].x,zb[9].y);
write('△');
zb[13].x:=24; zb[13].y:=11;
gotoxy(zb[13].x,zb[13].y);
write('△');
gotoxy(zb[1].x+8,zb[1].y-2);
write('五星大逃亡1.0版');
gotoxy(zb[1].x+3,zb[1].y-1);
write('回车键开始游戏 作者:千觞醉红尘 QQ:364182027');
gotoxy(zb[1].x+3,zb[1].y);
write('操作 上:I 下:K 左:J 右:L 退出:Q ');
gotoxy(zb[1].x+3,zb[1].y+1);
write('注意:碰到边框程序会自动退出,因为时间原因来不及修复!');
readln;
repeat
if keypressed=true then begin
ml:=readkey;
case ml of
'i': begin
zb[1].y:=zb[1].y-1;
clrscr;
gotoxy(zb[1].x,zb[1].y);write('☆');
end;
'k': begin
zb[1].y:=zb[1].y+1;
clrscr;
gotoxy(zb[1].x,zb[1].y);
write('☆');
end;
'j' :begin
zb[1].x:=zb[1].x-1;
clrscr;
gotoxy(zb[1].x,zb[1].y);
write('☆');
end;
'l' :begin
zb[1].x:=zb[1].x+1;
clrscr;
gotoxy(zb[1].x,zb[1].y);
write('☆');
end; end; end else begin
clrscr;
if zb[2].x<=70 then
zb[2].x:=zb[2].x+1 else zb[2].x:=1;
gotoxy(zb[2].x,zb[2].y);
write('◎');
if zb[3].x<=70 then
zb[3].x:=zb[3].x+1 else zb[3].x:=1;
gotoxy(zb[3].x,zb[3].y);
write('◎');
if zb[4].x<=70 then
zb[4].x:=zb[4].x+1 else zb[4].x:=1;
gotoxy(zb[4].x,zb[4].y);
write('◎');
if zb[5].x<=70 then
zb[5].x:=zb[5].x+1 else zb[5].x:=1;
gotoxy(zb[5].x,zb[5].y);
write('◎');
if zb[6].x<=70 then
zb[6].x:=zb[6].x+1 else zb[6].x:=1;
gotoxy(zb[6].x,zb[6].y);
write('◎');
if zb[10].x<=70 then
zb[10].x:=zb[10].x+1 else zb[10].x:=1;
gotoxy(zb[10].x,zb[10].y);
write('◎');
if zb[11].x<=70 then
zb[11].x:=zb[11].x+1 else zb[11].x:=1;
gotoxy(zb[11].x,zb[11].y);
write('◎');
if zb[12].x<=70 then
zb[12].x:=zb[12].x+1 else zb[12].x:=1;
gotoxy(zb[12].x,zb[12].y);
write('◎');
gotoxy(zb[1].x,zb[1].y);
write('☆');
sjs:=random(11); if sjs=2 then begin
if zb[7].x<zb[1].x then zb[7].x:=zb[7].x+1;
if zb[7].x>zb[1].x then zb[7].x:=zb[7].x-1;
if zb[7].y<zb[1].y then zb[7].y:=zb[7].y+1;
if zb[7].y>zb[1].y then zb[7].y:=zb[7].y-1;
gotoxy(zb[7].x,zb[7].y);
if ((zb[8].x=zb[7].x)) and ((zb[8].y=zb[7].y)) or ((zb[9].x=zb[8].x) and (zb[9].y=zb[8].y)) or ((zb[7].x=zb[9].x) and (zb[7].y=zb[9].y))
then gotoxy(zb[7].x-1,zb[7].y-1);
write('△'); end else begin gotoxy(zb[7].x,zb[7].y);
write('△'); end;
sjs:=random(11); if sjs=0 then begin
if zb[8].x<zb[1].x then zb[8].x:=zb[8].x+1;
if zb[8].x>zb[1].x then zb[8].x:=zb[8].x-1;
if zb[8].y<zb[1].y then zb[8].y:=zb[8].y+1;
if zb[8].y>zb[1].y then zb[8].y:=zb[8].y-1;
gotoxy(zb[8].x,zb[8].y);
if ((zb[8].x=zb[7].x)) and ((zb[8].y=zb[7].y)) or ((zb[9].x=zb[8].x) and (zb[9].y=zb[8].y)) or ((zb[7].x=zb[9].x) and (zb[7].y=zb[9].y))
then gotoxy(zb[8].x-1,zb[8].y-1);
write('△'); end else begin gotoxy(zb[8].x,zb[8].y);
write('△'); end;
sjs:=random(11); if sjs=5 then begin
if zb[9].x<zb[1].x then zb[9].x:=zb[9].x+1;
if zb[9].x>zb[1].x then zb[9].x:=zb[9].x-1;
if zb[9].y<zb[1].y then zb[9].y:=zb[9].y+1;
if zb[9].y>zb[1].y then zb[9].y:=zb[9].y-1;
gotoxy(zb[9].x,zb[9].y);
if ((zb[8].x=zb[7].x)) and ((zb[8].y=zb[7].y)) or ((zb[9].x=zb[8].x) and (zb[9].y=zb[8].y)) or ((zb[7].x=zb[9].x) and (zb[7].y=zb[9].y))
then gotoxy(zb[9].x-1,zb[9].y-1);
write('△'); end else begin gotoxy(zb[9].x,zb[9].y);
write('△'); end;
sjs:=random(18); if sjs=5 then begin
if zb[13].x<zb[1].x then zb[13].x:=zb[13].x+1;
if zb[13].x>zb[1].x then zb[13].x:=zb[13].x-1;
if zb[13].y<zb[1].y then zb[13].y:=zb[13].y+1;
if zb[13].y>zb[1].y then zb[13].y:=zb[13].y-1;
gotoxy(zb[13].x,zb[13].y);
if ((zb[8].x=zb[7].x)) and ((zb[8].y=zb[7].y)) or ((zb[9].x=zb[8].x) and (zb[9].y=zb[8].y)) or ((zb[7].x=zb[9].x) and (zb[7].y=zb[9].y))
then gotoxy(zb[13].x-1,zb[13].y-1);
write('△'); end else begin gotoxy(zb[13].x,zb[13].y);
write('△'); end;
js:=js+1;
if js<1000 then begin
gotoxy(1,25); write('离过关神符出现还有',1000-js); end else begin
gotoxy(1,25); write(' 过关神符已出现 '); end;
if js=1000 then begin
gx:=random(10)+1; gy:=random(10)+1;
gotoxy(gx,gy);
write('关'); sf:=2; end;
if sf=2 then begin gotoxy(gx,gy);
write('关'); end;
for i:=2 to 13 do if (zb[1].x=zb[i].x) and (zb[1].y=zb[i].y) then begin
clrscr;
writeln('逃亡失败!回车键退出');
readln;
halt; end;
if (zb[1].x=gx) and (zb[1].y=gy) then begin
clrscr;
writeln('逃亡成功!回车键退出');
readln;
halt; end;
delay(20); end;
until ml='q';
end.
最好用turbo Pascal,free Pascal 也可以;
program wxtw;
uses crt;
type
zbdy=record
x,y:integer; end;
var n,i,x,y,t,sjs,js,gx,gy,sf:integer; ml:char;
zb: array [1..13] of zbdy;
begin
randomize;
zb[1].x:=15; zb[1].y:=15;
clrscr;
gotoxy(zb[1].x,zb[1].y);
write('☆');
delay(100);
zb[2].x:=1; zb[2].y:=20;
gotoxy(zb[2].x,zb[2].y);
write('◎');
zb[10].x:=18; zb[10].y:=20;
gotoxy(zb[10].x,zb[10].y);
write('◎');
zb[11].x:=36; zb[11].y:=20;
gotoxy(zb[11].x,zb[11].y);
write('◎');
zb[12].x:=53; zb[12].y:=20;
gotoxy(zb[12].x,zb[12].y);
write('◎');
zb[3].x:=1; zb[3].y:=5;
gotoxy(zb[3].x,zb[3].y);
write('◎');
zb[4].x:=18; zb[4].y:=5;
gotoxy(zb[4].x,zb[4].y);
write('◎');
zb[5].x:=36; zb[5].y:=5;
gotoxy(zb[5].x,zb[5].y);
write('◎');
zb[6].x:=53; zb[6].y:=5;
gotoxy(zb[6].x,zb[6].y);
write('◎');
zb[7].x:=1; zb[7].y:=9;
gotoxy(zb[7].x,zb[7].y);
write('△');
zb[8].x:=7; zb[8].y:=23;
gotoxy(zb[8].x,zb[8].y);
write('△');
zb[9].x:=16; zb[9].y:=4;
gotoxy(zb[9].x,zb[9].y);
write('△');
zb[13].x:=24; zb[13].y:=11;
gotoxy(zb[13].x,zb[13].y);
write('△');
gotoxy(zb[1].x+8,zb[1].y-2);
write('五星大逃亡1.0版');
gotoxy(zb[1].x+3,zb[1].y-1);
write('回车键开始游戏 作者:千觞醉红尘 QQ:364182027');
gotoxy(zb[1].x+3,zb[1].y);
write('操作 上:I 下:K 左:J 右:L 退出:Q ');
gotoxy(zb[1].x+3,zb[1].y+1);
write('注意:碰到边框程序会自动退出,因为时间原因来不及修复!');
readln;
repeat
if keypressed=true then begin
ml:=readkey;
case ml of
'i': begin
zb[1].y:=zb[1].y-1;
clrscr;
gotoxy(zb[1].x,zb[1].y);write('☆');
end;
'k': begin
zb[1].y:=zb[1].y+1;
clrscr;
gotoxy(zb[1].x,zb[1].y);
write('☆');
end;
'j' :begin
zb[1].x:=zb[1].x-1;
clrscr;
gotoxy(zb[1].x,zb[1].y);
write('☆');
end;
'l' :begin
zb[1].x:=zb[1].x+1;
clrscr;
gotoxy(zb[1].x,zb[1].y);
write('☆');
end; end; end else begin
clrscr;
if zb[2].x<=70 then
zb[2].x:=zb[2].x+1 else zb[2].x:=1;
gotoxy(zb[2].x,zb[2].y);
write('◎');
if zb[3].x<=70 then
zb[3].x:=zb[3].x+1 else zb[3].x:=1;
gotoxy(zb[3].x,zb[3].y);
write('◎');
if zb[4].x<=70 then
zb[4].x:=zb[4].x+1 else zb[4].x:=1;
gotoxy(zb[4].x,zb[4].y);
write('◎');
if zb[5].x<=70 then
zb[5].x:=zb[5].x+1 else zb[5].x:=1;
gotoxy(zb[5].x,zb[5].y);
write('◎');
if zb[6].x<=70 then
zb[6].x:=zb[6].x+1 else zb[6].x:=1;
gotoxy(zb[6].x,zb[6].y);
write('◎');
if zb[10].x<=70 then
zb[10].x:=zb[10].x+1 else zb[10].x:=1;
gotoxy(zb[10].x,zb[10].y);
write('◎');
if zb[11].x<=70 then
zb[11].x:=zb[11].x+1 else zb[11].x:=1;
gotoxy(zb[11].x,zb[11].y);
write('◎');
if zb[12].x<=70 then
zb[12].x:=zb[12].x+1 else zb[12].x:=1;
gotoxy(zb[12].x,zb[12].y);
write('◎');
gotoxy(zb[1].x,zb[1].y);
write('☆');
sjs:=random(11); if sjs=2 then begin
if zb[7].x<zb[1].x then zb[7].x:=zb[7].x+1;
if zb[7].x>zb[1].x then zb[7].x:=zb[7].x-1;
if zb[7].y<zb[1].y then zb[7].y:=zb[7].y+1;
if zb[7].y>zb[1].y then zb[7].y:=zb[7].y-1;
gotoxy(zb[7].x,zb[7].y);
if ((zb[8].x=zb[7].x)) and ((zb[8].y=zb[7].y)) or ((zb[9].x=zb[8].x) and (zb[9].y=zb[8].y)) or ((zb[7].x=zb[9].x) and (zb[7].y=zb[9].y))
then gotoxy(zb[7].x-1,zb[7].y-1);
write('△'); end else begin gotoxy(zb[7].x,zb[7].y);
write('△'); end;
sjs:=random(11); if sjs=0 then begin
if zb[8].x<zb[1].x then zb[8].x:=zb[8].x+1;
if zb[8].x>zb[1].x then zb[8].x:=zb[8].x-1;
if zb[8].y<zb[1].y then zb[8].y:=zb[8].y+1;
if zb[8].y>zb[1].y then zb[8].y:=zb[8].y-1;
gotoxy(zb[8].x,zb[8].y);
if ((zb[8].x=zb[7].x)) and ((zb[8].y=zb[7].y)) or ((zb[9].x=zb[8].x) and (zb[9].y=zb[8].y)) or ((zb[7].x=zb[9].x) and (zb[7].y=zb[9].y))
then gotoxy(zb[8].x-1,zb[8].y-1);
write('△'); end else begin gotoxy(zb[8].x,zb[8].y);
write('△'); end;
sjs:=random(11); if sjs=5 then begin
if zb[9].x<zb[1].x then zb[9].x:=zb[9].x+1;
if zb[9].x>zb[1].x then zb[9].x:=zb[9].x-1;
if zb[9].y<zb[1].y then zb[9].y:=zb[9].y+1;
if zb[9].y>zb[1].y then zb[9].y:=zb[9].y-1;
gotoxy(zb[9].x,zb[9].y);
if ((zb[8].x=zb[7].x)) and ((zb[8].y=zb[7].y)) or ((zb[9].x=zb[8].x) and (zb[9].y=zb[8].y)) or ((zb[7].x=zb[9].x) and (zb[7].y=zb[9].y))
then gotoxy(zb[9].x-1,zb[9].y-1);
write('△'); end else begin gotoxy(zb[9].x,zb[9].y);
write('△'); end;
sjs:=random(18); if sjs=5 then begin
if zb[13].x<zb[1].x then zb[13].x:=zb[13].x+1;
if zb[13].x>zb[1].x then zb[13].x:=zb[13].x-1;
if zb[13].y<zb[1].y then zb[13].y:=zb[13].y+1;
if zb[13].y>zb[1].y then zb[13].y:=zb[13].y-1;
gotoxy(zb[13].x,zb[13].y);
if ((zb[8].x=zb[7].x)) and ((zb[8].y=zb[7].y)) or ((zb[9].x=zb[8].x) and (zb[9].y=zb[8].y)) or ((zb[7].x=zb[9].x) and (zb[7].y=zb[9].y))
then gotoxy(zb[13].x-1,zb[13].y-1);
write('△'); end else begin gotoxy(zb[13].x,zb[13].y);
write('△'); end;
js:=js+1;
if js<1000 then begin
gotoxy(1,25); write('离过关神符出现还有',1000-js); end else begin
gotoxy(1,25); write(' 过关神符已出现 '); end;
if js=1000 then begin
gx:=random(10)+1; gy:=random(10)+1;
gotoxy(gx,gy);
write('关'); sf:=2; end;
if sf=2 then begin gotoxy(gx,gy);
write('关'); end;
for i:=2 to 13 do if (zb[1].x=zb[i].x) and (zb[1].y=zb[i].y) then begin
clrscr;
writeln('逃亡失败!回车键退出');
readln;
halt; end;
if (zb[1].x=gx) and (zb[1].y=gy) then begin
clrscr;
writeln('逃亡成功!回车键退出');
readln;
halt; end;
delay(20); end;
until ml='q';
end.
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
当然可以,只不过不容易调Dos
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
2011-06-27
展开全部
没试过
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询