mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-03 23:04:08 +01:00
fix bug: if you're iterating through hints and you drag a tile to the
left of tray divider (without moving divider) it may still be included in hinted moves. Fix is to reset engine whenever the set of tiles left of divider changes.
This commit is contained in:
parent
ff49ce61a5
commit
5084e70843
1 changed files with 8 additions and 0 deletions
|
@ -3725,6 +3725,14 @@ boardTilesChanged( void* p_board, XP_U16 turn, XP_S16 index1, XP_S16 index2 )
|
|||
BoardCtxt* board = (BoardCtxt*)p_board;
|
||||
if ( turn == board->selPlayer ) {
|
||||
invalTrayTilesBetween( board, index1, index2 );
|
||||
|
||||
/* If we're changing the set of ignored tiles, reset the engine */
|
||||
XP_U16 divLoc = model_getDividerLoc( board->model, turn );
|
||||
if ( index1 < divLoc && index2 < divLoc ) {
|
||||
/* both below; no need to reset */
|
||||
} else if ( index1 < divLoc || index2 < divLoc ) {
|
||||
board_resetEngine( board );
|
||||
}
|
||||
}
|
||||
} /* boardTilesChanged */
|
||||
|
||||
|
|
Loading…
Reference in a new issue