Made it possible to make extended use of the playerStatus array.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3994 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
@@ -151,8 +151,8 @@ public class GameObject extends PlaceObject
|
||||
*/
|
||||
public boolean isActivePlayer (int pidx)
|
||||
{
|
||||
return (isOccupiedPlayer(pidx) &&
|
||||
(playerStatus == null || playerStatus[pidx] == PLAYER_IN_PLAY));
|
||||
return isOccupiedPlayer(pidx) &&
|
||||
(playerStatus == null || isActivePlayerStatus(playerStatus[pidx]));
|
||||
}
|
||||
|
||||
|
||||
@@ -247,6 +247,16 @@ public class GameObject extends PlaceObject
|
||||
return PartyGameConfig.NOT_PARTY_GAME;
|
||||
}
|
||||
|
||||
/**
|
||||
* Used by {@link #isActivePlayer} to determine if the supplied status is
|
||||
* associated with an active player (one that has not resigned from the
|
||||
* game and/or left the game room).
|
||||
*/
|
||||
protected boolean isActivePlayerStatus (int playerStatus)
|
||||
{
|
||||
return playerStatus == PLAYER_IN_PLAY;
|
||||
}
|
||||
|
||||
// documentation inherited
|
||||
protected void which (StringBuffer buf)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user