From f151a9ad766d1839f2418bc1bdf3c98d9744947b Mon Sep 17 00:00:00 2001 From: Kistaro Windrider Date: Sat, 18 Nov 2023 16:30:36 -0800 Subject: [PATCH] Fix compilation errors. --- auctionsim/defaults.go | 1 + auctionsim/generators.go | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/auctionsim/defaults.go b/auctionsim/defaults.go index f479162..ebf9a9a 100644 --- a/auctionsim/defaults.go +++ b/auctionsim/defaults.go @@ -1,6 +1,7 @@ package auctionsim import ( + "math" "math/rand" ) diff --git a/auctionsim/generators.go b/auctionsim/generators.go index 3d03f9e..5a3e8ea 100644 --- a/auctionsim/generators.go +++ b/auctionsim/generators.go @@ -48,7 +48,7 @@ func (b *BiddersFromDistributions) Generate() (Bidder, bool) { if !ok { return Bidder{}, false } - cash, ok := v.Bankrolls.Draw() + cash, ok := b.Bankrolls.Draw() if !ok { return Bidder{}, false } @@ -123,7 +123,7 @@ type CappedBidderGenerator struct { /** * Generate implements BidderGenerator. */ -func (c *CappedBidderGenerator) Generate() (float64, bool) { +func (c *CappedBidderGenerator) Generate() (Bidder, bool) { if c.Lim <= 0 { return Bidder{}, false }