Exemple #1
0
        public void Card_CityStatesAction1()
        {
            // player2 has 4 towers.  transfers red card to player1's tableau.  draws a 1

            //testGame.Players[1].SelectsCards = new List<int>() { 0 };
            testGame.Players[1].Tableau.Stacks[Color.Yellow].AddCardToTop(
                new Card {
                Name = "Test Yellow Card", Color = Color.Yellow, Age = 1, Top = Symbol.Blank, Left = Symbol.Tower, Center = Symbol.Tower, Right = Symbol.Tower
            }
                );

            bool result = new CityStates().Actions.ToList()[0].ActionHandler(new CardActionParameters {
                TargetPlayer = testGame.Players[1], Game = testGame, ActivePlayer = testGame.Players[0], PlayerSymbolCounts = new Dictionary <IPlayer, Dictionary <Symbol, int> >()
            });

            Assert.AreEqual(true, result);

            Assert.AreEqual(1, testGame.Players[0].Tableau.Stacks[Color.Blue].Cards.Count);
            Assert.AreEqual(0, testGame.Players[0].Tableau.Stacks[Color.Green].Cards.Count);
            Assert.AreEqual(2, testGame.Players[0].Tableau.Stacks[Color.Red].Cards.Count);
            Assert.AreEqual(0, testGame.Players[0].Tableau.Stacks[Color.Purple].Cards.Count);
            Assert.AreEqual(1, testGame.Players[0].Tableau.Stacks[Color.Yellow].Cards.Count);

            Assert.AreEqual(0, testGame.Players[1].Tableau.Stacks[Color.Red].Cards.Count);
            Assert.AreEqual(1, testGame.Players[1].Tableau.Stacks[Color.Yellow].Cards.Count);
            Assert.AreEqual(3, testGame.Players[1].Hand.Count);

            Assert.AreEqual(0, testGame.Players[0].Tableau.ScorePile.Count);
            Assert.AreEqual(0, testGame.Players[1].Tableau.ScorePile.Count);
        }
Exemple #2
0
        public void Card_CityStatesAction1_WhenNotEnoughTowers()
        {
            // player2 doesn't have 4 towers.. dogma doesn't activate
            bool result = new CityStates().Actions.ToList()[0].ActionHandler(new CardActionParameters {
                TargetPlayer = testGame.Players[1], Game = testGame, ActivePlayer = testGame.Players[0], PlayerSymbolCounts = new Dictionary <IPlayer, Dictionary <Symbol, int> >()
            });

            Assert.AreEqual(false, result);

            Assert.AreEqual(1, testGame.Players[0].Tableau.Stacks[Color.Blue].Cards.Count);
            Assert.AreEqual(0, testGame.Players[0].Tableau.Stacks[Color.Green].Cards.Count);
            Assert.AreEqual(1, testGame.Players[0].Tableau.Stacks[Color.Red].Cards.Count);
            Assert.AreEqual(0, testGame.Players[0].Tableau.Stacks[Color.Purple].Cards.Count);
            Assert.AreEqual(1, testGame.Players[0].Tableau.Stacks[Color.Yellow].Cards.Count);

            Assert.AreEqual(1, testGame.Players[1].Tableau.Stacks[Color.Red].Cards.Count);
            Assert.AreEqual(0, testGame.Players[1].Tableau.Stacks[Color.Yellow].Cards.Count);
            Assert.AreEqual(2, testGame.Players[1].Hand.Count);

            Assert.AreEqual(0, testGame.Players[0].Tableau.ScorePile.Count);
            Assert.AreEqual(0, testGame.Players[1].Tableau.ScorePile.Count);
        }