protected Card(CardCategory category, int cost, int pointValue) { _currentZone = new NullZone(); _zoneChanger = zone => _currentZone = zone; Category = category; Cost = cost; PointValue = pointValue; }
public void MoveAllCards(CardZone targetZone) { var tempCards = new List<Card>(this.Cards); tempCards.Each(c => c.MoveTo(targetZone)); }
public void MoveTo(CardZone targetZone) { _currentZone.MoveCard(this, targetZone, _zoneChanger); _currentZone = targetZone; }
public virtual void MoveCard(Card card, CardZone targetZone, CardZoneChanger changer) { RemoveCard(card); targetZone.AddCard(card); changer(targetZone); }
public void MoveAll(CardZone targetZone) { IList<Card> allCards = new List<Card>(this._cards); foreach(Card c in allCards) c.MoveTo(targetZone); }
public void SetUp() { _zone1 = new CardZone(); _zone2 = new CardZone(); _card = new DummyCard(); }