cleanup for no hintlimit feature case

This commit is contained in:
ehouse 2004-06-27 04:35:42 +00:00
parent 03011152d6
commit afa67f1a3c
3 changed files with 14 additions and 5 deletions

View file

@ -78,8 +78,9 @@ struct EngineCtxt {
Crosscheck rowChecks[MAX_ROWS]; // also used in xwscore
XP_U16 scoreCache[MAX_ROWS];
XP_U16 nTilesMax;
#ifdef XWFEATURE_SEARCHLIMIT
XP_U16 nTilesMin, nTilesMax;
XP_U16 nTilesMin;
XP_U16 nTilesMinUser, nTilesMaxUser;
XP_Bool tileLimitsKnown;
BdHintLimits* searchLimits;
@ -951,7 +952,11 @@ extendRight( EngineCtxt* engine, Tile* tiles, XP_U16 tileLength,
return;
}
check_exit:
if ( accepting && tileLength >= engine->nTilesMin ) {
if ( accepting
#ifdef XWFEATURE_SEARCHLIMIT
&& tileLength >= engine->nTilesMin
#endif
) {
considerMove( engine, tiles, tileLength, firstCol, col, row );
}
} /* extendRight */

View file

@ -590,9 +590,9 @@ makeRobotMove( ServerCtxt* server )
XP_ASSERT( !!server_getEngineFor( server, turn ) );
finished = engine_findMove( server_getEngineFor( server, turn ),
model, model_getDictionary( model ),
tileSet->tiles, tileSet->nTiles, 0,
tileSet->tiles, tileSet->nTiles,
#ifdef XWFEATURE_SEARCHLIMIT
NULL,
NULL, XP_FALSE,
#endif
targetScore, &canMove, &newMove );
if ( finished ) {

View file

@ -329,7 +329,11 @@ static XP_Bool
handleHint( CursesAppGlobals* globals )
{
XP_Bool redo;
globals->doDraw = board_requestHint( globals->cGlobals.game.board, 0, &redo );
globals->doDraw = board_requestHint( globals->cGlobals.game.board,
#ifdef XWFEATURE_SEARCHLIMIT
XP_FALSE,
#endif
&redo );
return XP_TRUE;
} /* handleHint */