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:
Michael Bayne
2007-03-04 20:05:58 +00:00
parent 3c595d85a5
commit d77b8363f7
8 changed files with 318 additions and 268 deletions
@@ -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";