Update README and remove instructions so people can't cheat
Add the instructions folder back in; I mangled it
Make the words a bit easier to read (word wrap)
Auction
(also called a listing in the instructions) contains information and
bids on a particular item being sold.AuctionHouse
is a collection of auctions.Bid
is how much a user is prepared to pay for an item in an auction.Money
represents how much the bid
or reservedPrices
is and is a flawed
attempt at avoiding floats. In reality we should use a proper third-party
package for dealing with Money.AuctionOutput
is an Auction
with some extra computed fields (like "price
paid"). It can be coerced into a string.Output
is a collection of the AuctionOutput
smain
). This is because I don't think the logic
is sufficiently complex yet to warrant breaking the code in to multiple
packages.main
contains the models & some basic IO & actually calls the main
functions (NewAuctionHouseFromFile()
& AuctionHouse#generateOutput()
)parse.go
knows how to read a file & generate the appropriate data model
representation.output.go
knows how to generate the appropriate output from an
AuctionHouse
bid.go
deals with bidding (mainly bid verification)git
if you want to have a look at that.GO111MODULE
env
var to on
(like in the Makefile)bid
model,
but it would increase complexity (and caching / state management is tricky)