public CostComputeEventArgs(ICard card, Cards.Cost cost) { if (card == null || cost == (Cards.Cost)null) { return; } this.Card = card; this.Cost = cost.Clone(); }
public CostComputeEventArgs(ICard card, Cards.Cost cost) { if (card == null || cost == (Cards.Cost)null) return; this.Card = card; this.Cost = cost.Clone(); }
internal int CompareTo(Cost other) { // Check for null if (ReferenceEquals(other, null)) return -1; // Check for same reference if (ReferenceEquals(this, other)) return 0; if (this.Coin == other.Coin) return this.Potion.CompareTo(other.Potion); return this.Coin.CompareTo(other.Coin); }
public static Cost operator -(Cost x, DominionBase.Currencies.Potion y) { Cost c = new Cost(x.Coin, x.Potion); c.Potion -= y; return c; }
public static Cost operator +(Cost x, DominionBase.Currency y) { Cost c = new Cost(x.Coin, x.Potion); c.Coin += y.Coin; c.Potion += y.Potion; return c; }
public static Cost operator -(Cost x, Cost y) { Cost c = new Cost(x.Coin, x.Potion); c.Coin -= y.Coin; c.Potion -= y.Potion; return c; }
public Currency(Cards.Cost cost) : this(cost.Coin, cost.Potion) { }