Added a server managed notion of which client is controlling the game.
Doing this on the client, while theoretically possible, is more complex. We have a server, we use it to provide commonly needed services, the assignment of a single client to control the game is a commonly needed service. This also matches the way other services like turn change and game start and end are implemented. A side note: the client-side code was not properly handling disconnected players, which the server code properly handles. git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@224 c613c5cb-e716-0410-b11b-feb51c14d237
This commit is contained in:
@@ -34,6 +34,9 @@ public class StateChangedEvent extends EZEvent
|
||||
/** Indicates that the game has transitioned to a ended state. */
|
||||
public static const GAME_ENDED :String = "GameEnded";
|
||||
|
||||
/** Indicates that a new controller has been assigned. */
|
||||
public static const CONTROL_CHANGED :String = "ControlChanged";
|
||||
|
||||
/** Indicates that the turn has changed. */
|
||||
// TODO: move to own event?
|
||||
public static const TURN_CHANGED :String = "TurnChanged";
|
||||
|
||||
Reference in New Issue
Block a user