Beispiel #1
0
        public void ExecuteNext()
        {
            ActionType type = _Queue[QueuePos++];

            ActionMap[type].Invoke();
            game.CommitEvent(new ActionEvent(EventMap[type]));
            game.NotifyThread(type);
        }
Beispiel #2
0
        /// <summary>
        ///     Starts the phase for the specific game
        /// </summary>
        /// <param name="game">The game to start the phase for</param>
        /// <returns>The GamePhase which should be activated next</returns>
        public GamePhase Start(GameLogic game)
        {
            Game = game;
            RoundPhase?newPhase = Cathegory ?? game.Phase;

            game.State = NewState;
            game.Phase = newPhase;
            game.CommitEvent(new GamePhaseChangedEvent {
                Information = Information,
                Phase       = newPhase,
                Step        = GetType().Name
            });
            return(Run(game));
        }