From b3237169d631a050046102ac46cc5f6b6c5ac68e Mon Sep 17 00:00:00 2001 From: Mehrdad Shirvani Date: Tue, 13 May 2025 14:15:56 +0330 Subject: [PATCH] fix: modify ClientHandler --- src/main/java/Server/ClientHandler.java | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/main/java/Server/ClientHandler.java b/src/main/java/Server/ClientHandler.java index cdf6790..7f75062 100644 --- a/src/main/java/Server/ClientHandler.java +++ b/src/main/java/Server/ClientHandler.java @@ -13,8 +13,8 @@ public class ClientHandler implements Runnable { private String username; ClientHandler enemy; - public void print(String requst) { - //TODO: write to output + public void sendData(String request) { + //TODO: write to output and flush } public void setEnemy(ClientHandler enemy) throws IOException { @@ -50,9 +50,10 @@ public class ClientHandler implements Runnable { int col = 0;//TODO: extract row and col //TODO: inform enemy of the attack } - else if (false) { //TODO: Handle Hit Result - //TODO: inform the enemy of the hit result + else if (false) { //TODO: Handle Attack Result + // TODO: Notify the attacker about the result of their attack (hit or miss) } + //TODO(for later): handle winning and losing } } finally {