ggz.tictactoe
Class Client
java.lang.Object
ggz.tictactoe.Client
public class Client
- extends java.lang.Object
Field Summary |
protected java.net.Socket |
socket
|
Constructor Summary |
Client(java.net.Socket s)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
socket
protected java.net.Socket socket
Client
public Client(java.net.Socket s)
throws java.io.IOException
- Throws:
java.io.IOException
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)