Esempio n. 1
0
        public override void ProcessUpdate(SimonSquared.Online.DataContracts.GameStatusUpdate update)
        {
            if (update is BeginGameUpdate)
            {
                _startNextRoundCount++;
            }

            if (_startNextRoundCount >= 1)
            {
                Game.TransitionToState(typeof(BeginningRoundState));
            }
        }
Esempio n. 2
0
        public override void ProcessUpdate(SimonSquared.Online.DataContracts.GameStatusUpdate update)
        {
            if (update is BeginGameUpdate)
            {
                _startCount++;
            }

            if (Game.Players.Count >= 1 && _startCount >= 1)
            {
                Game.IsJoinable = false;
                Game.TransitionToState(typeof(BeginningRoundState));
            }
        }
        public override void ProcessUpdate(SimonSquared.Online.DataContracts.GameStatusUpdate update)
        {
            base.ProcessUpdate(update);

            if (update is PuzzleCompletedUpdate)
            {
                Game.Scoreboard.PuzzleWon((update as PuzzleCompletedUpdate).PlayerId);

                if (Game.CurrentPuzzle < Game.Round.Puzzles.Count - 1)
                {
                    Game.TransitionToState(typeof(BeginningPuzzleState));
                }
                else
                {
                    Game.Scoreboard.RoundCompleted();
                    Game.TransitionToState(typeof(RoundEndedState));
                }
            }
        }