示例#1
0
        public Profit GetProfit()
        {
            float ourAmount   = GoodsReceived.Sum(amount => amount.NumResources * GetPrice(amount.ResourceType)) + MoneyReceived;
            float theirAmount = GoodsSent.Sum(amount => amount.NumResources * GetPrice(amount.ResourceType)) + MoneySent;

            return(new Profit()
            {
                OurValue = ourAmount, TheirValue = theirAmount
            });
        }