ichabod801 / t_games

A collection of command-line interface games written in Python.
GNU General Public License v3.0
21 stars 4 forks source link

Playtest and Maybe Update Craps #500

Closed ichabod801 closed 4 years ago

ichabod801 commented 4 years ago

There seems to be some dead code at the beginning of Craps.player_action. Consider removing that after some play testing.

ichabod801 commented 4 years ago

Also look at removing the ammo attribute of CrapsBet. It does not seem to be used, and is not documented.

ichabod801 commented 4 years ago

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.

ichabod801 commented 4 years ago

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.

ichabod801 commented 4 years ago

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.

ichabod801 commented 4 years ago

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.

ichabod801 commented 4 years ago

Come to think of it, you have to get your wager back on the 1:1 bets, otherwise they're just stupid.

ichabod801 commented 4 years ago

The edges are all working fine.

ichabod801 commented 4 years ago

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.

ichabod801 commented 4 years ago

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.

ichabod801 commented 4 years ago

Shotgun test finished in 2.7.

ichabod801 commented 4 years ago

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.

ichabod801 commented 4 years ago

Did a final shotgun test.

ichabod801 commented 4 years ago

With the last output fix, I'm calling this done. Eight fucking days, man.