コード例 #1
0
ファイル: SummonActionTest.cs プロジェクト: APuzik/LoCaM
        private void RunInvalidSummonCreatureTest(int id)
        {
            int expectedMyHealth    = player1.Data.Health;
            int expectedOppHealth   = player2.Data.Health;
            int expectedNextDraw    = player1.NextDrawSize;
            int expectedPlayerTable = player1.Table.Count;
            int expectedPlayerHand  = player1.Hand.Count;

            SummonAction action = new SummonAction(id);
            bool         result = action.Execute(player1, player2);

            Assert.IsTrue(result);
            Assert.AreEqual(expectedMyHealth, player1.Data.Health);
            Assert.AreEqual(expectedOppHealth, player2.Data.Health);
            Assert.AreEqual(expectedNextDraw, player1.NextDrawSize);
            Assert.AreEqual(expectedPlayerHand, player1.Hand.Count);
            Assert.AreEqual(expectedPlayerTable, player1.Table.Count);
        }
コード例 #2
0
ファイル: SummonActionTest.cs プロジェクト: APuzik/LoCaM
        private void RunSummonCreatureTest(int id)
        {
            Card card = player1.Hand[id];

            player1.Mana = card.Cost;

            int expectedMyHealth    = player1.Data.Health + card.MyHealthChange;
            int expectedOppHealth   = player2.Data.Health + card.OppHealthChange;
            int expectedNextDraw    = player1.NextDrawSize + card.Draw;
            int expectedPlayerTable = Math.Min(player1.Table.Count + 1, MAX_ON_TABLE);
            int expectedPlayerHand  = player1.Hand.Count - 1;

            SummonAction action = new SummonAction(id);
            bool         result = action.Execute(player1, player2);

            Assert.IsTrue(result);
            Assert.AreEqual(expectedMyHealth, player1.Data.Health);
            Assert.AreEqual(expectedOppHealth, player2.Data.Health);
            Assert.AreEqual(expectedNextDraw, player1.NextDrawSize);
            Assert.AreEqual(expectedPlayerTable, player1.Table.Count);
            Assert.AreEqual(expectedPlayerHand, player1.Hand.Count);
            Assert.AreEqual(card.IsCharge, player1.Table[id].CanAttack);
        }