A B C D E G I J M N P R S T U W _

A

AbstractBoardGame - class tictactoe.AbstractBoardGame.
AbstractBoardGame implements common methods to TicTacToe and Gomoku.
AbstractBoardGame() - Constructor for class tictactoe.AbstractBoardGame
 
addObserver(RemoteObserver) - Method in interface server.RemoteGame
Register as a RemoteObserver of the game.
addObserver(RemoteObserver) - Method in class tictactoe.AbstractBoardGame
Wraps a RemoteObserver to behave like a regular Observer (which does not throw any RemoteException) so we can directly use the inherited Observable methods.
addObserver(RemoteObserver) - Method in interface tictactoe.BoardGame
Used by GameProxy to connect RemoteObservers to a game.
addObserver(RemoteObserver) - Method in class tictactoe.GameProxy
 
assert(boolean) - Method in class tictactoe.AbstractBoardGame
 
assert(boolean) - Method in class tictactoe.Asserter
 
Asserter - class tictactoe.Asserter.
Mixin class that implements assert()
Asserter() - Constructor for class tictactoe.Asserter
 
AssertionException - exception tictactoe.AssertionException.
All Exception classes look like this.

B

BoardGame - interface tictactoe.BoardGame.
Interface for TicTacToe and Gomoku.

C

checkWinner(int, int) - Method in class tictactoe.AbstractBoardGame
This algorithm works both for TicTacToe and Gomoku.
col - Variable in class server.Move
 
cols() - Method in interface server.RemoteGame
 
cols() - Method in class tictactoe.AbstractBoardGame
 
cols() - Method in interface tictactoe.BoardGame
 
cols() - Method in class tictactoe.GameProxy
 
currentPlayer() - Method in interface server.RemoteGame
 
currentPlayer() - Method in class tictactoe.AbstractBoardGame
 
currentPlayer() - Method in interface tictactoe.BoardGame
 
currentPlayer() - Method in class tictactoe.GameProxy
For remote clients.

D

doGomokuTests() - Static method in class tictactoe.TestDriver
 
doTicTacToeTests() - Static method in class tictactoe.TestDriver
 

E

error(String) - Method in class client.GameView
Display a serious error.

G

game() - Method in class client.GameView
 
GameApplet - class client.GameApplet.
This class implements a button for starting a TicTacToe (or Gomoku) game.
GameApplet() - Constructor for class client.GameApplet
 
GameDriver - class tictactoe.GameDriver.
Instantiates a plain ASCII version of TicTacToe or Gomoku.
GameDriver() - Constructor for class tictactoe.GameDriver
 
GameFactory - class tictactoe.GameFactory.
Implements factory method to instantiate BoardGame for remote clients.
GameFactory() - Constructor for class tictactoe.GameFactory
Must be declared since we inherit from UnicastRemoteObject
GameObserver - class client.GameObserver.
Called by the RemoteGame when it changes state.
GameObserver() - Constructor for class client.GameObserver
Must be declared since we inherit from UnicastRemoteObject
GameObserver(GameView) - Constructor for class client.GameObserver
This is the constructor to use.
GameProxy - class tictactoe.GameProxy.
BoardGame wrapper to provide RemoteGame interface.
GameView - class client.GameView.
This class implements the view on a BoardGame.
GameView(RemoteGameFactory) - Constructor for class client.GameView
Instantiates the RemoteGame.
get(int, int) - Method in class tictactoe.AbstractBoardGame
Used by Runner to detect a winning run of marks.
get(int, int) - Method in interface tictactoe.BoardGame
 
getAppletInfo() - Method in class client.GameApplet
Return author and copyright information
Gomoku - class tictactoe.Gomoku.
Class to enforce rules of Gomoku.
Gomoku(Player, Player) - Constructor for class tictactoe.Gomoku
Gomoku is similar to TicTacToe, except it is played on a 19x19 Go board, and the winner must get 5 in a row.
Gomoku(Player, Player, int, int) - Constructor for class tictactoe.Gomoku
Gomoku can also be played on a board of different dimensions.

I

