summaryrefslogtreecommitdiff
path: root/apps/plugins/chessbox/gnuchess.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/plugins/chessbox/gnuchess.c')
-rw-r--r--apps/plugins/chessbox/gnuchess.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/apps/plugins/chessbox/gnuchess.c b/apps/plugins/chessbox/gnuchess.c
index 5e67df4f39..4b21cd785c 100644
--- a/apps/plugins/chessbox/gnuchess.c
+++ b/apps/plugins/chessbox/gnuchess.c
@@ -103,8 +103,9 @@ short INCscore;
103short HasPawn[2],HasKnight[2],HasBishop[2],HasRook[2],HasQueen[2]; 103short HasPawn[2],HasKnight[2],HasBishop[2],HasRook[2],HasQueen[2];
104short ChkFlag[maxdepth],CptrFlag[maxdepth],PawnThreat[maxdepth]; 104short ChkFlag[maxdepth],CptrFlag[maxdepth],PawnThreat[maxdepth];
105short Pscore[maxdepth],Tscore[maxdepth],Threat[maxdepth]; 105short Pscore[maxdepth],Tscore[maxdepth],Threat[maxdepth];
106struct GameRec GameList[240]; 106struct GameRec GameList[MAX_GAME_CNT];
107short GameCnt,Game50,epsquare,lpost,rcptr,contempt; 107unsigned char GameCnt; /*Bug fix now rolls over instead of overflow*/
108short Game50,epsquare,lpost,rcptr,contempt;
108short MaxSearchDepth,Xscore; 109short MaxSearchDepth,Xscore;
109struct TimeControlRec TimeControl; 110struct TimeControlRec TimeControl;
110short TCflag,TCmoves,TCminutes,OperatorTime; 111short TCflag,TCmoves,TCminutes,OperatorTime;
@@ -1132,7 +1133,7 @@ static short i,alpha,beta,score,tempb,tempc,tempsf,tempst,xside,rpt;
1132 if (--TimeControl.moves[side] == 0) SetTimeControl(); 1133 if (--TimeControl.moves[side] == 0) SetTimeControl();
1133 } 1134 }
1134 if ((root->flags & draw) && bothsides) quit = true; 1135 if ((root->flags & draw) && bothsides) quit = true;
1135 if (GameCnt > 238) quit = true; 1136 if (GameCnt > MAX_GAME_CNT - 2) quit = true;
1136 player = xside; 1137 player = xside;
1137 Sdepth = 0; 1138 Sdepth = 0;
1138 return(0); 1139 return(0);
@@ -2319,7 +2320,7 @@ void NewGame() {
2319 xwndw = 90; 2320 xwndw = 90;
2320 MaxSearchDepth = 29; 2321 MaxSearchDepth = 29;
2321 contempt = 0; 2322 contempt = 0;
2322 GameCnt = -1; Game50 = 0; 2323 GameCnt = MAX_GAME_CNT - 1; Game50 = 0;
2323 Zwmtl = Zbmtl = 0; 2324 Zwmtl = Zbmtl = 0;
2324 Developed[white] = Developed[black] = false; 2325 Developed[white] = Developed[black] = false;
2325 castld[white] = castld[black] = false; 2326 castld[white] = castld[black] = false;