Create Config class to hold configuration options #39
+41
−0
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.
Summary
This PR implements a new
Config
class to centralize configuration options for the FishE game, addressing issue #[issue_number].Changes
New Files
src/config/config.py
: Contains theConfig
class with configuration attributes for:tests/config/test_config.py
: Unit tests validating all Config class attributessrc/config/__init__.py
: Package initialization fileModified Files
.gitignore
: Added__pycache__/
to exclude Python cache directoriesConfiguration Options
The Config class provides 10 configuration attributes:
File Paths:
dataDirectory
: Directory for save filesplayerSaveFile
: Player state save file pathstatsSaveFile
: Statistics save file pathtimeServiceSaveFile
: Time service save file pathInitial Player Values:
initialMoney
: Starting money ($20)initialEnergy
: Starting energy (100)initialFishCount
: Starting fish count (0)initialMoneyInBank
: Starting bank balance ($0.01)initialFishMultiplier
: Starting fish multiplier (1)initialPriceForBait
: Starting bait price ($50)Usage Example
Testing
All 63 tests pass, including new tests for the Config class. The implementation follows existing code patterns and does not modify any existing functionality.
Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.