Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion OmokClient/BoardPanel.java
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ private void resetBoard() {
/**
* 서버로부터 받은 승리 신호를 처리합니다 (승리/무승부 dialog 표시).
*/
public void handleWin(int winner) {
public void handleWin(String winner) {
showGameEndDialog("🎉" + winner + " 승리!");
}

Expand Down
2 changes: 1 addition & 1 deletion OmokClient/NetworkHandler.java
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ private void listen() {
board.updateBoard(x, y, pid);
}
} else if (msg.startsWith("WIN")) {
int winner = Integer.parseInt(msg.split(" ")[1]);
String winner = msg.split(" ")[2];
if (board != null) {
board.handleWin(winner);
}
Expand Down
2 changes: 1 addition & 1 deletion OmokServer/OmokServer.java
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ public synchronized void handleMove(int x, int y, int playerId) {
broadcast("MOVE " + x + " " + y + " " + playerId);

if (gameBoard.checkWin(x, y, playerId)) {
broadcast("WIN " + getPlayerName(playerId));
broadcast("WIN " + playerId + " " + getPlayerName(playerId));
recordWin(playerId); // ← 여기서 ID 기반 저장

gameActive = false;
Expand Down
Binary file modified out/BoardPanel.class
Binary file not shown.
Binary file modified out/NetworkHandler.class
Binary file not shown.
Binary file modified out/OmokServer.class
Binary file not shown.
7 changes: 7 additions & 0 deletions record.txt
Original file line number Diff line number Diff line change
Expand Up @@ -64,3 +64,10 @@
2025-12-01T23:25:18.875612100 - 1234 승리 / 1 패배
2025-12-01T23:31:06.643829900 - 1234 승리 / 1 패배
2025-12-09T13:15:48.232870900 - 1234 승리 / portrait39831 패배
2025-12-09T13:37:28.188431700 - 1234 승리 / 1 패배
2025-12-09T14:13:29.025743900 - 1234 승리 / 1 패배
2025-12-16T13:09:34.289978300 - 1234 승리 / 1 패배
2025-12-16T13:15:26.354217300 - portrait39831 승리 / cndskaeo 패배
2025-12-16T13:18:48.055831600 - portrait39831 승리 / cndskaeo 패배
2025-12-16T13:22:08.079332700 - portrait39831 승리 / cndskaeo 패배
2025-12-16T13:25:01.475653300 - portrait39831 승리 / cndskaeo 패배