From 01b746860e5aaaf70a323531ce3cafbacd95b7e7 Mon Sep 17 00:00:00 2001 From: Eric House Date: Sun, 16 Aug 2015 09:26:48 -0700 Subject: [PATCH] add accessor for current selected player --- xwords4/common/board.c | 6 ++++++ xwords4/common/board.h | 1 + 2 files changed, 7 insertions(+) diff --git a/xwords4/common/board.c b/xwords4/common/board.c index 5e95c6f1f..6696d9d87 100644 --- a/xwords4/common/board.c +++ b/xwords4/common/board.c @@ -1823,6 +1823,12 @@ board_getTrayVisState( const BoardCtxt* board ) return board->trayVisState; } /* board_getTrayVisible */ +XP_S16 +board_getSelPlayer( const BoardCtxt* board ) +{ + return board->selPlayer; +} + static XP_Bool setTrayVisState( BoardCtxt* board, XW_TrayVisState newState ) { diff --git a/xwords4/common/board.h b/xwords4/common/board.h index 196a11c22..06f116fb1 100644 --- a/xwords4/common/board.h +++ b/xwords4/common/board.h @@ -197,6 +197,7 @@ XP_Bool board_focusChanged( BoardCtxt* board, BoardObjectType typ, XP_Bool board_hideTray( BoardCtxt* board ); XP_Bool board_showTray( BoardCtxt* board ); XW_TrayVisState board_getTrayVisState( const BoardCtxt* board ); +XP_S16 board_getSelPlayer( const BoardCtxt* board ); void board_invalTrayTiles( BoardCtxt* board, TileBit what ); XP_Bool board_juggleTray( BoardCtxt* board );