All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class alt.tictac.TicTacToe

java.lang.Object
   |
   +----game.Game
           |
           +----alt.tictac.TicTacToe

public class TicTacToe
extends Game
implements TicTacToeConstants
TicTacToe for Jags


Variable Index

 o black
 o blackId
 o blackPlayer
 o first
Who goes first in the next game?
 o scored
q'n'sd !
 o white
 o whiteId
 o whiteNext
 o whitePlayer
 o won

Constructor Index

 o TicTacToe()
Creates a new TicTacToe

Method Index

 o ()
Initialize all winning positions.
 o addPlayer(Player)
Adds the specified player in this game, so that this player is able to play the game.
 o createPlayer(String, GameLinkFilter)
Creates a new particular Player for this game.
 o frameReceived(Object, LinkFrame)
Messaged when a new data frame is received by the GameLinkFilter object and this frame belongs to the groups the GameLinkListener asked to listen to.
 o getStatusFrame()
 o isWon(int)
Mark all positions with these bits set as winning.
 o removePlayer(Player)
Removes the specified player from this game.
 o repercution()
 o run()
 o sendStatus()
 o setupPlayer(Player)
[DESCRIBE ME]
 o start()
Starts the Game [CHECK: DO WE NEED THIS?]
 o status()
Figure what the status of the game is.
 o yourMoveBlack(int)
User move.
 o yourMoveWhite(int)
 o yourTurn()

Variables

 o won
 static boolean won[]
 o whiteNext
 boolean whiteNext
 o white
 int white
 o black
 int black
 o whiteId
 int whiteId
 o blackId
 int blackId
 o whitePlayer
 Player whitePlayer
 o blackPlayer
 Player blackPlayer
 o scored
 boolean scored
q'n'sd !

 o first
 boolean first
Who goes first in the next game?

Constructors

 o TicTacToe
 public TicTacToe()
Creates a new TicTacToe

Methods

 o isWon
 static void isWon(int pos)
Mark all positions with these bits set as winning.

 o
 static void ()
Initialize all winning positions.

 o createPlayer
 public Player createPlayer(String name,
                            GameLinkFilter link)
Creates a new particular Player for this game.

Overrides:
createPlayer in class Game
 o addPlayer
 public void addPlayer(Player player) throws TooManyPlayersException, ClosedGameException
Adds the specified player in this game, so that this player is able to play the game.

Overrides:
addPlayer in class Game
 o setupPlayer
 public void setupPlayer(Player player)
[DESCRIBE ME]

Overrides:
setupPlayer in class Game
 o removePlayer
 public void removePlayer(Player player)
Removes the specified player from this game.

Overrides:
removePlayer in class Game
 o yourMoveBlack
 boolean yourMoveBlack(int m)
User move.

Returns:
true if legal
 o yourMoveWhite
 boolean yourMoveWhite(int m)
 o status
 int status()
Figure what the status of the game is.

 o getStatusFrame
 public LinkFrame getStatusFrame()
 o sendStatus
 public void sendStatus()
 o frameReceived
 public void frameReceived(Object link,
                           LinkFrame frame)
Messaged when a new data frame is received by the GameLinkFilter object and this frame belongs to the groups the GameLinkListener asked to listen to.

Overrides:
frameReceived in class Game
 o start
 public void start()
Starts the Game [CHECK: DO WE NEED THIS?]

Overrides:
start in class Game
 o repercution
 public void repercution()
 o yourTurn
 public void yourTurn()
 o run
 public void run()

All Packages  Class Hierarchy  This Package  Previous  Next  Index