Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add consecutive_string_generator utility function and refactor player name generation #6

Merged
merged 2 commits into from
Sep 1, 2024

Conversation

hmasdev
Copy link
Owner

@hmasdev hmasdev commented Sep 1, 2024

This pull request adds a new utility function called consecutive_string_generator that generates strings with a prefix and a number. It is used to refactor the player name generation in the DefaultGameMaster class. The function takes a prefix, start number, and step as arguments and returns a generator that yields consecutive strings with the specified prefix and number. The player name generation in the DefaultGameMaster class now uses this utility function to generate player names with the prefix "Player" followed by a number. This improves the readability and maintainability of the code.

@hmasdev hmasdev self-assigned this Sep 1, 2024
@hmasdev hmasdev merged commit 7a441b3 into main Sep 1, 2024
18 checks passed
@hmasdev hmasdev deleted the refactor-players-name-generator branch September 1, 2024 11:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant