Example #1
0
        public void PlayOneAction()
        {
            GameChoice   choice   = this.Get_NextChoice();
            GameStrategy strategy = this.GetStrategy(this.Get_ReadableSnapshot(choice.ControllerID));
            GameEffect   effect   = strategy.ChooseBestAction(choice, this);

            if (!(choice.Options.Contains(effect)))
            {
                Console.WriteLine("GameStrategy " + strategy + " made an invalid choice: " + effect);
                effect = strategy.ChooseBestAction(choice, this);
            }
            if (this.ShouldPrint)
            {
                Console.WriteLine(effect.ToString(this));
            }
            effect.Process(this);
        }