Class Evaluator
java.lang.Object
|
+----java.awt.Component
|
+----java.awt.Container
|
+----java.awt.Panel
|
+----java.applet.Applet
|
+----Evaluator
-
public class Evaluator
-
extends Applet
-
bishopB
-
bishopW
-
board
-
kingB
-
kingW
-
knightB
-
knightW
-
pawnB
-
pawnW
-
queenB
-
queenW
-
rookB
-
rookW
-
Evaluator()
-
init()
-
Initializes the applet
-
mouseDown(Event,
int, int)
-
Draws the board and displays messages.
-
paint(Graphics)
-
Draws the board and displays messages.
-
SetCheckMessage(boolean)
-
SetEvalMsg(int)
-
SetMaterialMsg(int,
int)
-
SetMoveMessage(boolean)
-
SetPositionMsg(int,
int)
board
public static Image board
pawnB
public static Image pawnB
rookB
public static Image rookB
knightB
public static Image knightB
bishopB
public static Image bishopB
queenB
public static Image queenB
kingB
public static Image kingB
pawnW
public static Image pawnW
rookW
public static Image rookW
knightW
public static Image knightW
bishopW
public static Image bishopW
queenW
public static Image queenW
kingW
public static Image kingW
Evaluator
public Evaluator()
SetMaterialMsg
public void SetMaterialMsg(int bnumber,
int wnumber)
-
Parameters:
-
bnumber - black's material score
-
wnumber - white's material score
SetPositionMsg
public void SetPositionMsg(int bnumber,
int wnumber)
-
Parameters:
-
bnumber - black's position score
-
wnumber - white's position score
SetEvalMsg
public void SetEvalMsg(int number)
-
Parameters:
-
number - the number to go into the message
SetMoveMessage
public void SetMoveMessage(boolean TheMoveColor)
-
Parameters:
-
TheMoveColor - the color of the next move
SetCheckMessage
public void SetCheckMessage(boolean TheMoveColor)
-
Parameters:
-
TheMoveColor - the color of the next move
init
public void init()
-
Initializes the applet
-
Overrides:
-
init in class Applet
paint
public void paint(Graphics g)
-
Draws the board and displays messages.
-
Parameters:
-
g - a graphics object
-
Overrides:
-
paint in
class Container
mouseDown
public boolean mouseDown(Event e,
int x,
int y)
-
Draws the board and displays messages.
-
Parameters:
-
e - an event object
-
x - x-coordinate of click
-
y - y-coordinate of click
-
Returns:
-
True if click successful
-
Overrides:
-
mouseDown
in class Component
|