Hi,

Please forgive if this forum is not the right one for this post.

I'm writing a small ruby program that implements sale of a plot of land
to 5 investors through English Auction. In an English auction, the
auctioneer begins the auction with the reserve price (lowest acceptable
price) and then takes larger and larger bids from the customers until no
one will increase the bid. The item is then sold to the highest bidder.

The logic that i'm using to decide which investor to bid first is this:
1. Each investor has a maximum willing price that they can't exceed.
2. First find out the difference/margin btw an investor's willing price
and the reserve price
3. The investor that has the lowest margin bids first
4. An investor's first bid = reserve price + half of margin
5. Subsequent bids = first bid + 25% of margin i.e. half of the other
half of margin

The code as it is now is attached.

Thanks,

Bashka

Attachments:
http://www.ruby-forum.com/attachment/1072/engBid42.rb

-- 
Posted via http://www.ruby-forum.com/.