Revamped the player array in the game object to allow sparse player arrays

that may have one or more null player entries so that party games can
create their game with the maximum number of players they support and can
use the player index as the player's "seat".  Simplified some of the
jockeying we had to do when adding and removing players.  Complexified
some of the turn game management in order to deal properly with the sparse
player arrays.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1802 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
Walter Korman
2002-10-15 23:07:23 +00:00
parent 1d7f033586
commit 21c599cd0a
7 changed files with 257 additions and 108 deletions
@@ -1,5 +1,5 @@
//
// $Id: TurnGameManager.java,v 1.7 2002/08/06 23:23:39 shaper Exp $
// $Id: TurnGameManager.java,v 1.8 2002/10/15 23:07:23 shaper Exp $
package com.threerings.parlor.turn;
@@ -34,6 +34,12 @@ public interface TurnGameManager
*/
public String getPlayerName (int index);
/**
* Extending {@link GameManager} should automatically handle
* implementing this method.
*/
public int getPlayerIndex (String username);
/**
* Extending {@link GameManager} should automatically handle
* implementing this method.