How can i send a point (x,y) in a server in java?
<p>i'm trying to change a Skor4 game (feor two players) into tic tac toe. The problem is that in the source code that im trying to change sends only the x dimension of the ball to the server and then the other player takes that x dimension and finds the y dimension. In my case i want to send both x and y dimension. How can i do this??</p>

<p><strong>when a player plays:</strong></p>

<pre><code>else if (myMove) {
  Point pos = gameEngine.makeMove(0, x/160, y/162);//
  if (pos.y &gt;= 0) {
    if (!gameEngine.isWinner(0))
      if (!gameEngine.isTie()) {
        redSnd.play();
        status = new String("Their turn.");
        connection.sendMove(pos.x);  //
        myMove = false;
</code></pre>

<p><strong>here is the sendMove:</strong></p>

<pre><code>public void sendMove(int col) {
  String s = (new Integer(col)).toString();
  send(s);
}
</code></pre>

<p><strong>here is send:</strong></p>

<pre><code>public void send(String s) {
  outStream.println(s);
}
</code></pre>

<p><strong>After that the other player receives the move:</strong></p>

<pre><code>int istatus = connection.getTheirMove();
</code></pre>

<p><strong>here is getTheirMove:</strong></p>

<pre><code>public int getTheirMove() {
  // Make sure we're still connected
  if (!isConnected()) 
    throw new NullPointerException("Attempted to read closed socket!");
  try {
    String s = receive();
    System.out.println("Received: " + s);
    if (s == null)
      return GAMEOVER;
    s = s.trim();

    try {
      return (new Integer(s)).intValue();
    } catch (NumberFormatException e) {
        // It was probably a status report error
        return getStatus(s);
    }
  } catch (IOException e) {
      System.out.println("I/O Error: " + e);
      System.exit(1);
      return 0;
    }
  }
</code></pre>

<p><strong>here is receive:</strong></p>

<pre><code>public String receive() throws IOException {
    return inStream.readLine();
}
</code></pre>
