// input size of bet // returns "Action" or Number of Plays function numberOfPlaysFrom$$$(moneyToPlay){ var expectedLowValueReturn = returnPerTicket - lotteryData[0].returnPerThis; var plays = 0; while (moneyToPlay > ticketPrice){ moneyToPlay -= ticketPrice; moneyToPlay += expectedLowValueReturn; plays += 1; } return plays; }
Please Note: I am an idiot. No seriously. The odds
of my
gambling
odds calculations being correct are likely on par with my odds of ever
winning. You have been warned.