Exemplo n.º 1
0
        // when company gives sell offer to something, it is actually moved to market
        public void AddSellOffer(SellOffer offer)
        {
            offer.Seller.commodityStorage.Withdraw(offer.Commodity, offer.Ammount);
            sellOffers.Add(offer);

            Console.WriteLine(String.Format("On market {0} {1} wants to sell {2} of {3} for {4} per one",
                                            Name, offer.Seller.Name, offer.Ammount.ToString(), offer.Commodity.Name, offer.PricePerPiece.ToString()));
        }
Exemplo n.º 2
0
 private void FinizeOfferPartiallyAndLog(SellOffer offer, int ammount, AssetsOwner buyer)
 {
     offer.FinalizeOfferPartially(buyer, ammount);
     SalesHistory.AddTodaySaleData(offer.Commodity, ammount, offer.PricePerPiece);
 }
Exemplo n.º 3
0
 private void FinalizeOfferAndLog(SellOffer offer, AssetsOwner buyer)
 {
     offer.FinalizeOffer(buyer);
     SalesHistory.AddTodaySaleData(offer.Commodity, offer.Ammount, offer.PricePerPiece);
 }