Skip to content

Feature/cleaning#27

Merged
FeFFe1996 merged 4 commits into
mainfrom
feature/cleaning
Jan 14, 2026
Merged

Feature/cleaning#27
FeFFe1996 merged 4 commits into
mainfrom
feature/cleaning

Conversation

@FeFFe1996

@FeFFe1996 FeFFe1996 commented Jan 14, 2026

Copy link
Copy Markdown

Summary by CodeRabbit

  • New Features

    • Added player turn mode selection based on available transportation options.
  • Bug Fixes

    • Improved location selection with hierarchical validation to ensure valid results.
    • Enhanced player display to show player name alongside credits information.

✏️ Tip: You can customize this high-level summary in your review settings.

@FeFFe1996
FeFFe1996 merged commit 9eaa0f4 into main Jan 14, 2026
1 of 2 checks passed
@coderabbitai

coderabbitai Bot commented Jan 14, 2026

Copy link
Copy Markdown

Caution

Review failed

The pull request is closed.

📝 Walkthrough

Walkthrough

This PR refactors random location selection in App.java from a simple method to a hierarchical continent-country-location approach, adds immutability to dice fields in playerMovement, introduces a new playerTurnByMode method, and adds documentation comments. Changes span four files with mixed complexity.

Changes

Cohort / File(s) Summary
Random Location Logic Refactor
src/main/java/org/example/App.java
Removed randLoc() method; replaced with randomLocation() implementing hierarchical selection (continent → country → location) with validation loops to ensure valid location retrieval. Removed debug code block.
Player Movement Updates
src/main/java/org/example/playerMovement.java
Made dice fields immutable (private final int); added playerTurnByMode() method; updated player display message to include name; removed GameConfig and GameMode imports.
Documentation Additions
src/main/java/org/example/player.java
Added comments above getPlayerName() and getCredits() getter methods.
Whitespace Cleanup
src/main/java/org/example/TravelGameController.java
Removed empty line in doContinueJourney method (no functional change).

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

  • PR #6 — Directly modifies the same random-location utilities in App.java that were updated here (removal of randLoc and introduction of randomLocation implementation).
  • PR #21 — Touches playerMovement.playerTurnByMode signature and method usage patterns that align with the changes in this PR.
  • PR #16 — Modifies App.java methods involving randLoc/randomLocation dependency logic related to EntityManager and Location entity queries.

Poem

🐰✨ A continent hops, then country bounds,
The random location spins around,
With final dice and names so clear,
This refactored path brings cheer!
Hierarchies bloom where chaos grew,
Our burrow's code made fresh and new! 🌍

✨ Finishing touches
  • 📝 Generate docstrings


📜 Recent review details

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between b3ddaf4 and 965c0e5.

📒 Files selected for processing (4)
  • src/main/java/org/example/App.java
  • src/main/java/org/example/TravelGameController.java
  • src/main/java/org/example/player.java
  • src/main/java/org/example/playerMovement.java

✏️ Tip: You can disable this entire section by setting review_details to false in your review settings.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@FeFFe1996
FeFFe1996 deleted the feature/cleaning branch January 14, 2026 16:16
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