Change simulator random to be evenly random again

This commit is contained in:
jahooma 2021-12-23 12:23:39 -05:00
parent aa6d4661fe
commit 96d585c327

View File

@ -149,9 +149,9 @@ function NewBidTable(props: {
function randomBid() {
const bidType = Math.random() < 0.5 ? 'YES' : 'NO'
const p = bidType === 'YES' ? nextEntry.prob : 1 - nextEntry.prob
// const p = bidType === 'YES' ? nextEntry.prob : 1 - nextEntry.prob
const amount = Math.round(p * Math.random() * 300) + 1
const amount = Math.floor(Math.random() * 300) + 1
const bid = makeBid(bidType, amount)
bids.splice(steps, 0, bid)