Skip to content

Conversation

@LimKangHyun
Copy link
Collaborator

🛰️ Issue Number

Closes #50

🪐 작업 내용

  • 플레이어의 레디 상태 변경 기능을 추가했습니다.
  • /room/ready/{roomId}으로 메시지를 SEND할 때마다 사용자의 isReady상태가 토글되고, 해당 방의 구독자들에게 브로드캐스팅 됩니다.

📚 Reference

✅ Check List

  • 코드가 정상적으로 컴파일되나요?
  • 테스트 코드를 통과했나요?
  • merge할 브랜치의 위치를 확인했나요?
  • Label을 지정했나요?

@LimKangHyun LimKangHyun self-assigned this Jul 16, 2025
@LimKangHyun LimKangHyun added the enhancement New feature or request label Jul 16, 2025
@LimKangHyun LimKangHyun linked an issue Jul 16, 2025 that may be closed by this pull request
@MessageMapping("/room/ready/{roomId}")
public void playerReady(@DestinationVariable Long roomId, Message<?> message) {
StompHeaderAccessor accessor = StompHeaderAccessor.wrap(message);
String sessionId = accessor.getSessionId();
Copy link
Collaborator

Choose a reason for hiding this comment

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

이부분 바로 밑에 getSessionId() 로 대체하시면 될 것 같습니다!

Player player = roomService.findPlayerInRoomBySessionId(sessionId, roomId);

player.toggleReady();

Copy link
Collaborator

Choose a reason for hiding this comment

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

이런 로직들은 컨트롤러보다 서비스에서 하는게 더 적합하지 않을까요 ?.? 🤔

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

세상에 서비스에 findPlayerInRoomBySessionId이 메서드만 만들어놓고 컨트롤러에서 다 하고있었네요 바로 수정하겠습니다. 감사합니다!

Copy link
Collaborator

@sehee123 sehee123 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

@silver-eunjoo silver-eunjoo left a comment

Choose a reason for hiding this comment

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

고생하셨습니다!

@LimKangHyun LimKangHyun merged commit 704626f into dev Jul 17, 2025
@LimKangHyun LimKangHyun deleted the feat/50 branch July 18, 2025 12:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[feat] 플레이어 레디 상태 변경 기능

6 participants