private MaxBidCanBeExceededBy ( |
||
bid | ||
리턴 | bool |
private WinningBid DetermineWinnerFromProxyBidding(WinningBid winningBid, Bid newbid) { WinningBid nextIncrement; if (winningBid.MaxBidCanBeExceededBy(newbid.MaximumBid)) { nextIncrement = CreateNewBid(this.Bidder, this.MaximumBid, this.MaximumBid, this.TimeOfBid); if (nextIncrement.CanMeetOrExceedBidIncrement(newbid.MaximumBid)) { return(CreateNewBid(newbid.Bidder, nextIncrement.CurrentAuctionPrice.BidIncrement(), newbid.MaximumBid, newbid.TimeOfOffer)); } else { return(CreateNewBid(newbid.Bidder, newbid.MaximumBid, newbid.MaximumBid, newbid.TimeOfOffer)); } } else { nextIncrement = CreateNewBid(newbid.Bidder, newbid.MaximumBid, newbid.MaximumBid, newbid.TimeOfOffer); if (nextIncrement.CanMeetOrExceedBidIncrement(winningBid.MaximumBid)) { return(CreateNewBid(winningBid.Bidder, nextIncrement.CurrentAuctionPrice.BidIncrement(), winningBid.MaximumBid, winningBid.TimeOfBid)); } else { return(CreateNewBid(winningBid.Bidder, winningBid.MaximumBid, winningBid.MaximumBid, winningBid.TimeOfBid)); } } }
private WinningBid DetermineWinnerFromProxyBidding(WinningBid winningBid, Bid newbid) { WinningBid nextIncrement; if (winningBid.MaxBidCanBeExceededBy(newbid.MaximumBid)) { nextIncrement = CreateNewBid(this.Bidder, this.MaximumBid, this.MaximumBid, this.TimeOfBid); if (nextIncrement.CanMeetOrExceedBidIncrement(newbid.MaximumBid)) return CreateNewBid(newbid.Bidder, nextIncrement.CurrentAuctionPrice.BidIncrement(), newbid.MaximumBid, newbid.TimeOfOffer); else return CreateNewBid(newbid.Bidder, newbid.MaximumBid, newbid.MaximumBid, newbid.TimeOfOffer); } else { nextIncrement = CreateNewBid(newbid.Bidder, newbid.MaximumBid, newbid.MaximumBid, newbid.TimeOfOffer); if (nextIncrement.CanMeetOrExceedBidIncrement(winningBid.MaximumBid)) return CreateNewBid(winningBid.Bidder, nextIncrement.CurrentAuctionPrice.BidIncrement(), winningBid.MaximumBid, winningBid.TimeOfBid); else return CreateNewBid(winningBid.Bidder, winningBid.MaximumBid, winningBid.MaximumBid, winningBid.TimeOfBid); } }