free pascal游戏在游戏方面会有多强

实际上Pascal跑游戏实际频率很低!_显卡吧_百度贴吧
&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&签到排名:今日本吧第个签到,本吧因你更精彩,明天继续来努力!
本吧签到人数:0成为超级会员,使用一键签到本月漏签0次!成为超级会员,赠送8张补签卡连续签到:天&&累计签到:天超级会员单次开通12个月以上,赠送连续签到卡3张
关注:2,178,042贴子:
实际上Pascal跑游戏实际频率很低!收藏
在重负载3D游戏里面1080公版只能稳定在16xxmhz基础频率,非公也只能到1.9Ghz,跟3Dmark里面所谓1860mhz的最高峰值频率差距很大。
3D双端东方魔幻网游「大青云」勾魂公测,穿越逆转,封神故事,全新演绎!
和390一样吗?各种降频。为了省电吧
登录百度帐号推荐应用
为兴趣而生,贴吧更懂你。或超强!Pascal五子棋游戏
在网上偶尔找到一个Pascal五子棋游戏,真的很强,不过我还有一点不懂怎么玩。请各位大牛玩懂了,记得留言给我,告诉我怎么玩啊!
ses graph,C
& ChessW=19;{棋盘宽}
& BlankW=24;{棋盘高}
& _Color1=BROWN;
& _Color2=WHITE;
& Delta:array [1..4,0..1] of
Integer=((1,0),(0,1),(1,1),(1,-1));
&{Directories for the Chess.}
& VV:array [0..4] of Word=(0,8,64,512,4096);
&{The value for the Chess,as 0:_ _ _ _ _;8:_ O _ _
_;4096:O O O O _.}
& ValueDot=record
VN,D,LD,RD:B
& ValueD=record
X,Y,D,LD,RD:B
& V0:ValueD
& Value:array [1..2,1..ChessW,1..ChessW,0..4] of
&{To record the chesses'values if it's
{记录各个棋子的信息,1..2代表玩家代码,1..4代表四个方位,0代表总起来的。}
& ValueC:array [1..2,0..ChessW*ChessW,1..4] of
{记录有几粒的棋子条的信息,1..2代表玩家代码,1..4代表几粒。}
& BeginX,BeginY,CurrentX,CurrentY:W
&{For the screen.}
& Order:array[0..ChessW+1,0..ChessW+1] of
{原本打算用作记录走棋的顺序,以便研究的,本程序没有用。}
& JustBegin:B
procedure InitC{Draw the
forms and make some necessary init,such as give the 0 the
&&& grDriver:
&&& grMode:
&&& ErrCode:
HalfX,HalfY,H:W
ex,ey,i,j:W
DirectVideo:=F
JustBegin:=T
V0.VN:=0;V0.V:=0;V0.D:=25;V0.LD:=5;V0.RD:=5;V0.LB:=FV0.RB:=F
&&& for i:=1 to
for j:=1 to ChessW do& {初始化棋盘上的各个价值}
&& Order[i,j]:=0;
&& Value[1,i,j,0]:=V0;
&& Value[1,i,j,1]:=V0;
&& Value[1,i,j,2]:=V0;
&& Value[1,i,j,3]:=V0;
&& Value[1,i,j,4]:=V0;
&& Value[2,i,j,0]:=V0;
&& Value[2,i,j,1]:=V0;
&& Value[2,i,j,2]:=V0;
&& Value[2,i,j,3]:=V0;
&& Value[2,i,j,4]:=V0;
&&& for i:=0 to
ChessW+1 do
&Order[i,0]:=$
&Order[0,i]:=$
&Order[i,ChessW+1]:=$
&Order[ChessW+1,0]:=$
CurrentX:=ChessW div 2;CurrentY:=ChessW div 2;
&&& grDriver :=
InitGraph(grDriver,
grMode,'C:\TP\BGI');&&&&&&&&&&&&&
&&& ErrCode :=
&&& if ErrCode =
begin& { Do graphics }
&BeginX:=GetMaxX div 2-(ChessW*BlankW div
&BeginY:=GetMaxY div 2-(ChessW*BlankW div
&ex:=GetMaxX div 2+(ChessW*BlankW div 2);
&ey:=GetMaxY div 2+(ChessW*BlankW div 2);
&SetFillStyle(1,BLUE);
&Bar(BeginX,BeginY,ex,ey);
&SetColor(YELLOW);
&for i:=1 to ChessW+1 do
Line(BeginX+(i-1)*BlankW,BeginY,BeginX+(i-1)*BlankW,ey);
Line(BeginX,BeginY+(i-1)*BlankW,ex,BeginY+(i-1)*BlankW);
procedure PutRect(_x,_y:WErase:Boolean);{走棋时?姆娇騷
&&& r:=BlankW
&&& if Erase
then SetColor(BLUE) else SetColor(RED);
Rectangle(BeginX+_x*BlankW-r,BeginY+_y*BlankW-r,BeginX+_x*BlankW-1,BeginY+_y*BlankW-1);
Rectangle(BeginX+_x*BlankW-r-1,BeginY+_y*BlankW-r-1,BeginX+_x*BlankW-2,BeginY+_y*BlankW-2);
procedure TPut(x,y,p:Byte);
procedure PutChess(_x,_y:Wplayer:Byte);
&&& r:=(BlankW
(_x&ChessW)or(_y&ChessW)or(Order[_x,_y]&&0)
&&& if player=1
then color:=_Color1 else
if player=2 then color:=_Color2
SetColor(color);
Circle(BeginX+_x*BlankW-r,BeginY+_y*BlankW-r,r-3);
SetFillStyle(1,color);
FloodFill(BeginX+_x*BlankW-r,BeginY+_y*BlankW-r,color);
PutRect(CurrentX,CurrentY,True);{画棋子}
Order[_x,_y]:=
CurrentX:=_x;CurrentY:=_y;&&&&&
{把此处的价值设置好}
Value[1,_x,_y,0]:=V0;
Value[2,_x,_y,0]:=V0;
Value[1,_x,_y,1]:=V0;
Value[2,_x,_y,1]:=V0;
Value[1,_x,_y,2]:=V0;
Value[2,_x,_y,2]:=V0;
Value[1,_x,_y,3]:=V0;
Value[2,_x,_y,3]:=V0;
Value[1,_x,_y,4]:=V0;
Value[2,_x,_y,4]:=V0;
PutRect(CurrentX,CurrentY,False);
procedure ManTake(player:Byte);{Use the keyboard the take the
&&& repeat
if KeyPressed then ch:=ReadK
case ch of
&#71:{UpLeft}
PutRect(CurrentX,CurrentY,True);
if CurrentX&1 then CurrentX:=CurrentX-1;
if CurrentY&1 then CurrentY:=CurrentY-1;
PutRect(CurrentX,CurrentY,False);
&&&&&&&&&&&
&&&&&&&&&&&&&
PutRect(CurrentX,CurrentY,True);
if CurrentY&1 then CurrentY:=CurrentY-1;
&&&&&&&&&&&&&
PutRect(CurrentX,CurrentY,False);
&&&&&&&&&&&
#73:{UpRight}
&&&&&&&&&&&
&&&&&&&&&&&&&
PutRect(CurrentX,CurrentY,True);
&&&&&&&&&&&&&
if CurrentX&ChessW then CurrentX:=CurrentX+1;
&&&&&&&&&&&&&
if CurrentY&1 then CurrentY:=CurrentY-1;
&&&&&&&&&&&&&
PutRect(CurrentX,CurrentY,False);
&&&&&&&&&&&
#75:{Left}
&&&&&&&&&&&
&&&&&&&&&&&&&
PutRect(CurrentX,CurrentY,True);
&&&&&&&&&&&&&
if CurrentX&1 then CurrentX:=CurrentX-1;
&&&&&&&&&&&&&
PutRect(CurrentX,CurrentY,False);
&&&&&&&&&&&
#77:{Right}
&&&&&&&&&&&
&&&&&&&&&&&&&
PutRect(CurrentX,CurrentY,True);
&&&&&&&&&&&&&
if CurrentX&ChessW then CurrentX:=CurrentX+1;
PutRect(CurrentX,CurrentY,False);
&&&&&&&&&&&
#79:{DownLeft}
&&&&&&&&&&&
&&&&&&&&&&&&&
PutRect(CurrentX,CurrentY,True);
&&&&&&&&&&&&&
if CurrentX&1 then CurrentX:=CurrentX-1;
&&&&&&&&&&&&&
if CurrentY&ChessW then CurrentY:=CurrentY+1;
&&&&&&&&&&&&&
PutRect(CurrentX,CurrentY,False);
&&&&&&&&&&&
#80:{Down}
&&&&&&&&&&&
&&&&&&&&&&&&&
PutRect(CurrentX,CurrentY,True);
&&&&&&&&&&&&&
if CurrentY&ChessW then CurrentY:=CurrentY+1;
&&&&&&&&&&&&&
PutRect(CurrentX,CurrentY,False);
&&&&&&&&&&&
#81:{DownRight}
&&&&&&&&&&&
&&&&&&&&&&&&&
PutRect(CurrentX,CurrentY,True);
&&&&&&&&&&&&&
if CurrentX&ChessW then CurrentX:=CurrentX+1;
&&&&&&&&&&&&&
if CurrentY&ChessW then CurrentY:=CurrentY+1;
PutRect(CurrentX,CurrentY,False);
&#13:{For sure}
if Order[CurrentX,CurrentY]=0 then
TPut(CurrentX,CurrentY,player);
PutRect(CurrentX,CurrentY,False);
function CheckWin(player:Byte):B
& function
CheckLine(bx,by:Wdx,dy:Integer):B
& {Check if there is 5 chesses in directions of --
sum,maxsum:B
maxsum:=0;sum:=0;
&if Order[bx,by]=player then
sum:=sum+1;
if sum&maxsum then maxsum:=
&& sum:=0;
&bx:=bx+by:=by+
(bx&1)or(bx&ChessW)or(by&1)or(by&ChessW);
CheckLine:=
CheckWin:=F
&&& for i:=1 to
if CheckLine(1,i,1,0)&4 then
&begin&&&&&&&&&&&&&&&&&&&&&&
&& CheckWin:=TE
&&& for i:=1 to
if CheckLine(i,1,0,1)&4 then
&begin&&&&&&&&&&&&&&&&&&&&&&
&& CheckWin:=TE
&&& for i:=1 to
ChessW-4 do
if CheckLine(1,i,1,1)&4 then
&begin&&&&&&&&&&&&&&&&&&&&&&&
&& CheckWin:=TE
&&& for i:=1 to
ChessW-4 do
if CheckLine(i,1,1,1)&4 then
&begin&&&&&&&&&&&&&&&&&&&&&&&&
&& CheckWin:=TE
&&& for i:=5 to
if CheckLine(i,1,-1,1)&4 then
&begin&&&&&&&&&&&&&&&&&&&&&&&&&&
&& CheckWin:=TE
&&& for i:=1 to
ChessW-4 do
if CheckLine(ChessW,i,-1,1)&4 then
&begin&&&&&&&&&&&&&&&&&&&&&&&&&&&
&& CheckWin:=TE
procedure NetTake(player:Byte);
{This is for two players in two computers.It is based on the
NETWARE 4.12,
not for the normal 2 computers.You can ignore this.}
{下面两个过程是为了使两台PC通过NETWARE4.12联起来玩游戏而作,可忽略。}
Assign(f,'SMS.NET');
&&& repeat
IOResult=0;
Readln(f,tx);Readln(f,ty);
TPut(tx,ty,player);
procedure MyNetTake(player:Byte);
Assign(f,'SMS.NET');
Rewrite(f);
ManTake(player);
Writeln(f,CurrentX);Writeln(f,CurrentY);
procedure VD(x0,y0,d,p:Byte);{Caculate the value of the spot of
x,y,x1,y1,x2,y2,
s0,s1,s2,ls,rs,s,_p,
r0,l0,rd,ld,d0:B
lb,rb,rb0,lb0:Bll,rr:B
d1,d2:ValueD
Order[x0,y0]&&0 then E
dx:=Delta[d,0];dy:=Delta[d,1];{方向:--,|,/,\}
&&& if p=1 then
_p:=2 else _p:=1;
t0:=0;s0:=0;
x:=x0;y:=y0;s1:=0;out:=
&&& repeat
x:=x+y:=y+
Inc(s1);&&&&&&&&&&&&&&&&&&&&&&&
{左有空白?}
if (s1&4)or(Order[x,y]=$ff)or(Order[x,y]=_p) then
(Order[x,y]=$ff)or(Order[x,y]=_p) then Dec(s1);
x:=x0;y:=y0;s2:=0;out:=
&&& repeat
x:=x-y:=y-
Inc(s2);&&&&&&&&&&&&&&&&&&&&&&&
{右有空白?}
if (s2&4)or(Order[x,y]=$ff)or(Order[x,y]=_p) then
(Order[x,y]=$ff)or(Order[x,y]=_p) then Dec(s2);
if s1+s2&4 then
Value[p,x0,y0,d]:=V0
&for i:=0 to s1 do
(4-i&=0)and(4-i&=s2) then
ld:=1;rd:=1;rs:=0;ls:=0;
x:=x0;y:=y0;ll:=0;bb:=Tlb:=F
&&&&&&&&&&&&&
for j:=1 to i do
&&&&&&&&&&&&&&&
&&&&&&&&&&&&&&&&&
x:=x+y:=y+&&&&&&
{中间有空白?数目几何?}
&&&&&&&&&&&&&&&&&
if Order[x,y]=p then Inc(ls);
&&&&&&&&&&&&&&&&&
if (ls=0)and(Order[x,y]=0) then Inc(ld);
&&&&&&&&&&&&&&&&&
if (bb)and(ls&0)and(Order[x,y]=0) then begin
lb:=Tll:=bb:=F
&&&&&&&&&&&&&&&
&&&&&&&&&&&&&
if ls=ll then lb:=F
&&&&&&&&&&&&&
if ls=0 then ld:=5;
&&&&&&&&&&&&&
x1:=x+y1:=y+
&&&&&&&&&&&&&
x:=x0;y:=y0;rr:=0;bb:=Trb:=F
&&&&&&&&&&&&&
for j:=1 to 4-i do
&&&&&&&&&&&&&&&
&&&&&&&&&&&&&&&&&
x:=x-y:=y-
&&&&&&&&&&&&&&&&&
if Order[x,y]=p then Inc(rs);
&&&&&&&&&&&&&&&&&
if (rs=0)and(Order[x,y]=0) then Inc(rd);
(bb)and(rs&0)and(Order[x,y]=0) then begin
rb:=Trr:=bb:=F
&&&&&&&&&&&&&&&
&&&&&&&&&&&&&
if rs=0 then rd:=5;
&&&&&&&&&&&&&
if rs=rr then rb:=F
&&&&&&&&&&&&&
x2:=x-y2:=y-
&&&&&&&&&&&&&
&&&&&&&&&&&&&
&&&&&&&&&&&&&
if (Order[x1,y1]=$ff)or(Order[x1,y1]=_p) then t:=t div 2;
&&&&&&&&&&&&&
if (Order[x2,y2]=$ff)or(Order[x2,y2]=_p) then t:=t div 2;
&&&&&&&&&&&&&
if t0&t then
&&&&&&&&&&&&&&&
&&&&&&&&&&&&&&&&&
t0:=t;s0:=s;r0:=l0:=rb0:=lb0:=
&&&&&&&&&&&&&&&
&&&&&&&&&&&
Value[p,x0,y0,d].V:=t0;{此处d方向上价值}
Value[p,x0,y0,d].VN:=s0;{此处d方向上棋子数}
Value[p,x0,y0,d].LD:=l0;{此处d方向左空为几?}
Value[p,x0,y0,d].RD:=r0;{此处d方向右空为几?}
Value[p,x0,y0,d].LB:=lb0;{此处d方向左空?}
Value[p,x0,y0,d].RB:=rb0;{此处d方向右空?}
Value[p,x0,y0,d].D:=l0*r0;
Value[p,x0,y0,0].V:=Value[p,x0,y0,1].V+Value[p,x0,y0,2].V+Value[p,x0,y0,3].V
+Value[p,x0,y0,4].V;
{四个方位的价值加起来,有选择地更新此处的价值,如果新的价值比原来的高。}
Value[p,x0,y0,1].V&Value[p,x0,y0,2].V then
d1:=Value[p,x0,y0,1] else d1:=
Value[p,x0,y0,2];
Value[p,x0,y0,3].V&Value[p,x0,y0,4].V then
d2:=Value[p,x0,y0,3] else d2:=
Value[p,x0,y0,4];
d1.V&d2.V then d2:=d1;
Value[p,x0,y0,0].VN:=d2.VN;
Value[p,x0,y0,0].D:=d2.D;
Value[p,x0,y0,0].RD:=d2.RD;
Value[p,x0,y0,0].LD:=d2.LD;
Value[p,x0,y0,0].RB:=d2.RB;
Value[p,x0,y0,0].LB:=d2.LB;
procedure VAdd(x0,y0,dir,p:Byte);{计算空白处(x0,y0)的价值。}
x,y,i,_p:B
dx:=Delta[dir,0];dy:=Delta[dir,1];
&&& if p=1 then
_p:=2 else _p:=1;
x:=x0;y:=y0;i:=0;out:=
&&& repeat
x:=x+y:=y+
if (i&4)or(Order[x,y]=$ff)or(Order[x,y]=_p) then
if Order[x,y]=0 then VD(x,y,dir,p);
x:=x0;y:=y0;i:=0;out:=
&&& repeat
x:=x-y:=y-
if (i&4)or(Order[x,y]=$ff)or(Order[x,y]=_p) then
if Order[x,y]=0 then VD(x,y,dir,p);
procedure TPut(x,y,p:Byte);{下一步棋,计算其周围的空白处的价值。}
d1,d2:ValueD
Order[x,y]=0 then
PutChess(x,y,p);
VAdd(x,y,1,2);
VAdd(x,y,2,2);
VAdd(x,y,3,2);
VAdd(x,y,4,2);
VAdd(x,y,1,1);
VAdd(x,y,2,1);
VAdd(x,y,3,1);
VAdd(x,y,4,1);
procedure Ps(x,y:Bs:string);{调试程序时用}
&&& for i:=2 to
Length(s) do
case s[1] of
&&&&&&&&&&&
&&&&&&&&&&&&&
x:=x+1;TPut(x,y,Ord(s[i])-48);
&&&&&&&&&&&
&&&&&&&&&&&
&&&&&&&&&&&&&
y:=y+1;TPut(x,y,Ord(s[i])-48);
&&&&&&&&&&&
&&&&&&&&&&&
&&&&&&&&&&&&&
x:=x+1;y:=y+1;TPut(x,y,Ord(s[i])-48);
&&&&&&&&&&&
&&&&&&&&&&&
&&&&&&&&&&&&&
x:=x-1;y:=y+1;TPut(x,y,Ord(s[i])-48);
&&&&&&&&&&&
function CheckC(p,n:Byte):W
{整理各点的价值,并整理成到记录棋子条的数组中。}
{p代表玩家的代码,1为电脑或为玩家;n是几粒棋。}
&&& for i:=1 to
for j:=1 to ChessW do
if Value[p,i,j,0].V&=VV[n] then
&&&&&&&&&&&
&&&&&&&&&&&
ValueC[p,t,n].X:=i;
&&&&&&&&&&&
ValueC[p,t,n].Y:=j;
&&&&&&&&&&&
ValueC[p,t,n].V:=Value[p,i,j,0].V;
&&&&&&&&&&&
ValueC[p,t,n].VN:=Value[p,i,j,0].VN;
&&&&&&&&&&&
ValueC[p,t,n].D:=Value[p,i,j,0].D;
&&&&&&&&&&&
ValueC[p,t,n].RD:=Value[p,i,j,0].RD;
&&&&&&&&&&&
ValueC[p,t,n].LD:=Value[p,i,j,0].LD;
&&&&&&&&&&&
ValueC[p,t,n].RB:=Value[p,i,j,0].RB;
&&&&&&&&&&&
ValueC[p,t,n].LB:=Value[p,i,j,0].LB;
ValueC[p,0,n].V:=t;CheckC:=t;
procedure SortC(p,n,xx:Byte);{把每一空的地方的值排队,以便下最有价值的一步棋。}
{xx表示是1时按价值排,2时按是否两边有空白来排,差不多的,只是走起来,不同。}
t0:ValueD;
t:=ValueC[p,0,n].V;
&&& for i:=1 to
for j:=i+1 to t do
if xx=1 then
&&&&&&&&&&&
if ValueC[p,i,n].V&ValueC[p,j,n].V then
&&&&&&&&&&&&&
&&&&&&&&&&&&&&&
t0:=ValueC[p,i,n];ValueC[p,i,n]:=ValueC[p,j,n];ValueC[p,j,n]:=t0;
&&&&&&&&&&&&&
&&&&&&&&&&&
&&&&&&&&&&&&&
if ValueC[p,i,n].V=ValueC[p,j,n].V then
&&&&&&&&&&&&&&&
if ValueC[p,i,n].D&ValueC[p,j,n].D then
&&&&&&&&&&&&&&&&&
&&&&&&&&&&&&&&&&&&&
t0:=ValueC[p,i,n];ValueC[p,i,n]:=ValueC[p,j,n];ValueC[p,j,n]:=t0;
&&&&&&&&&&&&&&&&&
if xx=2 then
&&&&&&&&&&&
if ValueC[p,i,n].D&ValueC[p,j,n].D then
&&&&&&&&&&&&&
&&&&&&&&&&&&&&&
t0:=ValueC[p,i,n];ValueC[p,i,n]:=ValueC[p,j,n];ValueC[p,j,n]:=t0;
&&&&&&&&&&&&&
&&&&&&&&&&&
&&&&&&&&&&&&&
if ValueC[p,i,n].D=ValueC[p,j,n].D then
&&&&&&&&&&&&&&&
if ValueC[p,i,n].V&ValueC[p,j,n].V then
&&&&&&&&&&&&&&&&&
&&&&&&&&&&&&&&&&&&&
t0:=ValueC[p,i,n];ValueC[p,i,n]:=ValueC[p,j,n];ValueC[p,j,n]:=t0;
&&&&&&&&&&&&&&&&&
procedure PC(p:Byte);
_p,x,y,i,j,k,s,t:B
&&& if p=1 then
_p:=2 else _p:=1;{这一行是为了可以方便地更改人走先还是走后。}
&&& for i:=1 to
for j:=1 to ChessW do
if Value[p,i,j,0].VN=4 then begin TPut(i,j,p);E
{走有四粒的}
&&& for i:=1 to
for j:=1 to ChessW do
if Value[_p,i,j,0].VN=4 then begin TPut(i,j,p);E
{防有四粒的}
&&& for i:=1 to
for j:=1 to ChessW do
if (Value[p,i,j,0].VN=3) and
(Value[p,i,j,0].V&=VV[3]) and
not(Value[p,i,j,0].LB)
&&&&&&&&&&&
and not(Value[p,i,j,0].RB) and (Value[p,i,j,0].D&=5)
&&&&&&&&&&&&&&&
begin TPut(i,j,p);E
{走有三粒的,如此类推。}
&&& for i:=1 to
for j:=1 to ChessW do
if (Value[p,i,j,0].VN=3) then
&&&&&&&&&&&
&&&&&&&&&&&&&
&&&&&&&&&&&&&
if Value[p,i,j,1].VN=3 then Inc(s);
&&&&&&&&&&&&&
if Value[p,i,j,2].VN=3 then Inc(s);
&&&&&&&&&&&&&
if Value[p,i,j,3].VN=3 then Inc(s);
&&&&&&&&&&&&&
if Value[p,i,j,4].VN=3 then Inc(s);
&&&&&&&&&&&&&
if s&=2 then begin TPut(i,j,p);E
&&&&&&&&&&&&&
&&&&&&&&&&&&&
for k:=1 to 4 do
&&&&&&&&&&&&&&&
if (Value[p,i,j,k].V=VV[2]) then b:=T
&&&&&&&&&&&&&
if b then begin TPut(i,j,p);E
{这里走入经验的陷阱,究竟怎样走半三粒的,和两粒交叉的,是先防还是先攻,
我弄不明白。在此调试可提高程序智力。}
&&&&&&&&&&&&&
{Follow no way}
&&&&&&&&&&&&&
if Value[p,i,j,0].V&=VV[3] then
&&&&&&&&&&&&&&&
&&&&&&&&&&&&&&&&&
&&&&&&&&&&&&&&&&&
for k:=1 to 4 do
&&&&&&&&&&&&&&&&&&&
if (Value[_p,i,j,k].V=VV[2])and(
&&&&&&&&&&&&&&&&&&&&&&&
(Value[_p,i,j,k].D=1)or(Value[_p,i,j,k].D=2)
&&&&&&&&&&&&&&&&&&&&&&&&
or(Value[_p,i,j,k].D=5)or(Value[_p,i,j,k].D=10) )
&&&&&&&&&&&&&&&&&&&&&
then Inc(s);
&&&&&&&&&&&&&&&&&
if s&1 then begin TPut(i,j,p);E
&&&&&&&&&&&&&&&
&&&&&&&&&&&
&&& for i:=1 to
for j:=1 to ChessW do
if (Value[_p,i,j,0].V&=VV[3]) then Inc(s);
for i:=1 to ChessW do
for j:=1 to ChessW do
if (Value[p,i,j,0].VN=3)and(Value[p,i,j,0].D&=5)
&&&&&&&&&&&
begin TPut(i,j,p);E
for i:=1 to ChessW do
for j:=1 to ChessW do
if (Value[_p,i,j,0].VN=3) then
&&&&&&&&&&&
&&&&&&&&&&&&&
if (Value[_p,i,j,0].V&=VV[3]) and
not(Value[_p,i,j,0].LB)
&&&&&&&&&&&&&&&&
and not(Value[_p,i,j,0].RB) and
(Value[_p,i,j,0].D&=5) then
&&&&&&&&&&&&&&&
begin TPut(i,j,p);E
&&&&&&&&&&&&&
&&&&&&&&&&&&&
if Value[_p,i,j,1].VN=3 then Inc(s);
&&&&&&&&&&&&&
if Value[_p,i,j,2].VN=3 then Inc(s);
&&&&&&&&&&&&&
if Value[_p,i,j,3].VN=3 then Inc(s);
&&&&&&&&&&&&&
if Value[_p,i,j,4].VN=3 then Inc(s);
&&&&&&&&&&&&&
if s&=2 then begin TPut(i,j,p);E
&&&&&&&&&&&&&
&&&&&&&&&&&&&
for k:=1 to 4 do
&&&&&&&&&&&&&&&
if (Value[_p,i,j,k].V=VV[2]) then b:=T
&&&&&&&&&&&&&
if b then begin TPut(i,j,p);E
&&&&&&&&&&&
&&& for i:=1 to
for j:=1 to ChessW do
for k:=1 to 4 do
&&&&&&&&&&&
if (Value[p,i,j,k].V=VV[2])and(
&&&&&&&&&&&&&&&&&
(Value[p,i,j,k].D=1)or(Value[p,i,j,k].D=2)
&&&&&&&&&&&&&&&&&&
or(Value[p,i,j,k].D=5)or(Value[p,i,j,k].D=10) )
&&&&&&&&&&&&&
then Inc(s);
if s&1 then begin TPut(i,j,p);E
&&& for i:=1 to
for j:=1 to ChessW do
for k:=1 to 4 do
&&&&&&&&&&&
if (Value[_p,i,j,k].V=VV[2])and(
&&&&&&&&&&&&&&&&&
(Value[_p,i,j,k].D=1)or(Value[_p,i,j,k].D=2)
&&&&&&&&&&&&&&&&&&
or(Value[_p,i,j,k].D=5)or(Value[_p,i,j,k].D=10) )
&&&&&&&&&&&&&
then Inc(s);
if s&1 then begin TPut(i,j,p);E
&&& for i:=1 to
for j:=1 to ChessW do
if (Value[p,i,j,0].V&=VV[3]) then begin
TPut(i,j,p);E
for i:=1 to ChessW do
for j:=1 to ChessW do
if (Value[p,i,j,0].VN=2) and
(Value[p,i,j,0].V&=VV[2]) and
not(Value[p,i,j,0].LB)
&&&&&&&&&&&
and not(Value[p,i,j,0].RB) and (Value[p,i,j,0].D&=5)
&&&&&&&&&&&&&&&
begin TPut(i,j,p);E
CheckC(p,2)&0 then
SortC(p,2,1);
TPut(ValueC[p,1,2].X,ValueC[p,1,2].Y,p);
&&& for i:=1 to
for j:=1 to ChessW do
if (Value[p,i,j,0].VN=2) and
(Value[p,i,j,0].V&=VV[2]) and
not(Value[p,i,j,0].LB)
&&&&&&&&&&&
and not(Value[p,i,j,0].RB) and (Value[p,i,j,0].D&=5)
&&&&&&&&&&&&&&&
begin TPut(i,j,p);E
CheckC(_p,2)&0 then
SortC(_p,2,2);
TPut(ValueC[_p,1,2].X,ValueC[_p,1,2].Y,p);
if CheckC(p,1)&0 then
SortC(p,1,2);
TPut(ValueC[p,1,1].X,ValueC[p,1,1].Y,p);
&&& if JustBegin
if CheckC(_p,1)&0 then
begin&&&&&&&
{棋局刚开始反击走法:紧紧贴住。}
SortC(_p,1,2);
t:=ValueC[_p,0,1].V;
if t&3 then t:=Random(8)+1;
TPut(ValueC[_p,t,1].X,ValueC[_p,t,1].Y,p);
JustBegin:=F
begin{第一步随机}
x:=(ChessW div 3)+Random(ChessW div 3);
y:=(ChessW div 3)+Random(ChessW div 3);
TPut(x,y,p);
Write('Fail');{调试程序用}
procedure W
&&& repeat
& tx,ty,dt:Wch:C
ManTake(2);& {人走一步}
&&& Pc(2);
CheckWin(2) then begin write('Man win');
ManTake(1);
Pc(1);&&&&&&
{电脑走一步}
CheckWin(1) then begin write('PC win');
& until FALSE;
已投稿到:
以上网友发言只代表其个人观点,不代表新浪网的观点或立场。}

我要回帖

更多关于 pascal游戏大全 的文章

更多推荐

版权声明:文章内容来源于网络,版权归原作者所有,如有侵权请点击这里与我们联系,我们将及时删除。

点击添加站长微信