Beispiel #1
0
        public void GivenThereIsAGameOfPlayerAWithHealthAndPlayerBHasHealth(int p0, int p1)
        {
            playerA = new Player(0, "PA", "Player A", p0 + 1);
            playerB = new Player(1, "PB", "Player B", p1);
            Player[] players = new Player[2];
            players[0] = playerA;
            players[1] = playerB;
            List <Card> ls = new List <Card>();

            c = new PeachGarden(CardSuit.Heart, 3);
            ls.Add(c);
            ls.Add(c);
            ls.Add(c);
            ls.Add(c);
            game = new Game(players, new FakeCardSet(ls));
            game.start(0);
        }
Beispiel #2
0
        public void UsageTest()
        {
            Card x;

            x = new Attack(CardSuit.Club, 0);
            Assert.AreEqual(1, x.numOfTargets());
            x = new Miss(CardSuit.Club, 0);
            Assert.AreEqual(-1, x.numOfTargets()); // this means not usable
            x = new Wine(CardSuit.Club, 0);
            Assert.AreEqual(0, x.numOfTargets());
            x = new Peach(CardSuit.Club, 0);
            Assert.AreEqual(0, x.numOfTargets());
            x = new Negate(CardSuit.Club, 0);
            Assert.AreEqual(-1, x.numOfTargets());
            x = new Barbarians(CardSuit.Club, 0);
            Assert.AreEqual(0, x.numOfTargets());
            x = new HailofArrow(CardSuit.Club, 0);
            Assert.AreEqual(0, x.numOfTargets());
            x = new PeachGarden(CardSuit.Club, 0);
            Assert.AreEqual(0, x.numOfTargets());
            x = new Wealth(CardSuit.Club, 0);
            Assert.AreEqual(0, x.numOfTargets());
            x = new Steal(CardSuit.Club, 0);
            Assert.AreEqual(1, x.numOfTargets());
            x = new Break(CardSuit.Club, 0);
            Assert.AreEqual(1, x.numOfTargets());
            x = new Capture(CardSuit.Club, 0);
            Assert.AreEqual(1, x.numOfTargets());
            x = new Starvation(CardSuit.Club, 0);
            Assert.AreEqual(1, x.numOfTargets());
            x = new Crossbow(CardSuit.Club, 0);
            Assert.AreEqual(0, x.numOfTargets());
            x = new IceSword(CardSuit.Club, 0);
            Assert.AreEqual(0, x.numOfTargets());
            x = new Scimitar(CardSuit.Club, 0);
            Assert.AreEqual(0, x.numOfTargets());
            x = new BlackShield(CardSuit.Club, 0);
            Assert.AreEqual(0, x.numOfTargets());
            x = new EightTrigrams(CardSuit.Club, 0);
            Assert.AreEqual(0, x.numOfTargets());
        }
        public void PeachGardenTest2()
        {
            PeachGarden c = new PeachGarden(CardSuit.Club, (byte)1);

            Assert.AreEqual("PeachGarden", c.ToString());
        }
        public void PeachGardenTest()
        {
            PeachGarden c = new PeachGarden(CardSuit.Club, (byte)1);

            Assert.AreEqual("PeachGarden Description", c.getDescription());
        }