Exemple #1
0
        /// <summary>
        /// Updates the current active player and triggers all the events for a new turn.
        /// </summary>
        public void NewPlayerTurn()
        {
            if (ActivePlayer == Player)
            {
                ActivePlayer    = Opponent;
                NonActivePlayer = Player;

                CommandManager.Instance.AddChild(new AITurnCommand(ActivePlayer, Board.ActivePlayerBoardSection), true, true);
            }
            else
            {
                ActivePlayer    = Player;
                NonActivePlayer = Opponent;
            }

            // Update the appropriate board sections so that we cannot interact unless we are the current active player
            //Board.NonActivePlayerBoardSection.ShouldHandleInput.Value = false;
            //Board.ActivePlayerBoardSection.ShouldHandleInput.Value = true;

            ActivePlayer.NewTurn();
        }