Package: craps
crapsA lightweight table game simulator.·Report Bug·Request FeatureInstallationInstall with pip (recommended)pipinstallcrapsUsage!pipinstallcrapsfromcrapsimportGame,PassBet,LineOddsBet,ComeBet,PointOddsBetCollecting craps
  Downloading craps-1.1.0-py3-none-any.whl (9.9 kB)
Installing collected packages: craps
Successfully installed craps-1.1.0# Start a game with $100 at a table with a $10 minimumg=Game(arrival_cash=100,minimum_bet=10)# Place a bet for $10, then roll the dice!g.bet(PassBet(10))g.roll()[Bet] You made a PassBet on the box for 10
[Rail] You have 990.0 on the rail
[Table] The shooter is ready, the point is off
[Table] PassBet for 10 is working on the box
[Roll] Shooter rolled 10
[Roll] The point is 10
[Rail] You have 990.0 on the rail# Put $20 odds on line betg.bet(LineOddsBet(20,g.puck))# And place an additional come bet for the table minimumg.bet(ComeBet(g.minimum_bet))[Bet] You made a LineOddsBet on 10 for 20
[Rail] You have 970.0 on the rail
[Bet] You made a ComeBet on the box for 10.0
[Rail] You have 960.0 on the rail# Roll!g.roll()[Table] The shooter is ready, the point is 10
[Table] PassBet for 10 is working on 10
[Table] LineOddsBet for 20 is working on 10
[Table] ComeBet for 10.0 is working on the box
[Roll] Shooter rolled 8
[Roll] 2+6=8 came easy
[Bet] ComeBet for 10.0 was moved to the 8
[Rail] You have 960.0 on the rail# Check your betsg.callout()[Table] PassBet for 10 is working on 10
[Table] LineOddsBet for 20 is working on 10
[Table] ComeBet for 10.0 is working on 8# Put $30 odds on your 8g.bet(PointOddsBet(30,8))[Bet] You made a PointOddsBet on 8 for 30
[Rail] You have 930.0 on the rail# Roll!g.roll()[Table] The shooter is ready, the point is 10
[Table] PassBet for 10 is working on 10
[Table] LineOddsBet for 20 is working on 10
[Table] ComeBet for 10.0 is working on 8
[Table] PointOddsBet for 30 is working on 8
[Roll] Shooter rolled 10
[Roll] Winner!!, 10
[Payout] PassBet on 10 paid out 20
[Payout] LineOddsBet on 10 paid out 60.0
[Rail] You have 1010.0 on the rail(back to top)RoadmapAdd Bet types to model.pyAddplace betsAddside betsAdd theYofirst. That's fun.Strategy constructor / builderLogic layer to facilitate strategy construction in a low code environment. For example:IFthe game puck is offANDI do not have a place bet,THENmake a place bet.IFthe game puck is onANDI do not have odds on a place or come bet,THENput f(x) odds on it.See theopen issuesfor a full list of proposed features (and known issues).ContributingContributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make aregreatly appreciated.If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement".
Don't forget to give the project a star! Thanks again!Fork the ProjectCreate your Feature Branch (git checkout -b feature/AmazingFeature)Commit your Changes (git commit -m 'Add some AmazingFeature')Push to the Branch (git push origin feature/AmazingFeature)Open a Pull RequestLicenseDistributed under the MIT License. SeeLICENSE.txtfor more information.ContactMike Hegarty -@mjhegarty-mike@petorca.comProject Link:https://github.com/mhegarty/crapsAcknowledgmentsThanks to@dhegarty19for agreeing to celebrate our third aniversary at the casino.Big thanks to Othneil Drew for the awesome work onthe best readme templatepikpng.comfor the logo image.