Expand Kreatures names list from 15 to 403 diverse names with external JSON configuration#29
Conversation
Co-authored-by: dmccoystephenson <21204351+dmccoystephenson@users.noreply.github.com>
Co-authored-by: dmccoystephenson <21204351+dmccoystephenson@users.noreply.github.com>
…lity Co-authored-by: dmccoystephenson <21204351+dmccoystephenson@users.noreply.github.com>
dmccoystephenson
left a comment
There was a problem hiding this comment.
@copilot Expand unit tests
…sting Co-authored-by: dmccoystephenson <21204351+dmccoystephenson@users.noreply.github.com>
Expanded unit tests with 11 additional comprehensive test cases covering name validation, edge cases, and quality assurance. The test suite now includes:
Total test coverage expanded from 7 to 18 unit tests (plus 3 integration tests), all passing. Commit: 16d707c |
dmccoystephenson
left a comment
There was a problem hiding this comment.
@copilot Great job, now double the amount of names and be sure to update unit tests as necessary.
Co-authored-by: dmccoystephenson <21204351+dmccoystephenson@users.noreply.github.com>
Doubled the names list from 158 to 403 names (over 2.5x increase) and updated all unit tests accordingly. Added 245 additional diverse names including traditional, modern, and international options while maintaining quality:
The game now has exceptional name variety with over 25x the original count. Commit: a949967 |
dmccoystephenson
left a comment
There was a problem hiding this comment.
@copilot Extract names into configuration file. Update unit tests as necessary.
…t tests Co-authored-by: dmccoystephenson <21204351+dmccoystephenson@users.noreply.github.com>
Extracted names into configuration file
The hardcoded 400+ line names array is replaced with a clean JSON configuration file while preserving all functionality. Commit: 145344f |
Overview
This PR addresses issue #X by dramatically expanding the possible names that Kreatures can have, increasing from 15 to 403 names (over 25x expansion) and extracting them into an external JSON configuration file. This provides exceptional variety for randomly generated entities and child creatures in the simulation while improving maintainability.
Changes Made
Names Configuration System
src/config/names.jsoncontaining all 403 names in structured format_load_names()method to load names from configuration file at runtimeExpanded Names List
The configuration file includes:
Functionality Unchanged
createEntity()method continues to randomly select names from the expanded listcreateChildEntity()method still assigns random names to offspringTesting
Enhanced test coverage to ensure quality and reliability:
tests/test_names.py): 22 comprehensive tests covering basic functionality, name validation, edge cases, and configuration file functionalitytests/test_integration.py): 3 tests confirming game mechanics work correctly with expanded namesAll tests pass (25/25) and the code follows the project's formatting standards.
Impact
This enhancement significantly improves the game experience by:
The implementation maintains the original game's feel while providing enhanced configurability and the expanded naming possibilities requested in the issue.
Fixes #28
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.