fix: modify small details
This commit is contained in:
@@ -33,7 +33,7 @@ public class Client {
|
|||||||
try {
|
try {
|
||||||
//TODO: initialize out
|
//TODO: initialize out
|
||||||
this.out = new DataOutputStream(clientSocket.getOutputStream());
|
this.out = new DataOutputStream(clientSocket.getOutputStream());
|
||||||
//TODO: create a BattleShipClientNetworkHandler
|
//TODO: create a ClientNetworkReceiver
|
||||||
//TODO: start it in another thread
|
//TODO: start it in another thread
|
||||||
|
|
||||||
System.out.println("Enter Username: ");
|
System.out.println("Enter Username: ");
|
||||||
@@ -290,7 +290,7 @@ public class Client {
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
//initialize clientSocket
|
//initialize clientSocket
|
||||||
//initialize BattleShipClient
|
//initialize Client
|
||||||
} finally {
|
} finally {
|
||||||
try {
|
try {
|
||||||
if (clientSocket != null) {
|
if (clientSocket != null) {
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ public class ClientNetworkReceiver implements Runnable{
|
|||||||
int row = 0; //TODO: extract row
|
int row = 0; //TODO: extract row
|
||||||
int col = 0; //TODO: extract col
|
int col = 0; //TODO: extract col
|
||||||
String message = client.getHit(row, col);
|
String message = client.getHit(row, col);
|
||||||
|
//TODO: inform server
|
||||||
}
|
}
|
||||||
else if(false) //TODO: handle hit result from opponent
|
else if(false) //TODO: handle hit result from opponent
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user