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:
@@ -1,5 +1,5 @@
|
||||
//
|
||||
// $Id: TurnGameObject.java,v 1.3 2002/02/12 07:01:54 mdb Exp $
|
||||
// $Id: TurnGameObject.java,v 1.4 2002/10/15 23:07:23 shaper Exp $
|
||||
|
||||
package com.threerings.parlor.turn;
|
||||
|
||||
@@ -20,8 +20,8 @@ public interface TurnGameObject
|
||||
|
||||
/**
|
||||
* Returns the username of the player who is currently taking their
|
||||
* turn in this turn-based game or null if no user currently holds the
|
||||
* turn.
|
||||
* turn in this turn-based game or <code>null</code> if no user
|
||||
* currently holds the turn.
|
||||
*/
|
||||
public String getTurnHolder ();
|
||||
|
||||
@@ -30,4 +30,9 @@ public interface TurnGameObject
|
||||
* value.
|
||||
*/
|
||||
public void setTurnHolder (String turnHolder);
|
||||
|
||||
/**
|
||||
* Returns the array of player names involved in the game.
|
||||
*/
|
||||
public String[] getPlayers ();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user