Closed ichabod801 closed 4 years ago
Also look at removing the ammo attribute of CrapsBet. It does not seem to be used, and is not documented.
All of the non-proposition bets have been tested for correct win/loss and payout. At the end of this (of course) I realized I can force any roll with & setattr(self, force_roll, ((2, 3),))
. That will make testing of the proposition bets much easier.
Looking at my results, I've been thinking I made have done something to screw up the house edge (I'm winning overall after 30 some games). The program is not only giving you the payout when you win, it's giving you the wager back. I expect that is screwing up the odds, especially if you are squeezing the edge with a lot of odds bets. Double check that, and then correct as necessary.
All of the bets are tested. I haven't tested each one against each possible outcome (although I suppose I could write unit tests to do that...), but I have not seen them win on a winning roll or lose on a losing roll, and all the payouts were correct. There was at least one test of each bet for each possible payout.
In terms of the house edge problem, let's look at a place 8 bet. Pays 7:6 on an eight, loses on a seven. Assume six bucks bet. There are six ways to roll a seven and five ways to roll an eight. That would be 66 bucks spent. Currently, getting the wager back, you get 13 x 5 = 65 back. That would be a house edge, and one of 1.52%, which is what the table I have shows.
Come to think of it, you have to get your wager back on the 1:1 bets, otherwise they're just stupid.
The edges are all working fine.
All the options are tested. However, I ended a game where everyone lost their last bit of money at the same time, and the game went into an infinite loop.
Craps tested fine in 2.7 for standard play and edges. Test it with gonzo, deal with the dead code, and that should be it.
Shotgun test finished in 2.7.
Everything looks fine for the dead code, but I ran into an issue while testing it. A shooter who runs out of money making the point. They're still shooter, but they can't make a pass/don't pass bet. Who is shooter doesn't pass until it gets to them. It should pass immediately.
Did a final shotgun test.
With the last output fix, I'm calling this done. Eight fucking days, man.
There seems to be some dead code at the beginning of Craps.player_action. Consider removing that after some play testing.