mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-16 15:41:16 +01:00
when undoing for purpose of finding last move and there's no pool,
don't attempt to replace tiles.
This commit is contained in:
parent
f2d133e475
commit
6bac32e716
1 changed files with 8 additions and 4 deletions
|
@ -572,11 +572,15 @@ model_undoLatestMoves( ModelCtxt* model, PoolContext* pool,
|
|||
&entry.u.move.moveInfo );
|
||||
} else if ( entry.moveType == TRADE_TYPE ) {
|
||||
|
||||
XP_ASSERT ( !!pool );
|
||||
replaceNewTiles( model, pool, turn, &entry.u.trade.newTiles );
|
||||
if ( pool != NULL ) {
|
||||
/* If there's no pool, assume we're doing this for
|
||||
scoring purposes only. */
|
||||
replaceNewTiles( model, pool, turn,
|
||||
&entry.u.trade.newTiles );
|
||||
|
||||
pool_removeTiles( pool, &entry.u.trade.oldTiles );
|
||||
assignPlayerTiles( model, turn, &entry.u.trade.oldTiles );
|
||||
pool_removeTiles( pool, &entry.u.trade.oldTiles );
|
||||
assignPlayerTiles( model, turn, &entry.u.trade.oldTiles );
|
||||
}
|
||||
|
||||
} else if ( entry.moveType == PHONY_TYPE ) {
|
||||
|
||||
|
|
Loading…
Reference in a new issue