|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.ObjectTTTengine
public class TTTengine
Main class file for the TTT ENGINE
| Field Summary | |
|---|---|
private boolean |
automode
status of the program: auto or interactive |
private java.lang.Thread |
ccpThread
The thread listening for message from the ccp |
private boolean |
done
status of the setup |
private LearningAlgorithm[] |
opponents
the array of learning algorithms |
private static TTTpanel |
panel
the TTT panel object |
private LearningAlgorithm |
robixInterface
the robix interface module and its data |
private javaClient.ccpClientPrimitive |
tttEngine
the CCP client object |
private static TTTgui |
tttGUI
the TTT GUI object |
private LearningAlgorithm |
visionSystem
the TTT vision system and its data |
| Constructor Summary | |
|---|---|
TTTengine()
Creates a ccpClientPrimitive object and initializes booleans to false at the start |
|
| Method Summary | |
|---|---|
boolean |
determineAutoMode(java.lang.String mode)
Determine which mode was selected |
void |
exitAutoMode()
Closes the auto mode modules AND closes the opponents, then exits the program. |
void |
exitOpponents()
Loops through the array of opponents and exits the process for each one |
java.lang.Thread |
getCCPThread()
Gets the CCP message listener thread object |
javaClient.ccpClientPrimitive |
getClient()
Get the CCP client |
TTTgui |
getGUI()
Get the TTT GUI |
int |
getLAIndex(java.lang.String name,
java.lang.String type)
Get the index of the LA in the array from its name |
java.lang.String |
getLAName(int index)
Get the LA's name from the index |
LearningAlgorithm[] |
getOpponents()
Get the array of LA's |
TTTpanel |
getPanel()
Get the TTT panel |
LearningAlgorithm |
getRobixInterface()
Get the Robix Interface object |
LearningAlgorithm |
getVisionSystem()
Get the Vision System object |
boolean |
isAutoMode()
Get if auto mode or not |
boolean |
launchAutoMode()
Launches the modules that the auto mode requires: vision system and robix interface. |
void |
launchOpponents()
Launches every LA in the array and starts an output reader thread for each process to show the output of each LA |
static void |
main(java.lang.String[] args)
Calls the major functions of the program |
void |
readOpponents()
Reads in the opponents file and creates an array of LA objects and output readers |
boolean |
setup()
Sets up the engine |
private void |
waitForOpponent()
Waits for at least one opponent to become alert. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private LearningAlgorithm[] opponents
private LearningAlgorithm visionSystem
private LearningAlgorithm robixInterface
private javaClient.ccpClientPrimitive tttEngine
private static TTTgui tttGUI
private static TTTpanel panel
private boolean done
private boolean automode
private java.lang.Thread ccpThread
| Constructor Detail |
|---|
public TTTengine()
| Method Detail |
|---|
public static void main(java.lang.String[] args)
args - - args[0] is "-interactive" for interactive mode
or "-auto" for automatic modepublic boolean setup()
public void readOpponents()
public void launchOpponents()
private void waitForOpponent()
public boolean launchAutoMode()
public void exitOpponents()
public void exitAutoMode()
public boolean determineAutoMode(java.lang.String mode)
mode - - the mode selected in string form
public int getLAIndex(java.lang.String name,
java.lang.String type)
name - - name of the LA(ID for auto,
Display for interactive)type - - the type of name: "ID" or "NAME"
public java.lang.String getLAName(int index)
index - - the index in the array of LA's
public LearningAlgorithm[] getOpponents()
public javaClient.ccpClientPrimitive getClient()
public TTTgui getGUI()
public TTTpanel getPanel()
public boolean isAutoMode()
public LearningAlgorithm getVisionSystem()
public LearningAlgorithm getRobixInterface()
public java.lang.Thread getCCPThread()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||