-
Notifications
You must be signed in to change notification settings - Fork 5
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
[FE] feat#27#221#222 서바이벌 모드 구현 및 게임 종료 후 호스트 변경 구현 #223
[FE] feat#27#221#222 서바이벌 모드 구현 및 게임 종료 후 호스트 변경 구현 #223
Conversation
- 유틸함수 추가 - 정답 처리 버그 수정
- 주기적으로 요청하여 offset의 평균값을 계산
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.
준기님도 어제 수고하셨습니다!!
오늘 서바이벌 모드 시연가능한가요? ㅎㅎ
offsetTotal += clientTime - res.serverTime; | ||
offsetCount++; | ||
offset = Math.floor(offsetTotal / offsetCount); |
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.
offset을 평균으로 계산하고 있군요!!
네트워크 시간이 매번 달라질 수 있기 때문에 그런거죠? 좋습니다!
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.
좋습니다! 소켓 모킹 코드 리팩토링도 신경 쓰신 부분 좋았습니다 👍🏻
@@ -70,3 +72,7 @@ socketService.on('endQuizTime', (data) => { | |||
useQuizeStore.getState().setQuizState(QuizState.END); | |||
useQuizeStore.getState().setCurrentAnswer(Number(data.answer)); | |||
}); | |||
|
|||
socketService.on('endGame', () => { | |||
useQuizeStore.getState().resetQuiz(); |
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.
지금 봤는데, useQuizeStore 중간에 e는 오타인가요?!
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.
수고하셨습니다 ! LGTM
➕ 이슈 번호
🔎 작업 내용
🖼 참고 이미지
🎯 리뷰 요구사항 (선택)
✅ Check List