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

Collection of minor improvements #257

Closed
wants to merge 15 commits into from

Conversation

tonypr
Copy link
Collaborator

@tonypr tonypr commented Nov 3, 2023

Implements a collection of minor style improvements:

  • Prefer random.choice to select a random element of a list.
  • Use @dataclass on LandTile and Port classes.
  • Iterate over .values() instead of .items() if only iterating over values.
  • Return early if exit conditions are met in maintain_longest_road and maintain_largest_army.

No logic changes in this PR, just code style changes mainly. I think they can help make the code easier to change later.

Copy link

netlify bot commented Nov 3, 2023

👷 Deploy request for catanatron-staging pending review.

Visit the deploys page to approve it

Name Link
🔨 Latest commit 53e2f4e

@tonypr tonypr requested a review from bcollazo November 3, 2023 01:19
@tonypr tonypr removed the request for review from bcollazo November 3, 2023 01:52
@tonypr tonypr closed this Nov 3, 2023
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