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)); }
public void CardCost_of_5_is_enough_for_CardCost_of_3() { CardCost cost5 = 5; CardCost cost3 = 3; Assert.That(cost5.IsEnoughFor(cost3)); }
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)); }
public void CardCost_of_5_is_enough_for_CardCost_of_5() { CardCost cost1 = 5; CardCost cost2 = 5; Assert.That(cost1.IsEnoughFor(cost2)); }
public static ISelectionSpecification SelectPileCostingUpToX(CardCost costUpTo) { return new SelectionSpecification { MatchFunction = cards => cards.Count() == 1 && costUpTo.IsEnoughFor(cards.Single()), ActivityType = ActivityType.SelectPile, Cost = costUpTo }; }
public static ISelectionSpecification SelectPileCostingUpToX(CardCost costUpTo) { return(new SelectionSpecification { MatchFunction = cards => cards.Count() == 1 && costUpTo.IsEnoughFor(cards.Single()), ActivityType = ActivityType.SelectPile, Cost = costUpTo }); }