Example #1
0
        public void Add(Auction auction, long settlementPrice, Item item)
        {
            long price;
            _spendByOwner.TryGetValue(auction.Owner, out price);
            _spendByOwner[auction.Owner] = price + settlementPrice;

            if (_item == null)
            {
                _item = item;
            }
            else
            {
                _item.Quantity += item.Quantity;
            }
        }
Example #2
0
        private bool GetBlockSize(Auction auction, out uint blockSize)
        {
            blockSize = BlockSize;
            while (blockSize < Quantity && blockSize < auction.Quantity)
            {
                if (blockSize%auction.BlockSize == 0)
                {
                    return true;
                }

                blockSize += BlockSize;
            }

            return false;
        }
Example #3
0
 public void Remove(Auction auction)
 {
     _auctions.Remove(auction);
 }
Example #4
0
 public void Add(Auction auction)
 {
     auction.Expires = AuctionLength;
     _auctions.Add(auction);
 }
Example #5
0
 public bool OutOfRange(Auction auction)
 {
     var vector = Location.Position - auction.Location.Position;
     return vector.Magnitude > Range;
 }