-
Notifications
You must be signed in to change notification settings - Fork 0
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
Conversation
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.
고생했어요 달리
너무 늦게 리뷰 남겨서 미안해요
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()); |
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.
이거는 왜 final 안붙여이이잉
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.
// job | ||
@GetMapping("/rooms/night/result") | ||
public ResponseEntity<RoomNightResultResponse> findNightResult( | ||
@GetMapping("/jobs/skill/result") |
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.
jobs jobs?
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.
|
||
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) { |
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.
이런 것들은 따로 메서드로 빼서 의미를 명확하게 할 수 있을 것 같아요. ex) isInvalidRoleBalnace
등등.. 있을 것 같아요
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.
* 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 : 직업 검증 로직 분리
close #102
해당 Issue PR 인데 이거 어프루브되도 나중에 프론트 URL 바뀔때 머지해야할것 같습니다