Stick the players array in the game object; also implemented toString().

git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@467 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
Michael Bayne
2001-10-17 02:48:57 +00:00
parent f863620d39
commit 9e6c104015
2 changed files with 33 additions and 7 deletions
@@ -1,5 +1,5 @@
//
// $Id: GameManager.java,v 1.10 2001/10/12 19:30:44 mdb Exp $
// $Id: GameManager.java,v 1.11 2001/10/17 02:48:57 mdb Exp $
package com.threerings.parlor.game;
@@ -55,11 +55,11 @@ public class GameManager
*/
public void setPlayers (String[] players)
{
// keep this info for later
// 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];
_playerOids = new int[players.length];
}
// documentation inherited
@@ -70,6 +70,9 @@ public class GameManager
// obtain a casted reference to our game object
_gameobj = (GameObject)_plobj;
// stick the players into the game object
_gameobj.setPlayers(_players);
// let the players of this game know that we're ready to roll (if
// we have a specific set of players)
if (_players != null) {
@@ -197,12 +200,12 @@ public class GameManager
/** A reference to our game configuration. */
protected GameConfig _gconfig;
/** The usernames of the players of this game. */
protected String[] _players;
/** A reference to our game object. */
protected GameObject _gameobj;
/** The usernames of the players of this game. */
protected String[] _players;
/** The oids of our player's body objects. */
protected int[] _playerOids;
}