public void PickUp() { OnPickedUp(); PickedUp?.Invoke(Card); // maybe card should not directly call Card.Accept Card.Accept(); }
public void UseVisitorPattern() { Equipment component = new Card("aCard"); PricingVisitor visitor = new PricingVisitor(); component.Accept(visitor); // Total Price for component var totalPrice = visitor.TotalPrice; }
public void Accept() { card.Accept(); }