mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-07 05:24:46 +01:00
Merge branch 'android_branch' into relay_noconn
Conflicts: xwords4/android/XWords4/archive/R.java xwords4/android/XWords4/res/values/strings.xml xwords4/android/XWords4/res_src/values-ba_CK/strings.xml xwords4/android/XWords4/res_src/values-ca_PS/strings.xml xwords4/android/XWords4/src/org/eehouse/android/xw4/SMSInviteDelegate.java
This commit is contained in:
commit
684c7ff3e3
2 changed files with 10 additions and 2 deletions
|
@ -2107,6 +2107,7 @@ board_requestHint( BoardCtxt* board,
|
|||
if ( searchComplete && canMove ) {
|
||||
model_makeTurnFromMoveInfo( model, selPlayer, &newMove);
|
||||
} else {
|
||||
result = XP_FALSE;
|
||||
XP_STATUSF( "unable to complete hint request\n" );
|
||||
}
|
||||
*workRemainsP = !searchComplete;
|
||||
|
@ -2124,6 +2125,10 @@ board_requestHint( BoardCtxt* board,
|
|||
} else {
|
||||
util_userError( board->util, ERR_NO_HINT_FOUND );
|
||||
}
|
||||
|
||||
if ( !result ) {
|
||||
util_userError( board->util, ERR_NO_HINT_FOUND );
|
||||
}
|
||||
}
|
||||
return result || redraw;
|
||||
} /* board_requestHint */
|
||||
|
|
|
@ -393,6 +393,7 @@ engine_findMove( EngineCtxt* engine, const ModelCtxt* model,
|
|||
{
|
||||
XP_Bool result = XP_TRUE;
|
||||
XP_U16 star_row;
|
||||
XP_Bool canMove = XP_FALSE;
|
||||
|
||||
engine->nTilesMax = XP_MIN( MAX_TRAY_TILES, nTiles );
|
||||
#ifdef XWFEATURE_BONUSALL
|
||||
|
@ -445,9 +446,9 @@ engine_findMove( EngineCtxt* engine, const ModelCtxt* model,
|
|||
dictionary's emtpy or there are no tiles, still return TRUE so we don't
|
||||
get scheduled again. Fixes infinite loop with empty dict and a
|
||||
robot. */
|
||||
*canMoveP = NULL != dict_getTopEdge(engine->dict)
|
||||
canMove = NULL != dict_getTopEdge(engine->dict)
|
||||
&& initTray( engine, tiles, nTiles );
|
||||
if ( *canMoveP ) {
|
||||
if ( canMove ) {
|
||||
|
||||
util_engineStarting( engine->util,
|
||||
engine->rack[engine->blankTile] );
|
||||
|
@ -528,6 +529,7 @@ engine_findMove( EngineCtxt* engine, const ModelCtxt* model,
|
|||
XP_MEMCPY( newMove, &move->moveInfo, sizeof(*newMove) );
|
||||
} else {
|
||||
newMove->nTiles = 0;
|
||||
canMove = XP_FALSE;
|
||||
}
|
||||
result = XP_TRUE;
|
||||
}
|
||||
|
@ -540,6 +542,7 @@ engine_findMove( EngineCtxt* engine, const ModelCtxt* model,
|
|||
newMove->nTiles = 0;
|
||||
}
|
||||
|
||||
*canMoveP = canMove;
|
||||
return result;
|
||||
} /* engine_findMove */
|
||||
|
||||
|
|
Loading…
Reference in a new issue