From 09755004ca2295b7d76851dc8e25d3a1c76decc2 Mon Sep 17 00:00:00 2001 From: david-parkk Date: Thu, 7 Nov 2024 16:30:26 +0900 Subject: [PATCH 1/2] =?UTF-8?q?fix:=20=EA=B2=8C=EC=9E=84=20=EC=A2=85?= =?UTF-8?q?=EB=A3=8C=20=EB=A9=94=EC=84=B8=EC=A7=80=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../game/websocket/taggame/handler/TagGameEndHandler.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main/java/kutaverse/game/websocket/taggame/handler/TagGameEndHandler.java b/src/main/java/kutaverse/game/websocket/taggame/handler/TagGameEndHandler.java index 3068470..6d1aecb 100644 --- a/src/main/java/kutaverse/game/websocket/taggame/handler/TagGameEndHandler.java +++ b/src/main/java/kutaverse/game/websocket/taggame/handler/TagGameEndHandler.java @@ -43,10 +43,10 @@ private void taggerWin(TagGameRoom tagGameRoom) { tagGameUserRepository.get(player.getKey()) .doOnNext( tagGameUser -> { if(tagGameUser.getRole() == Role.TAGGER){ - sendLoseMessage(player.getValue()); + sendWinMessage(player.getValue()); return; } - sendWinMessage(player.getValue()); + sendLoseMessage(player.getValue()); }) .subscribe(); }); @@ -57,10 +57,10 @@ private void playerWin(TagGameRoom tagGameRoom) { tagGameUserRepository.get(player.getKey()) .doOnNext( tagGameUser -> { if(tagGameUser.getRole() == Role.PLAYER){ - sendLoseMessage(player.getValue()); + sendWinMessage(player.getValue()); return; } - sendWinMessage(player.getValue()); + sendLoseMessage(player.getValue()); }).subscribe(); }); } From 0ff8ffef50dc8185fde2f0892b458690200895c8 Mon Sep 17 00:00:00 2001 From: david-parkk Date: Thu, 7 Nov 2024 16:31:54 +0900 Subject: [PATCH 2/2] =?UTF-8?q?fix:=20=EC=A2=85=EB=A3=8C=20=EB=A9=94?= =?UTF-8?q?=EC=84=B8=EC=A7=80=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../game/websocket/taggame/handler/TagGameEndHandler.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/kutaverse/game/websocket/taggame/handler/TagGameEndHandler.java b/src/main/java/kutaverse/game/websocket/taggame/handler/TagGameEndHandler.java index 6d1aecb..a7eeb36 100644 --- a/src/main/java/kutaverse/game/websocket/taggame/handler/TagGameEndHandler.java +++ b/src/main/java/kutaverse/game/websocket/taggame/handler/TagGameEndHandler.java @@ -66,7 +66,7 @@ private void playerWin(TagGameRoom tagGameRoom) { } private void sendWinMessage(WebSocketSession webSocketSession) { - String winMessage = "승리하였습니다."; + String winMessage = "win"; TagGameEndResponse tagGameEndResponse = TagGameEndResponse.toDto(winMessage); try { String jsonMessage = objectMapper.writeValueAsString(tagGameEndResponse); @@ -76,7 +76,7 @@ private void sendWinMessage(WebSocketSession webSocketSession) { } private void sendLoseMessage(WebSocketSession webSocketSession) { - String winMessage = "패배하였습니다."; + String winMessage = "lose"; TagGameEndResponse tagGameEndResponse = TagGameEndResponse.toDto(winMessage); try { String jsonMessage = objectMapper.writeValueAsString(tagGameEndResponse);