public bool AddPurchaser(IPurchaser purchaser) { if (_activePurchasers.Contains(purchaser) == false) { _activePurchasers.Add(purchaser); return(true); } return(false); }
public bool BroadcastPurchaseCompletion(IPurchaser purchaser) { var isPurchaserActive = _activePurchasers.Remove(purchaser); if (isPurchaserActive) { _activePurchasers.ForEach(p => p.Receive(purchaser)); } return(isPurchaserActive); }
public void Receive(IPurchaser purchaser) { var product = purchaser.GetProduct(); _alertScreen.ShowMessage(product.Item, product.Location); }
public ShopCardModel(IPurchaser purchaser, ShopCardData shopLotData) { _shopCardData = shopLotData; _purchaser = purchaser; }