Put the config's settings behind accessors #44
Labels
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Blocks
#45 Give the config module a home to load from
rosa/casino
Reference
rosa/casino#44
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What to build
Configcurrently exposes its settings as public fields, which makes the shapeserde reads off the file the same thing the rest of the crate programs against.
Every later change to how a setting is stored — an optional override, a parsed
type in place of a string — has to ripple out to every reader.
Close the type over its own representation: the fields go private and callers
reach the settings through accessors. Nothing changes for a player, and nothing
changes about what the config file holds.
This is groundwork. It is what lets the tickets that follow change how the save
and stats paths are stored without touching a single game module.
Acceptance criteria
Configfield directlyread them
Blocked by