コード例 #1
0
        public void DealAgeCardsFor3PlayersTest()
        {
            var manager = new GameFlowManager();

            manager.CreateNewPlayer("paul");
            manager.CreateNewPlayer("mary");
            manager.CreateNewPlayer("tracy");
            manager.SetupGame();
            manager.StartAge();
            Assert.IsFalse(manager.Players.Any(p => p.SelectableCards.Count != 7));
            Assert.IsFalse(manager.Players.Any(p => p.SelectableCards.Any(c => c.Age != Age.I)));
        }
コード例 #2
0
        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();
            }
        }
コード例 #3
0
ファイル: Program.cs プロジェクト: elton1086/SevenWonders
 static void StartGame()
 {
     manager.SetupGame();
     manager.StartAge();
 }