Refresh ROADMAP, add withdrawn field#100
Merged
Merged
Conversation
Tracks cumulative chips taken out of cash (initial buy-in + every
reload), enabling busted players to reload via `Player::reload(amount)`
and `PlayerNoCell::reload(amount)` without losing the P/L baseline.
Hand-history `PlayerEntry` gains `withdrawn: Option<f64>` with serde
default + skip-if-none so pre-existing YAML files parse unchanged.
Files modified (6):
- src/casino/player.rs — added pub withdrawn: Cell<usize>, populated in new/new_with_chips/random, added reload(&self, amount) -> usize
method + doc test, 6 unit tests
- src/casino/table_no_cell.rs — mirrored on PlayerNoCell: pub withdrawn: usize, reload(&mut self, amount) -> usize, 6 unit tests
- src/hand_history.rs — added pub withdrawn: Option<f64> to PlayerEntry with #[serde(default, skip_serializing_if = "Option::is_none")],
updated all ~14 existing PlayerEntry { … } literal sites (doc tests + test fixtures), added 3 round-trip tests
- src/analysis/player_stats.rs — added withdrawn: None to its PlayerEntry test-fixture builder
- examples/yaml_audit.rs, examples/replay_play.rs — drive-by: added both hole_cards_visibility: None (pre-existing gap) and withdrawn: None
so their test modules compile cleanly under cargo test --examples
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Features
Docs
(fa1a882)
Tests/fixtures
src/analysis/player_stats.rs test fixtures