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; } }
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; }
public void Remove(Auction auction) { _auctions.Remove(auction); }
public void Add(Auction auction) { auction.Expires = AuctionLength; _auctions.Add(auction); }
public bool OutOfRange(Auction auction) { var vector = Location.Position - auction.Location.Position; return vector.Magnitude > Range; }