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
-
black
-
-
blackId
-
-
blackPlayer
-
-
first
- Who goes first in the next game?
-
scored
- q'n'sd !
-
white
-
-
whiteId
-
-
whiteNext
-
-
whitePlayer
-
-
won
-
-
TicTacToe()
- Creates a new TicTacToe
-
()
- Initialize all winning positions.
-
addPlayer(Player)
- Adds the specified player in this game, so that this player is able
to play the game.
-
createPlayer(String, GameLinkFilter)
- Creates a new particular
Player
for this game.
-
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.
-
getStatusFrame()
-
-
isWon(int)
- Mark all positions with these bits set as winning.
-
removePlayer(Player)
- Removes the specified player from this game.
-
repercution()
-
-
run()
-
-
sendStatus()
-
-
setupPlayer(Player)
- [DESCRIBE ME]
-
start()
- Starts the Game [CHECK: DO WE NEED THIS?]
-
status()
- Figure what the status of the game is.
-
yourMoveBlack(int)
- User move.
-
yourMoveWhite(int)
-
-
yourTurn()
-
won
static boolean won[]
whiteNext
boolean whiteNext
white
int white
black
int black
whiteId
int whiteId
blackId
int blackId
whitePlayer
Player whitePlayer
blackPlayer
Player blackPlayer
scored
boolean scored
- q'n'sd !
first
boolean first
- Who goes first in the next game?
TicTacToe
public TicTacToe()
- Creates a new TicTacToe
isWon
static void isWon(int pos)
- Mark all positions with these bits set as winning.
static void ()
- Initialize all winning positions.
createPlayer
public Player createPlayer(String name,
GameLinkFilter link)
- Creates a new particular
Player
for this game.
- Overrides:
- createPlayer in class Game
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
setupPlayer
public void setupPlayer(Player player)
- [DESCRIBE ME]
- Overrides:
- setupPlayer in class Game
removePlayer
public void removePlayer(Player player)
- Removes the specified player from this game.
- Overrides:
- removePlayer in class Game
yourMoveBlack
boolean yourMoveBlack(int m)
- User move.
- Returns:
- true if legal
yourMoveWhite
boolean yourMoveWhite(int m)
status
int status()
- Figure what the status of the game is.
getStatusFrame
public LinkFrame getStatusFrame()
sendStatus
public void sendStatus()
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
start
public void start()
- Starts the Game [CHECK: DO WE NEED THIS?]
- Overrides:
- start in class Game
repercution
public void repercution()
yourTurn
public void yourTurn()
run
public void run()
All Packages Class Hierarchy This Package Previous Next Index