Alphabetical Index

A B C D E F G I L M N P R S T U V

A

Abstract class AbstractPlayer - Defines the properties of player
actionPerformed(ActionEvent) - method in class game.PlayGame
This method is used to handle the events caused by the clicking of the buttons.
addLink(game.Node,int) - method in class game.Node
Initializes the Links of the Node object

B

BLACK - static field in class game.Transport
BUS - static field in class game.Transport

C

canMove(game.TestBoard) - method in class game.Detective
Checks if the detective can make a move or not
change(game.Node) - method in class game.AbstractPlayer
This method changes the position of the Fugitive without adding it to the prevPositions array.
change(game.Node,int) - method in class game.Detective
This method is a "quick and dirty" way of changing the position of a detective.
This method is used to change the position of a detective
changePosition(game.Node) - method in class game.Fugitive
This method changes the position of the fugitive
This method changes the position of the detective provided he has the requisite tickets and the availability of that particular node
compare(Object,Object) - method in class game.Move
Compares two objects of this class and returns the score depending on the values given by the getScore() method
compare(Object,Object) - method in class game.TestBoard
This method compares two objects of this class depending on the score of the boards
compareTo(Object) - method in class game.Move
This method compares this object to another objects
compareTo(Object) - method in class game.TestBoard
This method compares this board to another board o

D

Detective - class game.Detective
Inherits the class AbstractPlayer to define a detective

E

equal(game.Move,game.Move) - method in class game.Move
Checks if two objects of this class have the same score
This method checks whether two boards are equal

F

FERRY - static field in class game.Transport
font - static field in class game.PlayGame
Fugitive - class game.Fugitive
Uses class Player to define the properties of a fugitive.

G

game - package
getBlackTickets() - method in class game.Fugitive
getCurrentMoves() - method in class game.TestBoard
This method returns the currentMoves of this object.
This method returns all the possible moves for a given detective
getDetectives() - method in class game.TestBoard
This method is used to get the detectives of this board.
getLinks() - method in class game.Node
Returns the links of the node
getMrX() - method in class game.TestBoard
This method is used to get the MrX of this object.
getNode() - method in class game.Move
This method is used to get the nodeIndex of this class
getNumberOfDetectives() - static method in class game.TestBoard
getPlayerPos(int) - method in class game.MapLabel
Gets the position of the given player's current position on screen.
getPoint(int) - method in class game.TestBoard
Returns the pixel coordinates of the specified node on the map.
getPosition() - method in class game.AbstractPlayer
This method gives the position of this player
getPosition() - method in class game.Node
Returns the position of this node
This method returns the possible moves of the detective in a TreeSet
getPrevPos() - method in class game.AbstractPlayer
This method returns the previous positions of the player
getScore() - method in class game.Move
This method returns the score for this object which is used in the equals(),compare() and compareTo() methods
getToNode() - method in class game.Link
Returns the to node of this link
getType() - method in class game.Link
This method is used to get the type(weight) of the link
getType() - method in class game.Move
This method returns the ticket type

I

i18n - package
I18n - class i18n.I18n
INF - static field in class game.Transport
isCheckPoint() - method in class game.TestBoard
This method checks if Mr.
isCheckPoint(int) - method in class game.TestBoard
This method checks if Mr.
isMachineWin() - method in class game.TestBoard
Checks whether the machine has won
isUserWin() - method in class game.TestBoard
Checks if the user has won
itemStateChanged(ItemEvent) - method in class game.PlayGame
Called when the item in the JComboBox is changed

L

Link - class game.Link
Defines the basic properties of a Link.This class can be used to define a graph or a multi-graph with weighted edges.

M

main(args[]) - static method in class game.PlayGame
This is the main method.
MapLabel - class game.MapLabel
This class extends the JLabel class to provide the functionality of overlaying images (positions of detectives) on top of the game board.
MapLabel(ImageIcon,int) - constructor for class game.MapLabel
mobility() - method in class game.Detective
This method calculates the mobility of the detective the mobility is a parameter which depends on the number of tickets of the detectives and on the ways the detective can go from his current position to adjacent positions.
Move - class game.Move
This class encapsulates a move for the palyers.It has two data members,one for representing the node position and the other for representing the ticket Type for the move
Move(int,int) - constructor for class game.Move
This constructor initializes the data members of the Move
Move(String) - constructor for class game.Move
This constructor initializes the fields using the string representation of the object of this class e.g.
moveMrX() - method in class game.TestBoard
This method computes a move for Mr.

N

Node - class game.Node
Describes the basic properties of a node of the map and the various methods associated with this class.
NONE - static field in class game.Transport

P

paint(Graphics) - method in class game.MapLabel
PlayGame - class game.PlayGame
This class provides the GUI interfacing between the user and the machine It uses the swing functionality to provide a good interfacing
position - field in class game.AbstractPlayer
prevPositions - field in class game.AbstractPlayer
printBoard() - method in class game.TestBoard
This method prints the board i.e what are the nodes what are the links.
Prints all the possible detective moves for the current board positions of the detectives, together with the corresponding scores for each new positions of the detectives.

R

repaintPlayerPos(int) - method in class game.MapLabel
Repaints the area in which the position of the given player lies.

S

setBlackTickets(int) - method in class game.Fugitive
Set the number of black tickets the fugitive has initially.
setCurrentPlayer(int) - method in class game.MapLabel
Sets the currently active player and takes care of the blinking of the current player's position.
setDepth(int) - method in class game.TestBoard
This method changes the difficulty level for the game
setPlayerPos(int,int,int) - method in class game.MapLabel
setPlayerPos(int,Point) - method in class game.MapLabel
setStaticState() - method in class game.Detective
This method is used to make the necessary changes in case the detective cannot move i.e.
setToNode(game.Node) - method in class game.Link
Initializes the to node of this link

T

TAXI - static field in class game.Transport
test() - method in class game.TestBoard
Prints the shortest distance matrix
TestBoard - class game.TestBoard
Defines the board for the game.
toDisplayString() - method in class game.Move
This method returns the string representation of this move (which is subsequently displayed in the combo box).
toString() - method in class game.Detective
This method displays the current status of the detective
toString() - method in class game.Move
This method gives a simple string representation of the objects of this class
toString() - method in class game.TestBoard
String representation of this board.
toStringTicket() - method in class game.Move
This method returns the string representation of the ticket which contained in this object.
tr(String) - static method in class i18n.I18n
tr(String,Object...) - static method in class i18n.I18n
Transport - interface game.Transport
This interface defines constants associated with the various modes of transport

U

UG - static field in class game.Transport
useBlackTicket() - method in class game.Fugitive
This is called when a black ticket is used to move the fugitive.

V

This method displays the previous positions of the detectives and Mr.