mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-04 23:02:02 +01:00
add gi_countHumans
This commit is contained in:
parent
3e4097e9b3
commit
1c199500c3
2 changed files with 14 additions and 0 deletions
|
@ -313,6 +313,19 @@ gi_copy( MPFORMAL CurGameInfo* destGI, CurGameInfo* srcGI )
|
||||||
}
|
}
|
||||||
} /* gi_copy */
|
} /* gi_copy */
|
||||||
|
|
||||||
|
XP_U16
|
||||||
|
gi_countHumans( CurGameInfo* gi )
|
||||||
|
{
|
||||||
|
XP_U16 count = 0;
|
||||||
|
XP_U16 nPlayers = gi->nPlayers;
|
||||||
|
while ( nPlayers-- ) {
|
||||||
|
if ( !gi->players[nPlayers].isRobot ) {
|
||||||
|
++count;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return count;
|
||||||
|
} /* gi_countHumans */
|
||||||
|
|
||||||
void
|
void
|
||||||
gi_readFromStream( MPFORMAL XWStreamCtxt* stream, CurGameInfo* gi )
|
gi_readFromStream( MPFORMAL XWStreamCtxt* stream, CurGameInfo* gi )
|
||||||
{
|
{
|
||||||
|
|
|
@ -91,6 +91,7 @@ void gi_disposePlayerInfo( MPFORMAL CurGameInfo* gi );
|
||||||
void gi_writeToStream( XWStreamCtxt* stream, CurGameInfo* gi );
|
void gi_writeToStream( XWStreamCtxt* stream, CurGameInfo* gi );
|
||||||
void gi_readFromStream( MPFORMAL XWStreamCtxt* stream, CurGameInfo* gi );
|
void gi_readFromStream( MPFORMAL XWStreamCtxt* stream, CurGameInfo* gi );
|
||||||
void gi_copy( MPFORMAL CurGameInfo* destGI, CurGameInfo* srcGi );
|
void gi_copy( MPFORMAL CurGameInfo* destGI, CurGameInfo* srcGi );
|
||||||
|
XP_U16 gi_countHumans( CurGameInfo* gi );
|
||||||
|
|
||||||
XP_Bool player_hasPasswd( LocalPlayer* player );
|
XP_Bool player_hasPasswd( LocalPlayer* player );
|
||||||
XP_Bool player_passwordMatches( LocalPlayer* player, XP_U8* buf, XP_U16 len );
|
XP_Bool player_passwordMatches( LocalPlayer* player, XP_U8* buf, XP_U16 len );
|
||||||
|
|
Loading…
Reference in a new issue