InactivePlayer - class tictactoe.InactivePlayer.
Manage interaction with user.
InactivePlayer() - Constructor for class tictactoe.InactivePlayer
Special constructor for the Player representing nobody.
InactivePlayer(char) - Constructor for class tictactoe.InactivePlayer
The normal contructor to use.
init() - Method in class client.GameApplet
Instantiates the RemoteGame, initializes the view components, and connects the view to the model.
init(int, int, int, Player, Player) - Method in class tictactoe.AbstractBoardGame
Generic initialization for BoardGame.
initFailed(AssertionException) - Method in class tictactoe.AbstractBoardGame
 
inRange(int, int) - Method in class tictactoe.AbstractBoardGame
 
inRange(int, int) - Method in interface tictactoe.BoardGame
 
isNobody() - Method in class tictactoe.InactivePlayer
 
isNobody() - Method in interface tictactoe.Player
 

J

join() - Method in interface server.RemoteGame
A client connected to the game must join the game to know what its mark is (X or O).
join() - Method in class tictactoe.GameProxy
A client connected to the game must join the game to know what its mark is (X or O).
joinGame() - Method in interface server.RemoteGameFactory
Returns RemoteGame instance for a remote client.
joinGame() - Method in class tictactoe.GameFactory
Returns a RemoteGame instance for a remote client.

M

main(String[]) - Static method in class tictactoe.GameDriver
Queries the user whether to instantiate TicTacToe or Gomoku.
main(String[]) - Static method in class tictactoe.GameFactory
main() method to create one instance of GameFactory and register it with the Naming service.
main(String[]) - Static method in class tictactoe.TestDriver
 
mark - Variable in class server.Move
 
mark() - Method in class client.GameView
 
mark() - Method in class tictactoe.InactivePlayer
 
mark() - Method in interface tictactoe.Player
 
mouseClicked(MouseEvent) - Method in class client.PlaceListener
When the mouse is clicked, forward a Move request to the RemoteGame.
Move - class server.Move.
Bundles together information about a change of state in a BoardGame.
move() - Method in class tictactoe.StreamPlayer
The Player makes a move by reading a line of text from the input stream, and interpreting it using chess notation, i.e., column is 'a' through 'c' and row is '1' through '3'.
move(int, int) - Method in class tictactoe.PassivePlayer
Attempt to make the given move in the associated game.
Move(int, int, char) - Constructor for class server.Move
 
move(int, int, Player) - Method in class tictactoe.AbstractBoardGame
Called by the current player.
move(int, int, Player) - Method in interface tictactoe.BoardGame
Attempt to move to the given square
move(Move) - Method in interface server.RemoteGame
Attempt to move to the given square.
move(Move) - Method in class tictactoe.GameProxy
Attempt to move to the given square.

N

notOver() - Method in interface server.RemoteGame
 
notOver() - Method in class tictactoe.AbstractBoardGame
The game is not over as long as there is no winner and somebody can still make a move ...
notOver() - Method in interface tictactoe.BoardGame
 
notOver() - Method in class tictactoe.GameProxy
 

P

PassivePlayer - class tictactoe.PassivePlayer.
A PassivePlayer attempts to make a move when its move() method is called by some Driver.
PassivePlayer(char) - Constructor for class tictactoe.PassivePlayer
 
PlaceListener - class client.PlaceListener.
This class picks up mouse clicks and propagates them to the RemoteGame.
PlaceListener(Place, GameView) - Constructor for class client.PlaceListener
 
Player - interface tictactoe.Player.
Minimal interface for Player classes that get moves from user and forward them to the game.
player(int) - Method in class tictactoe.AbstractBoardGame
Return Player #n (0 or 1), else Player "nobody".
player(int) - Method in interface tictactoe.BoardGame
Return Player #n (0 or 1), else Player "nobody".
playGame(BoardGame) - Static method in class tictactoe.GameDriver
Plays an instantiated BoardGame in verbose mode (i.e., printing every board state).
playGame(BoardGame, boolean) - Static method in class tictactoe.GameDriver
Plays a game until it is over by repeatedly asking the current Player to move.

R

readChar() - Static method in class tictactoe.GameDriver
Helper method to get a character from the standard input.
ready() - Method in interface server.RemoteGame
The game is ready to be played.
ready() - Method in class tictactoe.GameProxy
The game is ready to be played if there are two connected clients.
RemoteGame - interface server.RemoteGame.
Remote interface for TicTacToe and Gomoku.
RemoteGameFactory - interface server.RemoteGameFactory.
Interface exported to remote clients that need to instantiate a game.
RemoteObserver - interface server.RemoteObserver.
Interface to allow remote clients to be notified of updates from the game.
row - Variable in class server.Move
 
