mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2024-12-30 10:26:58 +01:00
A bit of cleanup; no code change.
This commit is contained in:
parent
cf6a3db940
commit
1a2ce36bb0
1 changed files with 7 additions and 9 deletions
|
@ -2051,16 +2051,14 @@ board_beginTrade( BoardCtxt* board )
|
||||||
trade */
|
trade */
|
||||||
if ( 0 != model_getCurrentMoveCount( board->model, board->selPlayer )){
|
if ( 0 != model_getCurrentMoveCount( board->model, board->selPlayer )){
|
||||||
util_userError( board->util, ERR_CANT_TRADE_MID_MOVE );
|
util_userError( board->util, ERR_CANT_TRADE_MID_MOVE );
|
||||||
|
} else if ( server_countTilesInPool(board->server) < MIN_TRADE_TILES){
|
||||||
|
util_userError( board->util, ERR_TOO_FEW_TILES_LEFT_TO_TRADE );
|
||||||
} else {
|
} else {
|
||||||
if ( server_countTilesInPool(board->server) < MIN_TRADE_TILES){
|
board->tradingMiniWindowInvalid = XP_TRUE;
|
||||||
util_userError( board->util, ERR_TOO_FEW_TILES_LEFT_TO_TRADE );
|
board->needsDrawing = XP_TRUE;
|
||||||
} else {
|
board->tradeInProgress[board->selPlayer] = XP_TRUE;
|
||||||
board->tradingMiniWindowInvalid = XP_TRUE;
|
setArrowVisible( board, XP_FALSE );
|
||||||
board->needsDrawing = XP_TRUE;
|
result = XP_TRUE;
|
||||||
board->tradeInProgress[board->selPlayer] = XP_TRUE;
|
|
||||||
setArrowVisible( board, XP_FALSE );
|
|
||||||
result = XP_TRUE;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
|
|
Loading…
Reference in a new issue