ggz.tictactoe
Class Client

java.lang.Object
  extended by ggz.tictactoe.Client

public class Client
extends java.lang.Object


Field Summary
protected  java.net.Socket socket
           
 
Constructor Summary
Client(java.net.Socket s)
           
 
Method Summary
 void addTicTacToeListener(TicTacToeListener l)
           
protected  void fireBoardChanged()
           
protected  void fireCancelMove()
           
protected  void fireGameStatus(java.lang.String message)
           
protected  void fireMoveRequested()
           
protected  void fireSeatChanged(int seatNum)
           
 int getMySeat()
           
 java.lang.String getPlayerName(int seatNum)
           
 char getPlayerSymbol(int seatNum)
           
protected  void readPacket()
           
 void sendMyMove(int cellIndex)
           
 void start()
          Starts listening for messages from the server.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

socket

protected java.net.Socket socket
Constructor Detail

Client

public Client(java.net.Socket s)
       throws java.io.IOException
Throws:
java.io.IOException
Method Detail

getPlayerName

public java.lang.String getPlayerName(int seatNum)

getPlayerSymbol

public char getPlayerSymbol(int seatNum)

getMySeat

public int getMySeat()

start

public void start()
Starts listening for messages from the server.


readPacket

protected void readPacket()
                   throws java.io.IOException
Throws:
java.io.IOException

sendMyMove

public void sendMyMove(int cellIndex)
                throws java.io.IOException
Throws:
java.io.IOException

fireGameStatus

protected void fireGameStatus(java.lang.String message)

fireBoardChanged

protected void fireBoardChanged()

fireSeatChanged

protected void fireSeatChanged(int seatNum)

fireMoveRequested

protected void fireMoveRequested()

fireCancelMove

protected void fireCancelMove()

addTicTacToeListener

public void addTicTacToeListener(TicTacToeListener l)