|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectklaus.backend.NullBackend
klaus.backend.OfflinePlayingBackend
public class OfflinePlayingBackend
Nested Class Summary | |
---|---|
private class |
OfflinePlayingBackend.UpdateThread
|
Field Summary | |
---|---|
private Engine |
black
|
private long |
blackTime
|
private boolean |
gameRunning
|
private int |
increment
|
private boolean |
incremented
|
private long |
lastUpdateTime
|
protected Party |
party
|
private int |
plyPointer
The current ply number |
private int |
secondPeriod
|
private int |
secondPeriodStart
|
private boolean |
secondStarted
|
private boolean |
started
|
private int |
startingTimeInMinutes
Values for time on startup used for engine time management |
private boolean |
stopped
|
private int |
thirdPeriod
|
private int |
thirdPeriodStart
|
private boolean |
thirdStarted
|
private Engine |
white
|
private long |
whiteTime
|
Fields inherited from class klaus.backend.NullBackend |
---|
active |
Constructor Summary | |
---|---|
OfflinePlayingBackend()
|
Method Summary | |
---|---|
boolean |
addMove(Move move)
Add a certain move to the backend. |
void |
fireResultListeners(Result result)
|
void |
forceMove()
|
Engine |
getBlack()
|
long |
getBlackTime()
Gives the remaining time for black [im milliseconds] |
Party |
getParty()
|
Position |
getPosition()
|
Engine |
getWhite()
|
long |
getWhiteTime()
Gives the remaining time for white [in milliseconds] |
void |
goToFirst()
|
void |
goToLast()
|
void |
goToNext()
|
void |
goToPrevious()
|
boolean |
isEngineThinking()
|
boolean |
isGameRunning()
|
void |
setBlackEngine(Engine e)
|
void |
setGameModel(NewGameModel model)
|
void |
setWhiteEngine(Engine e)
|
void |
startCalculation()
|
void |
unload()
Unload the backend, e. g. close file/database/process connections |
private void |
updateTimes()
Update the clocks for both players. |
Methods inherited from class klaus.backend.NullBackend |
---|
addMoveListener, addResultListener, fireMoveListeners, removeMoveListener, removeResultListener, setActive, setInactive, setPosition |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private long lastUpdateTime
protected Party party
private boolean started
private boolean stopped
private Engine white
private Engine black
private long whiteTime
private long blackTime
private int startingTimeInMinutes
private boolean gameRunning
private int plyPointer
private int secondPeriodStart
private int secondPeriod
private int thirdPeriodStart
private int thirdPeriod
private int increment
private boolean secondStarted
private boolean thirdStarted
private boolean incremented
Constructor Detail |
---|
public OfflinePlayingBackend()
Method Detail |
---|
public boolean addMove(Move move)
ChessBackend
addMove
in interface ChessBackend
addMove
in class NullBackend
move
- the move that has been done by the user
public void forceMove()
public Engine getBlack()
public long getBlackTime()
ChessBackend
getBlackTime
in interface ChessBackend
getBlackTime
in class NullBackend
public Party getParty()
getParty
in interface ChessBackend
getParty
in class NullBackend
public Position getPosition()
getPosition
in interface ChessBackend
getPosition
in class NullBackend
public Engine getWhite()
public long getWhiteTime()
ChessBackend
getWhiteTime
in interface ChessBackend
getWhiteTime
in class NullBackend
public void goToFirst()
goToFirst
in interface ScrollingBackend
public void goToLast()
goToLast
in interface ScrollingBackend
public void goToNext()
goToNext
in interface ScrollingBackend
public void goToPrevious()
goToPrevious
in interface ScrollingBackend
public boolean isEngineThinking()
public void setBlackEngine(Engine e)
public void setWhiteEngine(Engine e)
public void startCalculation()
public void unload()
ChessBackend
unload
in interface ChessBackend
unload
in class NullBackend
private void updateTimes()
public void fireResultListeners(Result result)
fireResultListeners
in interface ChessBackend
fireResultListeners
in class NullBackend
public void setGameModel(NewGameModel model)
public boolean isGameRunning()
isGameRunning
in interface ChessBackend
isGameRunning
in class NullBackend
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |