public void testGetCost() { Card test = new Card(0, 0, 0, 0, 0, 0, 0, "Null Card", "Null Card", 0, "Null"); Assert.AreEqual(0, test.getCost()); test = new Card(0, 0, 0, 0, 1, 0, 1, "Null Card", "Null Card", 1, "Null"); Assert.AreEqual(1, test.getCost()); test = new Card(3, 0, 2, 0, 99, 4, 99, "Null Card", "Null Card", 99, "Null"); Assert.AreEqual(99, test.getCost()); }
public StatusObject trashForGain(Card c) { StatusObject o = new StatusObject(false); if (this.myHand.getHand().Count == 0) { o.setTrashedCorrectly(true); this.currencyForGainBonus = 0; this.gainsLeft = 0; } if (this.gain) { //check if card is in hand or if its feast (which has already been played) if (this.myHand.contains(c)) { this.myHand.remove(c);//don't put it anywhere so trashed this.currencyForGain = c.getCost() + this.currencyForGainBonus; if (this.gainsLeft <= 0) { this.currencyForGainBonus = 0; } o.setTrashedCorrectly(true); } } return o; }