mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2024-11-18 10:08:29 +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
992681f1da
commit
5894369301
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