mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-15 15:41:24 +01:00
add board_canHint
This commit is contained in:
parent
a2e4fd09c4
commit
ac6dc400ce
2 changed files with 14 additions and 1 deletions
|
@ -537,12 +537,24 @@ board_canShuffle( const BoardCtxt* board )
|
|||
TRAY_REVEALED == board->trayVisState );
|
||||
}
|
||||
|
||||
XP_Bool board_canTogglePending( const BoardCtxt* board )
|
||||
XP_Bool
|
||||
board_canTogglePending( const BoardCtxt* board )
|
||||
{
|
||||
return TRAY_REVEALED == board->trayVisState
|
||||
&& model_canTogglePending( board->model, board->selPlayer );
|
||||
}
|
||||
|
||||
XP_Bool
|
||||
board_canHint( const BoardCtxt* board )
|
||||
{
|
||||
XP_Bool canHint = !board->gi->hintsNotAllowed;
|
||||
if ( canHint ) {
|
||||
LocalPlayer* lp = &board->gi->players[board->selPlayer];
|
||||
canHint = lp->isLocal && !lp->isRobot;
|
||||
}
|
||||
return canHint;
|
||||
}
|
||||
|
||||
static XP_U16
|
||||
adjustOffset( XP_U16 curOffset, XP_S16 zoomBy )
|
||||
{
|
||||
|
|
|
@ -81,6 +81,7 @@ XP_U16 board_getYOffset( const BoardCtxt* board );
|
|||
XP_Bool board_canFlip( const BoardCtxt* board );
|
||||
XP_Bool board_canShuffle( const BoardCtxt* board );
|
||||
XP_Bool board_canTogglePending( const BoardCtxt* board );
|
||||
XP_Bool board_canHint( const BoardCtxt* board );
|
||||
|
||||
/* zoomBy: >0: zoom in; < 0: zoom out; 0: query only */
|
||||
XP_Bool board_zoom( BoardCtxt* board, XP_S16 zoomBy, XP_Bool* canInOut );
|
||||
|
|
Loading…
Reference in a new issue