Added a convenient method to get the PartyGameType.

git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@173 c613c5cb-e716-0410-b11b-feb51c14d237
This commit is contained in:
Ray Greenwell
2007-02-10 03:33:31 +00:00
parent bde4a67bed
commit 3bd6b15304
@@ -84,9 +84,19 @@ public class GameManager extends PlaceManager
*/ */
public boolean isPartyGame () public boolean isPartyGame ()
{ {
return (_gameconfig instanceof PartyGameConfig) && return (getPartyGameType() != PartyGameConfig.NOT_PARTY_GAME);
(((PartyGameConfig)_gameconfig).getPartyGameType() != }
PartyGameConfig.NOT_PARTY_GAME);
/**
* Get the type of party game being played.
*/
public byte getPartyGameType ()
{
if (_gameconfig instanceof PartyGameConfig) {
return ((PartyGameConfig) _gameconfig).getPartyGameType();
} else {
return PartyGameConfig.NOT_PARTY_GAME;
}
} }
/** /**