Commit 01516b2f authored by melvinfonda's avatar melvinfonda
Browse files

accept done 2

parent f9d10a5f
......@@ -649,9 +649,9 @@ public class TCPClient {
return responseJSON;
}
public static void main(String argv[]) throws Exception
{
TCPClient client = new TCPClient("localhost", 6789);
// public static void main(String argv[]) throws Exception
// {
// TCPClient client = new TCPClient("localhost", 6789);
// do {
// BufferedReader inFromUser = new BufferedReader( new InputStreamReader(System.in));
......@@ -754,16 +754,16 @@ public class TCPClient {
// } while(true);
// } while(!command.equalsIgnoreCase("exit"));
//
JSONObject response = client.login("ayam", "ayam");
if(response.getString("status").equals("ok")) {
client.token = response.getString("token");
client.x=response.getInt("x");
client.y=response.getInt("y");
}
System.out.println(response.toString());
response = client.map();
System.out.println(response.toString());
// JSONObject response = client.login("ayam", "ayam");
// if(response.getString("status").equals("ok")) {
// client.token = response.getString("token");
// client.x=response.getInt("x");
// client.y=response.getInt("y");
// }
// System.out.println(response.toString());
//
// response = client.map();
// System.out.println(response.toString());
//
// response = client.offer(client.token, 0, 1, 7, 3);
// System.out.println(response.toString());
......@@ -771,12 +771,12 @@ public class TCPClient {
// response = client.findoffer(client.token, 2);
// System.out.println(response.toString());
//
response = client.accept(client.token, "a");
System.out.println(response.toString());
// response = client.accept(client.token, "a");
// System.out.println(response.toString());
//
// response = client.tradebox(client.token);
// System.out.println(response.toString());
}
// }
//
//
//
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment