refactor: outsource deck related actions to service #236

Merged
ptran merged 1 commit from refactor-blackjack into main 2025-05-28 10:38:15 +00:00
Member
No description provided.
ptran added 1 commit 2025-05-28 10:32:55 +00:00
refactor: outsource deck related actions to service
All checks were successful
CI / Get Changed Files (pull_request) Successful in 10s
CI / eslint (pull_request) Has been skipped
CI / oxlint (pull_request) Has been skipped
CI / prettier (pull_request) Has been skipped
CI / test-build (pull_request) Has been skipped
CI / Docker frontend validation (pull_request) Has been skipped
CI / Checkstyle Main (pull_request) Successful in 57s
CI / Docker backend validation (pull_request) Successful in 49s
Setup Gitea Tea CLI / setup-and-login (pull_request) Successful in 1m32s
2a51dce565
Collaborator

This PR has several critical issues that prevent acceptance:

Compilation Errors:

  • DeckService uses CardType enum without importing it
  • Code won't compile as submitted

Code Quality Issues:

  • Unused validation imports (@NotNull, @Positive) in BlackJackGameEntity
  • Inconsistent separation of concerns - some card dealing methods moved to DeckService while dealCardsToDealerUntilMinimumScore stays in BlackJackService
  • Public methods in DeckService should be package-private for better encapsulation
  • Trailing whitespace and poor formatting

Breaking Changes Without Justification:

  • Removed AuthProvider.LOCAL assignment from UserEntity constructor - this could break registration logic
  • Added @Version to UserEntity without any optimistic locking strategy

Missing Tests:

  • No tests for the new DeckService
  • No verification that existing functionality still works

Documentation:

  • No JavaDoc for new service
  • No explanation of why this refactoring was necessary

Fix the compilation errors, add proper tests, justify the breaking changes, and clean up the code formatting before resubmitting.

Status: REJECTED

This PR has several critical issues that prevent acceptance: **Compilation Errors:** - DeckService uses CardType enum without importing it - Code won't compile as submitted **Code Quality Issues:** - Unused validation imports (@NotNull, @Positive) in BlackJackGameEntity - Inconsistent separation of concerns - some card dealing methods moved to DeckService while dealCardsToDealerUntilMinimumScore stays in BlackJackService - Public methods in DeckService should be package-private for better encapsulation - Trailing whitespace and poor formatting **Breaking Changes Without Justification:** - Removed AuthProvider.LOCAL assignment from UserEntity constructor - this could break registration logic - Added @Version to UserEntity without any optimistic locking strategy **Missing Tests:** - No tests for the new DeckService - No verification that existing functionality still works **Documentation:** - No JavaDoc for new service - No explanation of why this refactoring was necessary Fix the compilation errors, add proper tests, justify the breaking changes, and clean up the code formatting before resubmitting. **Status: REJECTED**
jank approved these changes 2025-05-28 10:37:48 +00:00
ptran merged commit db4cf796d6 into main 2025-05-28 10:38:15 +00:00
ptran deleted branch refactor-blackjack 2025-05-28 10:38:16 +00:00
Commenting is not possible because the repository is archived.
No reviewers
No milestone
No project
No assignees
3 participants
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: SZUT/casino#236
No description provided.