Exemple #1
0
 static void PlayTurn()
 {
     Console.WriteLine(string.Format("Play turn {0}", manager.CurrentTurn));
     Console.WriteLine();
     foreach (var p in manager.Players)
     {
         ChoosePlay(p);
     }
     manager.PlayTurn();
     Console.WriteLine("Played cards");
     foreach (var p in manager.Players)
     {
         Console.WriteLine(string.Format("{0} => {1} => {2}", p.Name.ToUpper(), p.ExecutedAction, p.SelectedCard.Name));
     }
     Console.WriteLine();
     //Seventh card should be played before the rest of extra choice play
     SeventhCardPlay();
     ExtraChoicePlay();
     manager.CollectTurnRewards();
     manager.EndTurn();
     if (manager.CurrentTurn == 1)
     {
         ConflictResults();
         NextAge();
     }
     else if (manager.CurrentTurn > 6 && manager.CurrentAge == Age.III)
     {
         ConflictResults();
     }
     Console.WriteLine();
 }
        public void PlayTurnTest()
        {
            var manager = new GameFlowManager();

            manager.CreateNewPlayer("paul");
            manager.CreateNewPlayer("mary");
            manager.CreateNewPlayer("tracy");
            manager.SetupGame();
            manager.StartAge();
            for (int i = 0; i < 7; i++)
            {
                foreach (var p in manager.Players)
                {
                    p.SelectedCard = p.SelectableCards[0];
                    p.ChosenAction = TurnAction.BuyCard;
                }
                manager.PlayTurn();
                manager.CollectTurnRewards();
                manager.EndTurn();
            }
        }