public void AcceptOffer() { if (Offer.IsAvailable) { CurrentMarket.RegisterTransaction(Offer.Commodity); account.Credit(Offer.Value); if (Offer.IsAPurchase) { LoadCargo(Offer.Commodity); } else if (Offer.IsASale) { UnloadCargo(); } Offer.Clear(); } }
public void Pay(ILocation source, ILocation destination) { account.Credit(DistanceBetween(source, destination)); }