Conversation
…by-removing-legacy-flag
…ned-bet equality test
…-in-bet-classes
…rs, clean docs, consolidate tests
…-for-commission
…ith-table.fixed_run
* Change "commission" to "vig" for clarity * `commission_mode` was duplicative with `buy_vig_on_win`, so removed * Simplify `_compute_commission` logic and rename to `_compute_vig()` * Some tests in test_bet were wrong or didn't have any assertions, fixed * `wager` not needed in Buy/Lay, can be the same as `amount` * `vig_paid` tracking can be removed by having this as a method of the bet (now `vig(self, table)`) * Rename `placement_cost` to simply `cost` * Player needs to use `cost` for remove bet and others for consistency, fixed and added some testing
* Put bets are allowed to exist when the point is off, only when the put is on a non-point number and the point hits (thus the seven out doesn't remove the point bet) * Thus, removed the put takedown logic from TableUpdate * Removed put legality check from test_vxp_torture.py, since it is not precise enough
* Add back CONTRIBUTING main information (not all was supposed to be deleted) * Refresh CHANGELOG to have meaningful changes * Removes baselines/vxp files * Move a few tests around for clarity
VXP: Add Buy/Lay, Put, Horn, Whirl, and Big6/8 bets, plus expanded testing/validation/tools
* Fix integer restriction on odds multiplier (now allows 2.5 for example) * Fix OddsMultiplier __repr__ bug
* Uses the OddsMultiplier class with a converted multiplier * Add testing to check repr and some basic betting amounts
* Refactor similar functions in odds to have cleaner and less repetitive code
…s logic * Fix WinMultiplier bug in __init__
Tidy up strategy.odds module * Add `WinMultiplier` family of strategies which take a desired win multiple and calculates the correct amount based on the bet amount. * `WinMultiplier` is the general which takes specific bet type argument * `PassLineWinMultiplier`, `ComeWinMultiplier`, `DontPassWinMultiplier`, `DontComeWinMultiplier`, and `PutWinMultiplier` can be used for convenience with individual bets * Fixes #51 * Major refactoring of the module (mostly internal facing), including * the `__repr__` methods with shared logic (expanding and condensing the multiplier from dict to float and vice verse) * The specific OddsAmount, OddsMultiplier strategies for a given bet type now have global helper * Some documentation improvements (single line titles, moving towards google style) * Fix `__repr__` logic so that floats, ints, and incomplete dictionaries all work for odds/win multiplier. Capture this in testing * Ensure `Put` bet type is supported for all odds strategies and properly documented
new priorities and clearer guidance
* Add test_doc_examples.py for doc example checking * Pull some supported bets info out of README and clean-up
Improve documentation * Update CHANGELOG and working towards new format * Update CONTRIBUTING with latest priorities and clearer guidance * Adding Supported Bets documentation page * Update other doc pages and minor fields
* Prefer specific typing imports in beginning of file (google style 3.19.12) * Add type aliases to improve readablilty, including DicePair, DicePairInput, MultiplierDict (odds)
* `_WinningLosingNumbersBet` gains `get_push_numbers()` method and `get_result()` incorporates this method * Add some testing to cover this (also looked at examples)
Fix: DontPass and DontCome push on come-out 12
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| None: Always returns ``None``. | ||
| """ | ||
| if bet in self.bets and bet.is_removable(self.table): | ||
| self.bankroll += bet.amount | ||
| self.bankroll += bet.cost(self.table) |
There was a problem hiding this comment.
Avoid refunding vig when removing upfront-commission bets
When Player.remove_bet credits the bankroll with bet.cost(self.table), removing a Buy or Lay bet configured with vig_paid_on_win=False returns the stake plus the vig because Buy.cost/Lay.cost include the upfront commission. This lets a player place a buy/lay, pull it off before a decision, and recover the commission even though the vig should be non‑refundable once collected, producing optimistic bankroll totals. The removal path should only restore the wagered amount for bets that already paid the vig.
Useful? React with 👍 / 👎.
No description provided.