A B C D G I 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(Observer) - Method in interface tictactoe.BoardGame
Subclasses should implement this method of java.util.Observable.
AppletPlayer - class tictactoe.AppletPlayer.
Manage interaction with user.
AppletPlayer(char) - Constructor for class tictactoe.AppletPlayer
 
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 tictactoe.Move
 
cols() - Method in class tictactoe.AbstractBoardGame
 
cols() - Method in interface tictactoe.BoardGame
 
currentPlayer() - Method in class tictactoe.AbstractBoardGame
 
currentPlayer() - Method in interface tictactoe.BoardGame
 

D

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

G

game() - Method in class tictactoe.GameApplet
 
GameApplet - class tictactoe.GameApplet.
This class implements the view on a TicTacToe game.
GameApplet() - Constructor for class tictactoe.GameApplet
 
GameDriver - class tictactoe.GameDriver.
Instantiates a plain ASCII version of TicTacToe or Gomoku.
GameDriver() - Constructor for class tictactoe.GameDriver
 
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 tictactoe.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 tictactoe.GameApplet
Instantiates the BoardGame, 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
 

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.TestDriver
 
mark() - Method in class tictactoe.InactivePlayer
 
mark() - Method in interface tictactoe.Player
 
mouseClicked(MouseEvent) - Method in class tictactoe.PlaceListener
When the mouse is clicked, we ask the current player to make the corresponding move.
Move - class tictactoe.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.AppletPlayer
Attempt to make the given move in the associated game.
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(int, int, Player) - Constructor for class tictactoe.Move
 

N

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
 

P

PlaceListener - class tictactoe.PlaceListener.
This class picks up mouse clicks and propogates them to a Player of the BoardGame.
PlaceListener(Place, GameApplet) - Constructor for class tictactoe.PlaceListener
 
player - Variable in class tictactoe.Move
 
Player - interface tictactoe.Player.
Minimal interface for Player classes that get moves from user and forward them to the game.
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.
row - Variable in class tictactoe.Move
 
rows() - Method in class tictactoe.AbstractBoardGame
 
rows() - Method in interface tictactoe.BoardGame
 
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 tictactoe.GameApplet
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 tictactoe.AbstractBoardGame
A plain ascii representation of the game, mainly for debugging purposes.
toString() - Method in class tictactoe.InactivePlayer
 
toString() - Method in class tictactoe.Move
 

U

update(Observable, Object) - Method in class tictactoe.GameApplet
Implements the java.util.Observer interface.

W

winner() - Method in class tictactoe.AbstractBoardGame
 
winner() - Method in interface tictactoe.BoardGame
 

_

_cols - Variable in class tictactoe.AbstractBoardGame
 
_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 G I M N P R S T U W _