Example #1
0
/// <summary>
/// adds value o existing resource or adds entirely new resource
/// </summary>
/// <param name="datFukkenBlock"></param>
        public void consumeTB(Tradeblock datFukkenBlock)
        {
            if (this.EndCity.containsResource(datFukkenBlock.giveTransportName()))
            {
                this.EndCity.addToResource(datFukkenBlock.giveTransportName(), datFukkenBlock.giveTransportQuantity());
            }
            else
            {
                Resource temp = new Resource(datFukkenBlock.giveTransportName(), datFukkenBlock.giveTransportQuantity(), EndCity);
            }
        }
Example #2
0
        public void addTradeBlock(string resource, int quantity)
        {
            Tradeblock temp = new Tradeblock(this.distance, this.roadspeed, quantity, resource);

            blocks.Add(temp);
        }