Beispiel #1
0
        public void MakeBet(string message, AuctionRunner runner)
        {
            ThreadPool.QueueUserWorkItem(obj =>
            {
                Thread.CurrentThread.IsBackground = false;
                int currentBet = runner.auction.CurrentBet.CurrentPrice;
                int priceJump  = runner.auction.CurrentBet.MinimunPriceJump;
                if (DoJoin(runner.auction.Item, currentBet + priceJump, runner.auction.StartPrice))
                {
                    int newBetPrice = generateNewBetPrice(currentBet + priceJump);

                    runner.MakeBet(new AgentBet(newBetPrice, this));
                }
            });
        }
Beispiel #2
0
 public void GetBets(string message, AuctionRunner runner)
 {
     _getAgentsBets?.Invoke(message, runner);
 }