|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.lang.Thread
org.xistrat.math.GoEngine
public class GoEngine
Engine provides an autoplayer engine for the XiStrat Go variant
Nested Class Summary |
---|
Nested classes/interfaces inherited from class java.lang.Thread |
---|
java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler |
Field Summary | |
---|---|
static int |
NOTHING
|
static int |
PASS
|
static int |
PUT
|
static long |
sleepT
|
int |
strength
|
Fields inherited from class java.lang.Thread |
---|
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
Constructor Summary | |
---|---|
GoEngine(F4ClientCore clientCore,
boolean verbose,
java.lang.String game,
java.lang.String alias,
int strength)
|
Method Summary | |
---|---|
void |
abort()
|
void |
buildPlayField(java.lang.String positionID)
clientCore calls this after loginAck by server does as well hashTables declaration and initialization |
void |
doMove(int from,
int to)
dummy |
void |
doPass()
|
void |
doPut(int to,
int cont)
sync representation |
void |
doRemove(int loc,
int cont)
|
void |
doUndo(int num)
|
void |
handleNewGame(boolean ok,
java.lang.String info)
methods called by F4ClientCore, implemeting ClientUI |
void |
logout()
|
void |
lose(java.lang.String winner)
|
void |
run()
for the moment we only do s.th. when it's our turn (no thinking on time of others so far ...) |
void |
setGameList(java.lang.String[] list,
java.lang.String[] position)
interface ClientUI |
void |
showErr(java.lang.String error)
|
void |
showMsg(java.lang.String info)
|
void |
waitForUserMove(boolean waitForMe)
|
void |
waitForUserRemove(boolean wait)
|
void |
waitForUserUndo(boolean undoForMe)
after victory, engine is nice and makes undo of last 2 elementar moves (plies) |
void |
win()
|
Methods inherited from class java.lang.Thread |
---|
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public final int strength
public static final int PUT
public static final int NOTHING
public static final int PASS
public static final long sleepT
Constructor Detail |
---|
public GoEngine(F4ClientCore clientCore, boolean verbose, java.lang.String game, java.lang.String alias, int strength)
strength
- number of levels the search should doMethod Detail |
---|
public void run()
run
in interface java.lang.Runnable
run
in class java.lang.Thread
public void setGameList(java.lang.String[] list, java.lang.String[] position)
setGameList
in interface ClientUI
public void handleNewGame(boolean ok, java.lang.String info)
handleNewGame
in interface ClientUI
public void showMsg(java.lang.String info)
showMsg
in interface ClientUI
public void showErr(java.lang.String error)
showErr
in interface ClientUI
public void abort()
abort
in interface ClientUI
public void logout()
logout
in interface ClientUI
public void lose(java.lang.String winner)
lose
in interface ClientUI
public void win()
win
in interface ClientUI
public void waitForUserMove(boolean waitForMe)
waitForUserMove
in interface ClientUI
public void waitForUserUndo(boolean undoForMe)
waitForUserUndo
in interface ClientUI
public void buildPlayField(java.lang.String positionID)
clientCore calls this after loginAck by server
does as well hashTables declaration and initialization
buildPlayField
in interface ClientUI
public void doMove(int from, int to)
doMove
in interface ClientUI
public void doRemove(int loc, int cont)
doRemove
in interface ClientUI
public void doPass()
doPass
in interface ClientUI
public void waitForUserRemove(boolean wait)
waitForUserRemove
in interface ClientUI
public void doPut(int to, int cont)
doPut
in interface ClientUI
public void doUndo(int num)
doUndo
in interface ClientUI
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |