Pascal游戏详细攻略
Pascal游戏是一款深受玩家喜爱的大型冒险解谜类游戏,以其精美的画面、丰富的剧情和独特的谜题设计而闻名。在游戏中,玩家将扮演一名侦探,深入各种神秘案件,解开隐藏在背后的真相。游戏融合了推理、探索和解谜等多种元素,为玩家带来了紧张刺激而又充满智慧挑战的游戏体验。
一、游戏介绍
Pascal游戏的故事背景设定在一个充满谜团的小镇,这里隐藏着许多不为人知的秘密。玩家需要扮演侦探,通过调查各种案件,逐步揭开小镇背后的真相。游戏画面精美细腻,角色设计独特,剧情跌宕起伏,为玩家营造了一个引人入胜的游戏世界。同时,游戏中的谜题设计巧妙,需要玩家充分发挥智慧和观察力,才能顺利解开。
二、游戏攻略详解
① 角色选择与技能升级在游戏开始时,玩家需要选择自己的侦探角色。每个角色都有独特的技能和背景故事,这将对游戏进程产生一定影响。随着游戏的深入,玩家可以通过完成任务和挑战来获得经验值,进而提升角色等级和技能。合理分配技能点,将有助于提高侦探的推理能力和战斗技巧。
② 探索与收集线索在游戏中,探索是解开谜题的关键。玩家需要仔细搜索每个场景,寻找隐藏的线索和物品。这些线索可能隐藏在书架上的一本书、桌子上的一张便条或墙壁上的裂缝中。收集到的线索需要在侦探笔记本上进行整理和推理,以揭示案件背后的真相。此外,与游戏中的角色进行对话,也是获取重要信息的重要途径。
③ 解谜与推理Pascal游戏中的谜题设计非常巧妙,需要玩家运用逻辑思维和推理能力来解开。谜题类型多样,包括密码锁、拼图、线索关联等。在解谜过程中,玩家需要仔细观察场景中的细节,将收集到的线索进行关联和分析。同时,利用侦探的技能和道具,可以更有效地解决谜题。记住,不要急于求成,耐心和细心是解谜的关键。
④ 战斗与防御在游戏中,玩家可能会遇到一些需要战斗的情况。此时,需要合理运用侦探的战斗技能和道具来应对敌人。战斗过程中,要注意观察敌人的攻击模式和弱点,及时调整战斗策略。同时,保持足够的防御能力,以避免受到致命伤害。
三、游戏特色亮点
Pascal游戏以其独特的剧情设计和谜题挑战吸引了大量玩家。游戏中的每个案件都充满了悬念和反转,让玩家在解谜的过程中不断感受到惊喜和刺激。此外,游戏还提供了丰富的角色背景和技能系统,为玩家带来了更多元化的游戏体验。精美的画面和音效也为游戏增色不少,让玩家仿佛置身于真实的侦探世界中。
四、总结与评价
Pascal游戏是一款值得一试的冒险解谜类游戏。它以其独特的剧情设计、巧妙的谜题挑战和精美的画面音效赢得了玩家的青睐。在游戏中,玩家将扮演一名侦探,深入各种神秘案件,解开隐藏在背后的真相。通过探索、收集线索、解谜和战斗,玩家将不断挑战自己的智慧和观察能力。如果你喜欢冒险解谜类游戏,那么Pascal游戏绝对不容错过。
program guess;
var a1,a2,a3,gamesize:0200000;
f1,score:integer;
c,ch:char;
b:boolean;
procedure game;
begin
randomize;
a1:=random(gamesize);
a3:=0;
repeat
readln(a2);
if a2>a1 then writeln('Smaller!');
if a2<a1 then writeln('Bigger!');
a3:=a3+1;
until a1=a2;
writeln;
writeln;
if a3<20 then begin writeln('Great!');score:=score+8;end
else if a3<30 then begin writeln('Good job!');score:=score+5;end
else if a3<40 then begin writeln('Good!');score:=score+3;end
else begin writeln('Your score became ZERO!');score:=0;end;
writeln('the number is:',a1,' you guessed ',a3,' times!');
writeln('your score:',score:4);
end;
procedure submit;
begin
assign(input,'maxscore.txt');
reset(input);
read(f1);
if score>f1 then begin
assign(output,'maxscore.txt');
rewrite(output);
write(output,score);
close(output);
end;
end;
begin
score:=0;
write('input gamesize--z(Zero)/e(Easy)/n(Normal)/h(Hard)/x(eXit): ');
read(ch);
case ch of
'z':gamesize:=0;
'e':gamesize:=50000;
'n':gamesize:=100000;
'h':gamesize:=200000;
'x':exit;
end;
b:=true;
readln;
while b do
begin
writeln('Lets begin!');
game;
write('Another one(Y/N)');
read(c);
case c of
'y','Y': continue;
'n','N': begin
submit;
exit;
end;
end;
end;
end.
上面是添油加醋版
稍微先进了一点不好意思
但是可以选择难度
老早编的
接下来是按你要求编的简单版
program guess;
var a1,a2,gamesize:0200000;
c,ch:char;
b:boolean;
procedure game;
begin
randomize;
a1:=random(gamesize);
repeat
readln(a2);
if a2>a1 then writeln('too big');
if a2<a1 then writeln('too small');
a3:=a3+1;
until a1=a2;
writeln('Good!');
end;
begin
write('input gamesize');
readln(gamesize);
b:=true;
readln;
while b do
begin
game;
write('Another one(Y/N)');
read(c);
case c of
'y','Y': continue;
'n','N': exit;
end;
end;
end.
给分哟~
通过运用crt单元,可以编出一些简单的游戏。例如贪吃蛇、推箱子、扫雷等。这些都是我编过的游戏下面附上代码。
贪吃蛇:
program she;
uses crt;
label 1,2,3;
type point=record
x,y:120;
end;
type shuzu=array[120,120] of char;
var a:shuzu;s:string;b:array[11000]of point;i,j,f,fen:integer;
head,tail:01001;c:boolean;
procedure ran2;
var p,q:integer;
begin
randomize;
p:=random(17)+2;
q:=random(17)+2;
if a[p,q]=' ' then a[p,q]:='#' else ran2;
end;
procedure ran;
var p,q:integer;
begin
randomize;
p:=random(17)+2;
q:=random(17)+2;
if a[p,q]=' ' then a[p,q]:=chr(2) else ran;
end;
procedure print(x:shuzu);
var i,j:120;
begin
for i:=1 to 20 do
for j:=1 to 20 do
begin
textcolor(15);
if a[i,j]=chr(2) then textcolor(12);
write(a[i,j]);
if j=20 then writeln
end;
writeln('Score:',fen);
end;
begin
textmode(1);cursoroff;
3:fillchar(a,sizeof(a),' ');
head:=0;tail:=3;fen:=0;f:=4;
b[1].x:=2;b[1].y:=2;
b[2].x:=2;b[2].y:=3;
b[3].x:=2;b[3].y:=4;
for i:=1 to 20 do
begin
a[1,i]:='#';a[i,1]:='#';
a[20,i]:='#';a[i,20]:='#';
end;
a[2,2]:='o';a[2,3]:='o';a[2,4]:=';
ran;
1:
c:=false;
clrscr;
print(a);
for i:=1 to 300 do
begin
delay(1);
if (keypressed)and(not(c)) then
case readkey of
#72:
if (f=3)or(f=4) then begin f:=1;c:=true; end;
#80:
if (f=3)or(f=4) then begin f:=2;c:=true end;
#75:
if (f=1)or(f=2) then begin f:=3;c:=true end;
#77:
if (f=1)or(f=2) then begin f:=4;c:=true end;
#27:
begin
writeln('Do you want to exit(Y/N)');
repeat
readln(s);
if (s='Y')or(s='y') then halt;
until (s='N')or(s='n');
goto 1;
end;
end;
end;
a[b[tail].x,b[tail].y]:='o';
case f of
1:
begin
if (a[b[tail].x-1,b[tail].y]='#')or
((a[b[tail].x-1,b[tail].y]='o')and(not((b[tail].x-1=b[head mod 1000+1].x)and(b[tail].y=b[head mod 1000+1].y)))) then goto 2;
if a[b[tail].x-1,b[tail].y]=chr(2) then
begin
fen:=fen+10;
ran;ran2
end
else
begin
head:=head mod 1000+1;
a[b[head].x,b[head].y]:=' ';
end;
tail:=tail+1;
if tail=1001 then
begin
tail:=1;
b[1].x:=b[1000].x-1;b[1].y:=b[1000].y;
end
else
begin
b[tail].x:=b[tail-1].x-1;b[tail].y:=b[tail-1].y;
end;
end;
2:
begin
if (a[b[tail].x+1,b[tail].y]='#')or
((a[b[tail].x+1,b[tail].y]='o')and(not((b[tail].x+1=b[head mod 1000+1].x)and(b[tail].y=b[head mod 1000+1].y)))) then goto 2;
if a[b[tail].x+1,b[tail].y]=chr(2) then
begin
fen:=fen+10;
ran;ran2
end
else
begin
head:=head mod 1000+1;
a[b[head].x,b[head].y]:=' ';
end;
tail:=tail+1;
if tail=1001 then
begin
tail:=1;
b[1].x:=b[1000].x+1;b[1].y:=b[1000].y;
end
else
begin
b[tail].x:=b[tail-1].x+1;b[tail].y:=b[tail-1].y;
end;
end;
3:
begin
if (a[b[tail].x,b[tail].y-1]='#')or
((a[b[tail].x,b[tail].y-1]='o')and(not((b[tail].x=b[head mod 1000+1].x)and(b[tail].y-1=b[head mod 1000+1].y)))) then goto 2;
if a[b[tail].x,b[tail].y-1]=chr(2) then
begin
fen:=fen+10;
ran;ran2
end
else
begin
head:=head mod 1000+1;
a[b[head].x,b[head].y]:=' ';
end;
tail:=tail+1;
if tail=1001 then
begin
tail:=1;
b[1].x:=b[1000].x;b[1].y:=b[1000].y-1;
end
else
begin
b[tail].x:=b[tail-1].x;b[tail].y:=b[tail-1].y-1;
end;
end;
4:
begin
if (a[b[tail].x,b[tail].y+1]='#')or
((a[b[tail].x,b[tail].y+1]='o')and(not((b[tail].x=b[head mod 1000+1].x)and(b[tail].y+1=b[head mod 1000+1].y)))) then goto 2;
if a[b[tail].x,b[tail].y+1]=chr(2) then
begin
fen:=fen+10;
ran;ran2
end
else
begin
head:=head mod 1000+1;
a[b[head].x,b[head].y]:=' ';
end;
tail:=tail+1;
if tail=1001 then
begin
tail:=1;
b[1].x:=b[1000].x;b[1].y:=b[1000].y+1;
end
else
begin
b[tail].x:=b[tail-1].x;b[tail].y:=b[tail-1].y+1;
end;
end;
end;
a[b[tail].x,b[tail].y]:=';
goto 1;
2:writeln('Game Over!Score:',fen);
writeln('Play again(Y/N)');
repeat
readln(s);
if (s='Y')or(s='y') then goto 3;
if (s='N')or(s='n') then halt;
until (s='Y')or(s='y')or(s='N')or(s='n');
end.
推箱子(主文件):
program tuixiang;
uses crt,tx,dos;
label 1,2,3,4,5;
var f:text;n,p,q,i,j:integer;s1,s:string;
a:sz1;b:sz2;top:integer;ren:poi;
procedure wrong;
begin
sound(300);
delay(100);
nosound;
end;
function over:boolean;
var i:integer;
begin
for i:=1 to top do
if a[b[i].x,b[i].y]<>' then exit(false);
exit(true);
end;
begin
textmode(1);cursoroff;
highvideo;
window(15,7,30,25);
write('Please choose a unit(1~11):');
read(n);
2:str(n,s1);s:='c:\map'+s1+'.in';
print(n,ren,a,b,top);
assign(f,s);
reset(f);
readln(f,i);
for j:=1 to i do
readln(f,p,q);
readln(f,p,q);
close(f);
1:case readkey of
#72:
if (a[ren.x-1,ren.y]=' ')or(a[ren.x-1,ren.y]='o') then
begin
if dong(ren.x,ren.y,top,b) then a[ren.x,ren.y]:='o' else a[ren.x,ren.y]:=' ';
a[ren.x-1,ren.y]:=chr(2);
ren.x:=ren.x-1;
end
else
if a[ren.x-1,ren.y]=chr(233) then
if (a[ren.x-2,ren.y]=' ')or(a[ren.x-2,ren.y]='o') then
begin
if dong(ren.x,ren.y,top,b) then a[ren.x,ren.y]:='o' else a[ren.x,ren.y]:=' ';
a[ren.x-1,ren.y]:=chr(2);a[ren.x-2,ren.y]:=chr(233);
ren.x:=ren.x-1;
end
else wrong
else
wrong;
#80:
if (a[ren.x+1,ren.y]=' ')or(a[ren.x+1,ren.y]='o') then
begin
if dong(ren.x,ren.y,top,b) then a[ren.x,ren.y]:='o' else a[ren.x,ren.y]:=' ';
a[ren.x+1,ren.y]:=chr(2);
ren.x:=ren.x+1;
end
else
if a[ren.x+1,ren.y]=chr(233) then
if (a[ren.x+2,ren.y]=' ')or(a[ren.x+2,ren.y]='o') then
begin
if dong(ren.x,ren.y,top,b) then a[ren.x,ren.y]:='o' else a[ren.x,ren.y]:=' ';
a[ren.x+1,ren.y]:=chr(2);a[ren.x+2,ren.y]:=chr(233);
ren.x:=ren.x+1;
end
else wrong
else
wrong;
#75:
if (a[ren.x,ren.y-1]=' ')or(a[ren.x,ren.y-1]='o') then
begin
if dong(ren.x,ren.y,top,b) then a[ren.x,ren.y]:='o' else a[ren.x,ren.y]:=' ';
a[ren.x,ren.y-1]:=chr(2);
ren.y:=ren.y-1;
end
else
if a[ren.x,ren.y-1]=chr(233) then
if (a[ren.x,ren.y-2]=' ')or(a[ren.x,ren.y-2]='o') then
begin
if dong(ren.x,ren.y,top,b) then a[ren.x,ren.y]:='o' else a[ren.x,ren.y]:=' ';
a[ren.x,ren.y-1]:=chr(2);a[ren.x,ren.y-2]:=chr(233);
ren.y:=ren.y-1;
end
else wrong
else
wrong;
#77:
if (a[ren.x,ren.y+1]=' ')or(a[ren.x,ren.y+1]='o') then
begin
if dong(ren.x,ren.y,top,b) then a[ren.x,ren.y]:='o' else a[ren.x,ren.y]:=' ';
a[ren.x,ren.y+1]:=chr(2);
ren.y:=ren.y+1;
end
else
if a[ren.x,ren.y+1]=chr(233) then
if (a[ren.x,ren.y+2]=' ')or(a[ren.x,ren.y+2]='o') then
begin
if dong(ren.x,ren.y,top,b) then a[ren.x,ren.y]:='o' else a[ren.x,ren.y]:=' ';
a[ren.x,ren.y+1]:=chr(2);a[ren.x,ren.y+2]:=chr(233);
ren.y:=ren.y+1;
end
else wrong
else
wrong;
#27:
begin
write('Are you sure to exit(Y/N)');
4:readln(s1);
if (s1='y')or(s1='Y') then
begin
textmode(lo(lastmode));
halt
end
else
if (s1<>'n')and(s1<>'N') then goto 4;
end;
else
goto 1;
end;
pr(p,q,top,a,b);
if over then
begin
erase(f);
if n=11 then
begin
write('Congratulations!Play again(Y/N)');
5:readln(s1);
if (s1='y')or(s1='Y') then
begin
n:=1;goto 2;
end
else
if (s1='n')or(s1='N') then halt
else goto 5;
end;
write('Congratulations!Go to next unit(Y/N)');
3:readln(s1);
if (s1='y')or(s1='Y') then
begin
n:=n+1;goto 2;
end
else
if (s1='n')or(s1='N') then halt
else goto 3;
end;
goto 1;
end.
推箱子(附带单元):
unit tx;
interface
uses crt;
type poi=record
x,y:integer;
end;
type sz1=array[150,150]of char;
type sz2=array[110]of poi;
function dong(x,y,top:integer;var b:sz2):boolean;
procedure print(x:integer;var ren:poi;var a:sz1;var b:sz2;var top:integer);
procedure pr(x,y,top:integer;a:sz1;b:sz2);
implementation
function dong(x,y,top:integer;var b:sz2):boolean;
var i:integer;
begin
for i:=1 to top do
if (b[i].x=x)and(b[i].y=y) then exit(true);
exit(false);
end;
procedure print(x:integer;var ren:poi;var a:sz1;var b:sz2;var top:integer);
var f:text;s1,s:string;
procedure prsc;
var i,j,m,n:integer;
begin
clrscr;
assign(f,s);
reset(f);
readln(f,top);
for i:=1 to top do
readln(f,b[i].x,b[i].y);
readln(f,m,n);
for i:=1 to m do
for j:=1 to n do
begin
textcolor(15);
if dong(i,j,top,b) then textcolor(12);
read(f,a[i,j]);write(a[i,j]);
if a[i,j]=chr(2) then
begin
ren.x:=i;
ren.y:=j;
end;
if j=n then
begin
readln(f);
writeln
end;
end;
close(f);
end;
begin
str(x,s1);s:='c:\map'+s1+'.in';
assign(f,s);rewrite(f);
case x of
1:
begin
writeln(f,3);
writeln(f,5,' ',2);
writeln(f,6,' ',2);
writeln(f,7,' ',2);
writeln(f,9,' ',8);
writeln(f,' #####');
writeln(f,'#### #');
writeln(f,'# # #');
writeln(f,'# #');
writeln(f,'#o ####');
writeln(f,'#o# # ');
writeln(f,'#o# # # ');
writeln(f,'### # ');
writeln(f,' ##### ');
end;
2:
begin
writeln(f,5);
writeln(f,6,' ',2);
writeln(f,7,' ',2);
writeln(f,7,' ',3);
writeln(f,7,' ',4);
writeln(f,7,' ',5);
writeln(f,8,' ',6);
writeln(f,' #### ');
writeln(f,'## # ');
writeln(f,'## ');
writeln(f,'####');
writeln(f,'## #');
writeln(f,'#o #');
writeln(f,'#oo閛# ');
writeln(f,'###### ');
end;
3:
begin
writeln(f,3);
writeln(f,4,' ',8);
writeln(f,5,' ',8);
writeln(f,6,' ',8);
writeln(f,9,' ',9);
writeln(f,'##### ');
writeln(f,'# # ');
writeln(f,'# 殚# ###');
writeln(f,'# # #o#');
writeln(f,'### ###o#');
writeln(f,' ## o#');
writeln(f,' # # #');
writeln(f,' # ####');
writeln(f,' ##### ');
end;
4:
begin
writeln(f,4);
writeln(f,3,' ',5);
writeln(f,3,' ',6);
writeln(f,4,' ',5);
writeln(f,4,' ',6);
writeln(f,10,' ',7);
writeln(f,' #### ');
writeln(f,'### ##');
writeln(f,'# oo#');
writeln(f,'# # oo#');
writeln(f,'# ###');
writeln(f,'# # #');
writeln(f,'# #');
writeln(f,'## #');
writeln(f,' # ###');
writeln(f,' #### ');
end;
5:
begin
writeln(f,3);
writeln(f,5,' ',2);
writeln(f,6,' ',2);
writeln(f,7,' ',2);
writeln(f,8,' ',8);
writeln(f,' #### ');
writeln(f,' # ### ');
writeln(f,' # # ');
writeln(f,'### # ##');
writeln(f,'#o# # #');
writeln(f,'#o # #');
writeln(f,'#o #');
writeln(f,'########');
end;
6:
begin
writeln(f,5);
writeln(f,2,' ',7);
writeln(f,3,' ',7);
writeln(f,4,' ',7);
writeln(f,5,' ',7);
writeln(f,6,' ',7);
writeln(f,10,' ',8);
writeln(f,' ###');
writeln(f,' #o#');
writeln(f,' #####o#');
writeln(f,'## o#');
writeln(f,'# 殚o#');
writeln(f,'# o#');
writeln(f,'### ## #');
writeln(f,'# #');
writeln(f,'# ###');
writeln(f,'###### ');
end;
7:
begin
writeln(f,5);
writeln(f,2,' ',4);
writeln(f,2,' ',5);
writeln(f,3,' ',3);
writeln(f,3,' ',4);
writeln(f,3,' ',5);
writeln(f,10,' ',7);
writeln(f,' #### ');
writeln(f,' ##oo# ');
writeln(f,' #ooo# ');
writeln(f,'## # ');
writeln(f,'# ');
writeln(f,'# ###');
writeln(f,'# # #');
writeln(f,'# #');
writeln(f,'######');
writeln(f,' ### ');
end;
8:
begin
writeln(f,6);
writeln(f,5,' ',5);
writeln(f,5,' ',6);
writeln(f,6,' ',5);
writeln(f,6,' ',6);
writeln(f,7,' ',5);
writeln(f,7,' ',6);
writeln(f,11,' ',9);
writeln(f,' ####');
writeln(f,'###### #');
writeln(f,'# #');
writeln(f,'# ## #');
writeln(f,'## #oo #');
writeln(f,'##oo#');
writeln(f,'# #oo ##');
writeln(f,'# ## #');
writeln(f,'# #');
writeln(f,'###### #');
writeln(f,' ####');
end;
9:
begin
writeln(f,5);
writeln(f,4,' ',5);
writeln(f,5,' ',4);
writeln(f,5,' ',5);
writeln(f,6,' ',4);
writeln(f,6,' ',5);
writeln(f,8,' ',7);
writeln(f,' #### ');
writeln(f,' # # ');
writeln(f,'### ');
writeln(f,'# 殚o##');
writeln(f,'# 閛o #');
writeln(f,'# 閛o #');
writeln(f,'# ###');
writeln(f,'##### ');
end;
10:
begin
writeln(f,4);
writeln(f,5,' ',4);
writeln(f,6,' ',4);
writeln(f,7,' ',4);
writeln(f,8,' ',4);
writeln(f,12,' ',6);
writeln(f,' #### ');
writeln(f,'## ##');
writeln(f,'# #');
writeln(f,'# #');
writeln(f,'###o #');
writeln(f,' #o #');
writeln(f,' #o##');
writeln(f,'###o #');
writeln(f,'# #');
writeln(f,'# #');
writeln(f,'# ##');
writeln(f,'##### ');
end;
11:
begin
writeln(f,4);
writeln(f,5,' ',4);
writeln(f,5,' ',5);
writeln(f,6,' ',4);
writeln(f,6,' ',5);
writeln(f,9,' ',7);
writeln(f,'##### ');
writeln(f,'# ###');
writeln(f,'# #');
writeln(f,'# #');
writeln(f,'# 閛o #');
writeln(f,'###oo #');
writeln(f,' ###');
writeln(f,' # #');
writeln(f,' ####');
end;
end;
close(f);
prsc;
end;
procedure pr(x,y,top:integer;a:sz1;b:sz2);
var i,j:integer;
begin
clrscr;
for i:=1 to x do
for j:=1 to y do
begin
textcolor(15);
if dong(i,j,top,b) then textcolor(12);
write(a[i,j]);
if j=y then writeln
end;
end;
end.
扫雷:
program saolei;
uses crt;
label 1,2,3,4;
var a,b:array[114,114]of char;i,j,t,t2,l:integer;s:string;
procedure ran;
var p:integer;nu:integer;
begin
randomize;
for i:=1 to t do
for j:=1 to t do
begin
b[i,j]:=';a[i,j]:=';
end;
for p:=1 to t2 do
begin
repeat
i:=random(t)+1;j:=random(t)+1;
until (a[i,j]=')and(not((i=1)and(j=1)));
a[i,j]:='';
end;
for i:=1 to t do
for j:=1 to t do
if a[i,j]=' then
begin
nu:=0;
if (i>1)and(j>1) then if a[i-1,j-1]='' then inc(nu);
if (i>1) then if a[i-1,j]='' then inc(nu);
if (i>1)and(j<t) then if a[i-1,j+1]='' then inc(nu);
if (j>1) then if a[i,j-1]='' then inc(nu);
if (j<t) then if a[i,j+1]='' then inc(nu);
if (i<t)and(j>1) then if a[i+1,j-1]='' then inc(nu);
if (i<t) then if a[i+1,j]='' then inc(nu);
if (i<t)and(j<t) then if a[i+1,j+1]='' then inc(nu);
if nu>0 then a[i,j]:=chr(ord('0')+nu);
end;
i:=1;j:=1;
end;
procedure print;
var p,q:integer;
begin
clrscr;
for p:=1 to t do
for q:=1 to t do
begin
if b[p,q]='' then textcolor(12);
if (p=i)and(q=j) then textcolor(8);
write(b[p,q]);
if q=t then writeln;
textcolor(15);
end;
writeln('last:',l);
end;
procedure wrong;
begin
sound(300);
delay(100);
nosound
end;
procedure find(x,y:integer);
begin
b[x,y]:=a[x,y];
if b[x,y]<>' then exit;
if (x>1)and(b[x-1,y]=') then find(x-1,y);
if (y>1)and(b[x,y-1]=') then find(x,y-1);
if (x<t)and(b[x+1,y]=') then find(x+1,y);
if (y<t)and(b[x,y+1]=') then find(x,y+1);
if (x>1)and(y>1)and(b[x-1,y-1]=') then find(x-1,y-1);
if (x>1)and(y<t)and(b[x-1,y+1]=') then find(x-1,y+1);
if (x<t)and(y>1)and(b[x+1,y-1]=') then find(x+1,y-1);
if (x<t)and(y<t)and(b[x+1,y+1]=') then find(x+1,y+1);
end;
procedure print2;
var p,q:integer;
begin
clrscr;
for p:=1 to t do
for q:=1 to t do
begin
if b[p,q]='' then
begin
textcolor(12);
write(b[p,q]);
end
else
if (a[p,q]='') then
begin
textcolor(9);
write(a[p,q]);
end
else write(b[p,q]);
if q=t then writeln;
textcolor(15);
end;
end;
function wan:boolean;
var p,q:integer;
begin
for p:=1 to t do
for q:=1 to t do
if b[p,q]=' then exit(false);
exit(true);
end;
begin
textmode(1);cursoroff;
window(12,8,30,25);
3:clrscr;
writeln('Please choose the level:');
writeln('1--easy 2--normal3--hard');
4:case readkey of
'1':begin t:=11;t2:=20; end;
'2':begin t:=12;t2:=30; end;
'3':begin t:=14;t2:=50; end;
else goto 4;
end;
l:=t2;
ran;
print;
1:case readkey of
#72:if i>1 then dec(i) else wrong;
#80:if i<t then inc(i) else wrong;
#75:if j>1 then dec(j) else wrong;
#77:if j<t then inc(j) else wrong;
#27:
begin
writeln('Do you want to exit(Y/N)');
repeat
readln(s);
if (s='Y')or(s='y') then halt;
until (s='n')or(s='N');
end;
'j':
begin
b[i,j]:=a[i,j];
if b[i,j]=' then find(i,j);
if b[i,j]='' then begin print2;goto 2;end;
end;
'k':if (l>0)and(b[i,j]=') then begin b[i,j]:='';dec(l); end;
'l':if b[i,j]='' then begin b[i,j]:=';inc(l); end;
else goto 1;
end;
print;
if not(wan) then goto 1;
writeln('Congratulations!Play once again(Y/N)');
repeat
readln(s);
if (s='N')or(s='n') then halt;
if (s='Y')or(s='y') then goto 3;
until s='y';
2:writeln('Game Over!Play once again(Y/N)');
repeat
readln(s);
if (s='N')or(s='n') then halt;
if (s='Y')or(s='y') then goto 3;
until s='y';
end.
另外我又用c++编了一次贪吃蛇,也一起提供给你。
#include<iostream>
#include<windows.h>
using namespace std;
struct point
{short x,y;
};
char a[22][42];bool f;short i,j,fa;short x[5],y[5];
point s[1001];short h,t,p,q;char st;
short juage()
{if (GetKeyState(VK_UP)<0)
if (fa>=3) {f=true;fa=1;return(0);}
if (GetKeyState(VK_DOWN)<0)
if (fa>=3) {f=true;fa=2;return(0);}
if (GetKeyState(VK_LEFT)<0)
if (fa<=2) {f=true;fa=3;return(0);}
if (GetKeyState(VK_RIGHT)<0)
if (fa<=2) {f=true;fa=4;return(0);}
if (GetKeyState(27)<0)
{cout<<"您真的要退出吗(Y/N) ?";
while (true)
{cin>>st;
if (st=='Y' || st=='y') exit(0); else
if (st=='N' || st=='n') break;
}
}
}
short ran()
{srand(time(0));
short x,y;
while (true)
{
x=rand()%20+1;y=rand()%40+1;
if (a[x][y]==' ') a[x][y]='T';return(0);
}
}
int main()
{x[1]=-1;y[1]=0;
x[2]=1;y[2]=0;
x[3]=0;y[3]=-1;
x[4]=0;y[4]=1;
cout<<" 贪吃蛇\n";
cout<<"本程序由聊城一中09级12班张凯开发\n";
cout<<" 版权所有,翻版必究\n";cout<<endl<<endl;
cout<<"游戏说明:\n";
cout<<" 方向键控制方向,Esc退出\n";
system("pause");
sta:
for (i=1;i<=20;i++)
for (j=1;j<=40;j++)
a[i][j]=' ';
for (i=0;i<=41;i++) {a[0][i]='#';a[21][i]='#';}
for (i=1;i<=20;i++) {a[i][0]='#';a[i][41]='#';}
a[1][1]='0';a[1][2]='0';a[1][3]='8';ran();
h=0;t=3;s[1].x=1;s[1].y=1;s[2].x=1;s[2].y=2;s[3].x=1;s[3].y=3;fa=4;
l1:
system("cls");
for (i=0;i<=21;i++)
{for (j=0;j<=41;j++) cout<<a[i][j];
cout<<endl;
}
f=false;
for (i=1;i<=15;i++)
{Sleep(1);if (!f) juage();}
p=s[t].x+x[fa];q=s[t].y+y[fa];
if (a[p][q]=='#' || (a[p][q]=='0' && !(p==s[h+1].x && q==s[h+1].y))) goto l2;
a[s[t].x][s[t].y]='0';
if (a[p][q]=='T')
{a[p][q]='8';t++;if (t==1001)t=1;s[t].x=p;s[t].y=q;ran();
}
else
{h++;if (h==1001) h=1;a[s[h].x][s[h].y]=' ';a[p][q]='8';
t++;if (t==1001) t=1;s[t].x=p;s[t].y=q;
}
goto l1;
l2:
cout<<"游戏结束!再玩一次吗(Y/N) ?";
while (true)
{cin>>st;
if (st=='Y' || st=='y') goto sta; else
if (st=='N' || st=='n') return(0);
}
}
用枚举吧
var
i,j,a,b,c:integer;
begin
for i:=1 to 24 do
for j:=1 to 24 do begin
c:=24-i-j;
if c>0 then begin
a:=i;b:=j;
a:=a-b-c;
b:=b*2;c:=c*2;
if a>0 then begin
b:=b-a-c;
a:=a*2;c:=c*2;
if b>0 then begin
c:=c-a-b;
a:=a*2;b:=b*2;
if (a=b)and(b=c) then begin
writeln(a," ",b," ",c);
halt;
end;
end;
end;
end;
end;
end.
a,b,c分别表示甲,乙,丙的钱
找敲钟人那个大桥往回走,可以看到一块石碑,伊琳娜就在这附近。
女人就在附近,你进来左手铁门打开去杀了敲钟的对吧;左手铁门的位置继续往前走右转走到底能看到一个铁栅栏里面有个棺材;往左边走有块大石碑,正常来说女人就站在那,也可能直接进大门了。
完成与伊琳娜的交易,任务介绍:不管真相如何,这个装神弄鬼的敲钟人已经倒下。一切都已经结束,秦伦斯捡起弗罗洛那张染血的覆面作为信物,回身前往伊琳娜所在的审判庭。伊迪斯的事情就告一段落了,泰伦斯想着那座通往赐福之地的大桥加快了脚步。
游戏简介。
帕斯卡契约是一款极度Hardcore的魂系动作冒险游戏。游戏中描述一个古老的国度,在那没有了太阳,而是一尊尊的光明巨象。人们跟随着巨象一同生活了千百年,然而一场莫名的瘟疫袭来,使得巨象纷纷倒下,人们也受到了奇特的污染体感染。
而玩家扮演的剑士先驱者泰伦斯发觉此事似乎和他的妻子特蕾莎有关,只好跟着其他先驱者一同前往调查,踏上一段救赎之路。