Exemple #1
0
        public static GameInfo FromUpdateInfo(GameUpdateInfo source, bool isPlaying)
        {
            var result = new GameInfo();

            if (isPlaying)
            {
                result.Players          = source.Players.Select(GameInfo.Player.Map).ToArray();
                result.SubPhaseStart    = source.SubPhase.EnterTime;
                result.SubPhaseDuration = source.SubPhase.Duration;
            }

            result.Phase    = source.PhaseName;
            result.SubPhase = source.SubPhase.Name;
            return(result);
        }
Exemple #2
0
 public UpdateGameStateRequest(GameUpdateInfo gameState)
 {
     GameState = gameState;
 }