Skip to content
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

feat : 어그리거트 정의에 따른 네이밍 반영 및 API 수정 #103

Merged
merged 13 commits into from
Aug 25, 2024

Conversation

waterricecake
Copy link
Contributor

close #102
해당 Issue PR 인데 이거 어프루브되도 나중에 프론트 URL 바뀔때 머지해야할것 같습니다

Copy link
Contributor

@thdwoqor thdwoqor left a comment

Choose a reason for hiding this comment

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

고생했어

Copy link
Collaborator

@kpeel5839 kpeel5839 left a comment

Choose a reason for hiding this comment

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

고생했어요 달리
너무 늦게 리뷰 남겨서 미안해요

public void startGame(final String code) {
final Lobby lobby = lobbyRepository.findById(code)
.orElseThrow(() -> new GameException(ExceptionCode.INVALID_NOT_FOUND_ROOM_CODE));
Game game = Game.create(lobby, Clock.systemDefaultZone().millis());
Copy link
Collaborator

Choose a reason for hiding this comment

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

이거는 왜 final 안붙여이이잉

Copy link
Contributor Author

Choose a reason for hiding this comment

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

// job
@GetMapping("/rooms/night/result")
public ResponseEntity<RoomNightResultResponse> findNightResult(
@GetMapping("/jobs/skill/result")
Copy link
Collaborator

Choose a reason for hiding this comment

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

jobs jobs?

Copy link
Contributor Author

Choose a reason for hiding this comment

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


private final int total;
private final int mafia;
private final int doctor;
private final int police;

public static RoomInfo of(final int total, final int mafia, final int doctor, final int police) {
public static LobbyInfo of(final int total, final int mafia, final int doctor, final int police) {
if (total / 2 < mafia || total < 3 || mafia == 0) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

이런 것들은 따로 메서드로 빼서 의미를 명확하게 할 수 있을 것 같아요. ex) isInvalidRoleBalnace 등등.. 있을 것 같아요

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@waterricecake waterricecake merged commit 523eabf into dev Aug 25, 2024
1 check passed
@waterricecake waterricecake deleted the feature/102 branch September 10, 2024 08:40
waterricecake added a commit that referenced this pull request Oct 14, 2024
* refactor : Room -> Lobby 어그리거트 명 수정

* feat : Lobby API 수정

* feat : Game API 수정

* feat : Jobs API 수정

* feat : Vote API 수정

* test : 수정된 API 따른 test API 수정

* refactor : Job 패키지명에 따른 네이밍 수정

* refactor : 패키지 명 변경에 따른 네이밍 수정

* refactor : 불필요한 주석 제거

* feat : gameStart url 변경

* fix : 밤 결과 url 수정

* style : 코드 컨벤션 적용

* refactor : 직업 검증 로직 분리
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

애그리거트에 따른 API URL 반영
3 participants