Skip to content

Refactor: Rename adjacent_tiles to node_to_tiles#321

Open
EphraiemSarabamoun wants to merge 2 commits intobcollazo:masterfrom
EphraiemSarabamoun:refactor/rename-adjacent-tiles
Open

Refactor: Rename adjacent_tiles to node_to_tiles#321
EphraiemSarabamoun wants to merge 2 commits intobcollazo:masterfrom
EphraiemSarabamoun:refactor/rename-adjacent-tiles

Conversation

@EphraiemSarabamoun
Copy link
Copy Markdown

This commit renames the 'adjacent_tiles' attribute in the CatanMap class to 'node_to_tiles' for better clarity, as suggested by a TODO comment. All usages across the codebase have been updated to reflect this change.

This commit renames the 'adjacent_tiles' attribute in the CatanMap class to 'node_to_tiles' for better clarity, as suggested by a TODO comment. All usages across the codebase have been updated to reflect this change.
@netlify
Copy link
Copy Markdown

netlify bot commented Jul 1, 2025

Deploy Preview for catanatron-staging ready!

Name Link
🔨 Latest commit 8128f0f
🔍 Latest deploy log https://app.netlify.com/projects/catanatron-staging/deploys/6867363153d8ee000879c76f
😎 Deploy Preview https://deploy-preview-321--catanatron-staging.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@coveralls
Copy link
Copy Markdown

coveralls commented Jul 2, 2025

Pull Request Test Coverage Report for Build 16064219491

Details

  • 16 of 17 (94.12%) changed or added relevant lines in 5 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 93.792%

Changes Missing Coverage Covered Lines Changed/Added Lines %
catanatron/catanatron/players/tree_search_utils.py 2 3 66.67%
Totals Coverage Status
Change from base Build 15838975971: 0.0%
Covered Lines: 2916
Relevant Lines: 3109

💛 - Coveralls

Copy link
Copy Markdown
Owner

@bcollazo bcollazo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Boom! Thanks for this!

I think there are still some additional usages that I see. I think the Frontend might expect the old naming. Could you change these as well and ensure the Frontend still works well (by running the docker compose locally end-to-end)? Thanks!

Screenshot 2025-07-02 at 8 38 58 AM

Comment thread catanatron/catanatron/json.py Outdated
"adjacent_tiles": obj.state.board.map.adjacent_tiles,
"map": {
"node_to_tiles": obj.state.board.map.node_to_tiles,
"node_production": obj.state.board.map.node_production,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we need node_production here? (cc: @bcollazo)

This commit resolves the feedback on the previous change:

- Renames all remaining instances of  to  in the tests and UI codebase for consistency.
- Removes the unused  field from the JSON payload.
- Adjusts the UI's  to be compatible with the local development environment.
- Fixes a frontend crash by restructuring the game state JSON to match the frontend's expectations.  is now a top-level property.
@EphraiemSarabamoun
Copy link
Copy Markdown
Author

Hey guys, tried to fix the terminology in the frontend and checked the UI to make sure it's working. Please let me know if anything else needs to be changed

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.

4 participants