Skip to content

Repo health: modernize deps, security, tests, docs - #28

Merged
hippi345 merged 2 commits into
masterfrom
cursor/repo-health-modernize-e53b
Sep 26, 2026
Merged

hippi345 merged 2 commits into
masterfrom
cursor/repo-health-modernize-e53b

Conversation

@hippi345

Copy link
Copy Markdown
Owner

Summary

Modernizes randobotjava (JavaFX treasure-hunt game) for Java 21, Maven, automated CI, and maintainability while preserving gameplay.

Security

  • Secrets: No API keys, tokens, or connection strings were found in the repository history on this branch. Nothing to rotate.
  • Added SECURITY.md with reporting guidance.
  • Replaced .gitignore (removed the blanket *.yml ignore that blocked CI/Dependabot configs).
  • Enabled Dependabot for Maven and GitHub Actions.

Dependencies and runtime

  • JDK 21 (LTS) via maven.compiler.release.
  • JavaFX 21.0.6 (OpenJFX) as Maven dependencies (JavaFX is not bundled in the JDK).
  • JUnit 5.11.4 for tests.
  • Spotless + Google Java Format (AOSP) for formatting.
  • Standard Maven layout: src/main/java, src/test/java; removed hand-maintained META-INF/MANIFEST.MF.

Working code

  • Added missing main() → Application.launch.
  • Autoplay runs on a background thread and updates the UI via Platform.runLater (avoids freezing the JavaFX thread).
  • Empty grid size on the start screen defaults to 5 instead of throwing NumberFormatException.
  • Replaced System.exit(69) with Platform.exit() for cleaner JavaFX shutdown.
  • Decoupled Game from View via GameBoardListener (enables headless unit tests).
  • Standard Java naming (makeMove, getStatus, etc.) and improved Point.hashCode.

Tests and linting

  • 5 unit tests (PointTest, GameTest) — offline, no credentials.
  • mvn spotless:check in CI.

CI

  • GitHub Actions workflow: JDK 21, Spotless check, compile, test on push / pull_request to master.

License

  • Added MIT License (Copyright © 2026 Joel Shearon). No prior LICENSE file existed.

README

  • Rewritten with features, requirements, setup, run instructions, tests, project structure, and CI/license badges.

General polish

  • .editorconfig added.
  • Removed dead/IDE-oriented ignore rules; added target/ and standard Java ignores.

Skipped / N/A

  • Env vars: Not applicable (local desktop game).
  • Cloud SDK migrations: Not applicable.
  • GUI automated tests: Not added (would require headed JavaFX/CI display); core logic is covered by unit tests.

Verification (local)

mvn spotless:check
mvn test

Tests run: 5, Failures: 0

Owner actions

None required for secrets. Use JDK 21+ and mvn javafx:run to play locally.

Open in Web Open in Cursor 

cursoragent and others added 2 commits September 26, 2026 16:25
- Add Maven build with JavaFX 21 and JUnit 5
- Restructure to src/main/java and src/test/java
- Decouple game logic from UI; fix main(), autoplay thread, empty grid input
- Add Spotless formatting, GitHub Actions CI, Dependabot
- Add MIT LICENSE, SECURITY.md, README, and .editorconfig

Co-authored-by: Joel Town Road <vision2020joel@gmail.com>
Co-authored-by: Joel Town Road <vision2020joel@gmail.com>
@hippi345
hippi345 merged commit 16c82ae into master Sep 26, 2026
1 check passed
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.

2 participants