rows() - Method in interface server.RemoteGame
 
rows() - Method in class tictactoe.AbstractBoardGame
 
rows() - Method in interface tictactoe.BoardGame
 
rows() - Method in class tictactoe.GameProxy
 
run(int, int) - Method in class tictactoe.Runner
A Runner runs in some direction (dcol,drow) as far as it can, as long as the pieces on the Board are the same as the home square.
Runner - class tictactoe.Runner.
Helper class to find winning scores for BoardGame.
Runner(BoardGame, int, int) - Constructor for class tictactoe.Runner
 

S

set(int, int, Player) - Method in class tictactoe.AbstractBoardGame
Modifies the state of the game.
setGame(BoardGame) - Method in class tictactoe.InactivePlayer
Let this player join a particular game.
setGame(BoardGame) - Method in interface tictactoe.Player
Let this player join a particular game.
setWinner(Player) - Method in class tictactoe.AbstractBoardGame
 
showFeedBack(String) - Method in class client.GameView
Displays a feedback string in the associated Label component.
squaresLeft() - Method in class tictactoe.AbstractBoardGame
 
squaresLeft() - Method in interface tictactoe.BoardGame
 
StreamPlayer - class tictactoe.StreamPlayer.
Manage interaction with user.
StreamPlayer(char) - Constructor for class tictactoe.StreamPlayer
The normal contructor to use.
StreamPlayer(char, BufferedReader) - Constructor for class tictactoe.StreamPlayer
Constructor to specify an alternative source of moves (e.g., a test case StringReader).
StreamPlayer(char, String) - Constructor for class tictactoe.StreamPlayer
Special constructor to make a Player that plays a fixed set of moves from a String.
swapTurn() - Method in class tictactoe.AbstractBoardGame
 

T

test() - Method in class tictactoe.AbstractBoardGame
Some generic tests for both TicTacToe and Gomoku.
test() - Method in interface tictactoe.BoardGame
Run a generic test suite.
TestDriver - class tictactoe.TestDriver.
Test Driver for TicTacToe.
TestDriver() - Constructor for class tictactoe.TestDriver
 
testGame(BoardGame, String, int) - Static method in class tictactoe.TestDriver
Run a game with simulated input for X and Y, and check that the winner is as expected.
TicTacToe - class tictactoe.TicTacToe.
Class to enforce rules of TicTacToe.
TicTacToe(Player, Player) - Constructor for class tictactoe.TicTacToe
 
toString() - Method in class server.Move
 
toString() - Method in class tictactoe.AbstractBoardGame
A plain ascii representation of the game, mainly for debugging purposes.
toString() - Method in class tictactoe.InactivePlayer
 

U

update(Move) - Method in class client.GameObserver
Implements the RemoteObserver interface.
update(Move) - Method in class client.GameView
Called by the GameObserver when the game's state changes.
update(Move) - Method in interface server.RemoteObserver
 

W

winner() - Method in interface server.RemoteGame
 
winner() - Method in class tictactoe.AbstractBoardGame
 
winner() - Method in interface tictactoe.BoardGame
 
winner() - Method in class tictactoe.GameProxy
For remote clients.

_

_cols - Variable in class tictactoe.AbstractBoardGame
 
_connected - Variable in class tictactoe.GameProxy
 
_game - Variable in class tictactoe.GameProxy
 
_game - Variable in class tictactoe.InactivePlayer
 
_gameState - Variable in class tictactoe.AbstractBoardGame
 
_nobody - Variable in class tictactoe.AbstractBoardGame
 
_player - Variable in class tictactoe.AbstractBoardGame
 
_rows - Variable in class tictactoe.AbstractBoardGame
 
_squaresLeft - Variable in class tictactoe.AbstractBoardGame
 
_turn - Variable in class tictactoe.AbstractBoardGame
 
_winner - Variable in class tictactoe.AbstractBoardGame
 
_winningScore - Variable in class tictactoe.AbstractBoardGame
 

A B C D E G I J M N P R S T U W _