All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class alt.tictac.TicTacToeClient

java.lang.Object
   |
   +----game.ClientGame
           |
           +----alt.tictac.TicTacToeClient

public class TicTacToeClient
extends ClientGame
implements TicTacToeConstants
Client part of the TicTacToe for Jags


Variable Index

 o black
 o crossImage
The image for black.
 o gamePanel
The game panel
 o gamePanel2
 o notImage
The image for white.
 o status
 o white

Constructor Index

 o TicTacToeClient()
Creates a new TicTacToeClient

Method Index

 o createPlayer(int, Object)
Creates a new particular Player for this game.
 o frameReceived(Object, LinkFrame)
 o getGameLink()
 o make(GameLinkFilter, int)
 o status()
Figure what the status of the game is.
 o yourMove(int)
User move.

Variables

 o gamePanel2
 JLabel gamePanel2
 o gamePanel
 Container gamePanel
The game panel

 o white
 int white
 o black
 int black
 o notImage
 Image notImage
The image for white.

 o crossImage
 Image crossImage
The image for black.

 o status
 int status

Constructors

 o TicTacToeClient
 public TicTacToeClient()
Creates a new TicTacToeClient

Methods

 o make
 public void make(GameLinkFilter link,
                  int myPlayerId)
Overrides:
make in class ClientGame
 o createPlayer
 public Player createPlayer(int id,
                            Object frameData)
Creates a new particular Player for this game. This method should be overriden by children so the created player is of the right type.

Parameters:
name - the name of the new player to create
id - the id of the player, which should have been sent by the server.
Returns:
the newly created player of the right type to be used in this game.
Overrides:
createPlayer in class ClientGame
 o yourMove
 boolean yourMove(int m)
User move.

Returns:
true if legal
 o frameReceived
 public void frameReceived(Object link,
                           LinkFrame frame)
Overrides:
frameReceived in class ClientGame
 o status
 int status()
Figure what the status of the game is.

 o getGameLink
 public GameLinkFilter getGameLink()

All Packages  Class Hierarchy  This Package  Previous  Next  Index