No longer do we set the players in an explicit call to
GameManager.setPlayers(), now it is simply provided as part of the game config object which is cleaner and makes the information available during the initialization and permissions checking phases. git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1778 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
//
|
||||
// $Id: GameManager.java,v 1.45 2002/10/06 00:44:16 mdb Exp $
|
||||
// $Id: GameManager.java,v 1.46 2002/10/06 00:53:15 mdb Exp $
|
||||
|
||||
package com.threerings.parlor.game;
|
||||
|
||||
@@ -48,6 +48,12 @@ public class GameManager extends PlaceManager
|
||||
|
||||
// save off a casted reference to our config
|
||||
_gameconfig = (GameConfig)_config;
|
||||
|
||||
// keep this around for now, we'll need it later
|
||||
_players = _gameconfig.players;
|
||||
|
||||
// instantiate a player oid array which we'll fill in later
|
||||
_playerOids = new int[_players.length];
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -153,26 +159,6 @@ public class GameManager extends PlaceManager
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* Provides the game manager with a list of the usernames of all
|
||||
* players in the game. This happens before startup and before the
|
||||
* game object has been created. Note that party games may
|
||||
* subsequently add or remove players via {@link #addPlayer} and
|
||||
* {@link #removePlayer}, and so should be sure to handle a changing
|
||||
* player list gracefully.
|
||||
*
|
||||
* @param players the usernames of all of the players in this game or
|
||||
* a zero-length array if the game has no specific set of players.
|
||||
*/
|
||||
public void setPlayers (String[] players)
|
||||
{
|
||||
// keep this around for now, we'll need it later
|
||||
_players = players;
|
||||
|
||||
// instantiate a player oid array which we'll fill in later
|
||||
_playerOids = new int[players.length];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the specified player as an AI with the specified skill. It is
|
||||
* assumed that this will be set soon after the player names for all
|
||||
|
||||
Reference in New Issue
Block a user