コード例 #1
0
ファイル: CardCostTests.cs プロジェクト: vladdou/Dominion
        public void CardCost_of_3P_is_not_enough_for_CardCost_of_5()
        {
            CardCost cost5  = 5;
            CardCost cost3P = CardCost.Parse("3P");

            Assert.False(cost3P.IsEnoughFor(cost5));
        }
コード例 #2
0
ファイル: CardCostTests.cs プロジェクト: vladdou/Dominion
        public void CardCost_of_5_is_enough_for_CardCost_of_3()
        {
            CardCost cost5 = 5;
            CardCost cost3 = 3;

            Assert.That(cost5.IsEnoughFor(cost3));
        }
コード例 #3
0
ファイル: CardCostTests.cs プロジェクト: vladdou/Dominion
        public void CardCost_of_2P_is_enough_for_CardCost_of_2P()
        {
            CardCost cost1 = CardCost.Parse("2P");
            CardCost cost2 = CardCost.Parse("2P");

            Assert.That(cost1.IsEnoughFor(cost2));
        }
コード例 #4
0
ファイル: CardCostTests.cs プロジェクト: vladdou/Dominion
        public void CardCost_of_5_is_enough_for_CardCost_of_5()
        {
            CardCost cost1 = 5;
            CardCost cost2 = 5;

            Assert.That(cost1.IsEnoughFor(cost2));
        }
コード例 #5
0
 public static ISelectionSpecification SelectPileCostingUpToX(CardCost costUpTo)
 {
     return new SelectionSpecification
     {
         MatchFunction = cards => cards.Count() == 1 && costUpTo.IsEnoughFor(cards.Single()),
         ActivityType = ActivityType.SelectPile,
         Cost = costUpTo
     };
 }
コード例 #6
0
 public static ISelectionSpecification SelectPileCostingUpToX(CardCost costUpTo)
 {
     return(new SelectionSpecification
     {
         MatchFunction = cards => cards.Count() == 1 && costUpTo.IsEnoughFor(cards.Single()),
         ActivityType = ActivityType.SelectPile,
         Cost = costUpTo
     });
 }