-
Notifications
You must be signed in to change notification settings - Fork 2
[FIX] 게임 직접 종료 시 결과 저장 누락 보완 #429
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
Merged
Merged
Changes from 1 commit
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
5a967de
[FIX] 게임 직접 종료 시 결과 저장 누락 보완
TAEW00KIM b859721
test: FixtureMonkey Game 필드명 오타 수정으로 CI flaky 테스트 안정화
TAEW00KIM 292368f
Merge remote-tracking branch 'origin/main' into fix/game-manual-finis…
TAEW00KIM 16b8b8b
chore: remove accidental artifacts from game fix branch
TAEW00KIM 786a674
Merge remote-tracking branch 'origin/main' into fix/game-manual-finis…
TAEW00KIM 5cbf576
refactor: move game result update decision into Game domain
TAEW00KIM File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
경기 결과를 계산할 수 있는지 판단하는 로직(참여 팀이 2개인지 확인)은 애플리케이션 서비스 레이어보다는
Game도메인 엔티티에 속하는 것이 더 적절해 보입니다.도메인 주도 설계(DDD) 원칙에 따라 도메인 객체의 캡슐화를 강화하고 책임 분리를 명확히 하기 위해, 이 로직을
Game엔티티 내부로 옮기는 것을 제안합니다.Game클래스에tryDetermineResult()와 같은 새로운 메서드를 만들어 관련 로직을 포함시키고,GameService에서는 이 메서드를 호출만 하도록 변경하면 좋을 것 같습니다.Game.java에 추가할 메서드:이렇게 변경하면
Game엔티티가 자신의 비즈니스 규칙을 스스로 책임지게 되어, 코드가 더 유지보수하기 좋고 견고해질 것입니다.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
저도 이건 Game 내부로 들어가도 될 것 같아요!
그리고
updateResult로 둬서 캡슐화를 지켜도 될 것 같은데 어떠세요?Game 이 업데이트 할 수 있는 상태인지 아닌지는 서비스 레이어에서는 관여하지 말고, 도메인 레이어에서만 알고 있는 게 더 적절할 것 같다는 생각이 들어요.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@TAEW00KIM 요거 반영 안된 것 같아요~
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
아하 넵넵
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Jin409 반영 후에 충돌 해결해서 올려뒀습니다! 머지할까요?