A B C D F G I M N O P R S T U W

A

A - Variable in class board
the array A contains the stones.
action(Event, Object) - Method in class reversi
the action method is called when a button is pressed.
action(Event, Object) - Method in class newgamewindow
this method is called any time a button is pressed or an option selected.
answer(String, int) - Method in class boardview
this method is called by movers to return return the move they want to do.
ask(String) - Method in class player
the method you can call if you want this player to think of a move in a separate thread.

B

bestmove() - Method in class player
this functions returns the move that this player thinks is best.
board - class board.
a board contains the current game situation: where the stones are, what color they have and who should move.
board() - Constructor for class board
 
boardview - class boardview.
a boardview is a canvas (a rectangle that can be displayed on the screen and painted on) that can display a board.
boardview(board) - Constructor for class boardview
constructor in non-applet mode
boardview(board, reversi) - Constructor for class boardview
constructor for applet mode

C

canmove(int) - Method in class board
returns whether the current player is allowed to place a stone at c.
cleanup() - Method in class genetictrain
 
clear() - Method in class board
resetup the board to the initial situation.
close() - Method in class file
close both the file opened for reading and the one for writing (if any)
copy() - Method in class board
returns an exact copy of this board.
crossover(weightvector) - Method in class weightvector
crosses this weight vector with the given weight vector.

D

display() - Method in class boardview
creates a frame that shows this boardview.
dnum(String) - Static method in class file
converts a String to a double.
domove(int) - Method in class boardview
do the given move on the board.
domove(int) - Method in class board
do the given move on this board.

F

file - class file.
This is a class for reading and writing textfiles. basic use : make a file object do readopen do some read do close or: make an object do writeopen do some writing do close
file() - Constructor for class file
 
finished() - Method in class board
returns true iff the game is finished.
FREE - Static variable in class board
 

G

genetictrain - class genetictrain.
this class is not used by the applet, but only by its own main function.
genetictrain(int) - Constructor for class genetictrain
 
get(int) - Method in class board
get the value of the given field
get(int, int) - Method in class board
get the value of the field indicated in 2dimensional coordinates.
getcoverage() - Method in class board
return the number of visible fields that are not free.
getevalvector(int[]) - Method in class board
returns a certain set of number that will be used to evaluate the situation.
getflips(int) - Method in class board
return the number of stones that would flip when playing c.
getplayer() - Method in class board
get the player currently moving: P1 or P2.

I

init() - Method in class reversi
the init method is called when the applet is loaded by the browser.

M

main(String[]) - Static method in class reversi
this method is quick & dirty trick for running this applet as an application.
main(String[]) - Static method in class genetictrain
the main function.
message(String) - Method in class reversi
sets a given text in the message label.
mouseDown(Event, int, int) - Method in class boardview
this method is called if the user clicked the mouse.

N

newgame() - Method in class reversi
this method is called by newgamewindow.
newgamewindow - class newgamewindow.
this is a window for popping up to create a new game. the user can set what kind of game he wants, and then press cancel or start.
newgamewindow(reversi) - Constructor for class newgamewindow
create a new newgamewindow.
num(String) - Static method in class file
converts a String to an int.

O

OUT - Static variable in class board
 

P

P1 - Static variable in class board
 
P1wins() - Method in class board
returns true if player 1 won the game.
P2 - Static variable in class board
 
P2wins() - Method in class board
returns true if player 2 won the game.
paint(Graphics) - Method in class boardview
this method is called by the operating system if the frame must be redrawn, and by the rest of the program if something changed on the board.
player - class player.
this class is a computer player, that calculates what move to do in a given situation.
player(board, int) - Constructor for class player
create a player.
player(board, int, boardview) - Constructor for class player
create a player for applet mode: the player calculates in a separate thread, and wait 4 seconds before answering.

R

read() - Method in class file
read one line of the input file.
read(String) - Method in class genetictrain
read in a population from a file.
readclose() - Method in class file
close the file opened for reading.
readopen(File) - Method in class file
open a file for reading.
readopen(String) - Method in class file
open a file for reading.
reversi - class reversi.
reversi.java is an applet for playing the reversi othello board game against the computer.
reversi() - Constructor for class reversi
constructor for running this applet as an application
run() - Method in class boardview
this method is the one that runs in its own thread to do the animation. it calls fade() every 150 milliseconds.
run() - Method in class player
the method that will run in a separate thread.
run(int) - Method in class genetictrain
let the genetic algorithm run the given number of rounds.

S

set(int, int) - Method in class board
set the given field with the given value
setplayers(boolean, boolean) - Method in class boardview
you can indicate here whether computer players must be used.
setstrength(int) - Method in class player
determines how far the computer looks ahead, higher value plays better, but takes more time.
setweight(int[]) - Method in class player
set the weight vector this player should use.
start() - Method in class reversi
the start method of the applet.
start() - Method in class boardview
is called if a new thread is created for the animation.
statusmessage() - Method in class board
returns a line of text describing the situation.
stop() - Method in class reversi
here we stop the animation
stop() - Method in class boardview
is called if someone wants the thread to stop.

T

toString() - Method in class weightvector
 

U

undo() - Method in class reversi
this method undoes a move, if possible.
undomove() - Method in class boardview
undo the last move on the board.
undomove() - Method in class board
undo the last move.

W

W - Variable in class player
The string W is the evaluation string used to evaluate situations.
weightvector - class weightvector.
this is a data-holding object that mainly just contains numbers that are used by the evaluation function.
weightvector() - Constructor for class weightvector
create a new weigth vector filled with random numbers.
weightvector(String) - Constructor for class weightvector
create a new weight vector from the given string.
weightvector(weightvector) - Constructor for class weightvector
make a copy of the given vector with small changes.
weightvector(weightvector[]) - Constructor for class weightvector
creates a new vector with the average of the given population.
write(String) - Method in class file
Write out the given string as a separate line.
write(String, String) - Method in class genetictrain
the file to write.
writeopen(File) - Method in class file
open a file for writing.
writeopen(String) - Method in class file
open a file for writing.

A B C D F G I M N O P R S T U W