Return null for unoccupied positions in the player oid array.

git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3520 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
Andrzej Kapolka
2005-04-22 18:35:05 +00:00
parent 84d7d7a611
commit d065bfde1c
@@ -158,11 +158,18 @@ public class CardGameManager extends GameManager
}
/**
* Returns the client object corresponding to the specified player index.
* Returns the client object corresponding to the specified player index,
* or null if the position is not occupied by a player.
*/
public ClientObject getClientObject (int pidx)
{
return (ClientObject)PresentsServer.omgr.getObject(_playerOids[pidx]);
if (_playerOids[pidx] != 0) {
return (ClientObject)PresentsServer.omgr.getObject(
_playerOids[pidx]);
} else {
return null;
}
}
/**