public interface ControllerEngine extends UCIEngine
HASH_OPTION_NAME, OWN_BOOK_OPTION_NAME, START_POSITION, THREADS_OPTION_NAME
Modifier and Type | Method and Description |
---|---|
void |
blackForfeit()
Sets the game state to unspecified white victory.
|
String |
convertPACNToSAN(String move)
Converts a move legal in the current position from Pure Algebraic Coordinate Notation to Standard Algebraic Notation.
|
String |
convertSANToPACN(String move)
Converts a move legal in the current position from Standard Algebraic Notation to Pure Algebraic Coordinate Notation.
|
default Set<Map.Entry<String,Long>> |
divide(int depth)
Returns a set of entries with all legal moves in the current position as the key set and the perft results at depth - 1 for the
positions the respective moves lead to as the value set.
|
void |
drawByAgreement()
Sets the game state to draw by agreement from both parties.
|
GameState |
getGameState()
Returns the current game state as labelled by
GameState . |
List<String> |
getLegalMoves()
Returns a list of all legal moves in the current position in Pure Algebraic Coordinate Notation.
|
List<String> |
getMoveHistory()
Returns a list of all past moves made on the board in Pure Algebraic Coordinate Notation in chronological order.
|
String |
getStartPosition()
Returns the starting position of the current game in Forsyth-Edwards Notation.
|
boolean |
isQuiet()
Determines whether the current position is quiet, i.e.
|
boolean |
isWhitesTurn()
Returns whether it's white's turn.
|
default long |
perft(int depth)
Runs a perft to the specified depth in the current position and returns the number of leaf nodes counted while traversing the tree.
|
void |
setControllerMode(boolean on)
Sets whether the engine should run in controller mode.
|
void |
setEvent(String event)
Sets the event at which the game is taking place.
|
boolean |
setGame(String pgn)
Parses the Portable Game Notation string and sets its internal data structure tracking the state of the game accordingly.
|
void |
setPlayers(String whitePlayer,
String blackPlayer)
Sets the names of the players.
|
void |
setSite(String site)
Sets the site where the game is taking place.
|
String |
toFEN()
Returns a Forsyth-Edwards Notation string representing the current position.
|
String |
toPGN()
Returns a Portable Game Notation string representing the state of the game.
|
default String |
unplayLastMove()
Takes back the last move and returns it in Pure Algebraic Coordinate Notation.
|
void |
whiteForfeit()
Sets the game state to unspecified black victory.
|
close, getAuthor, getDebugInfo, getHashLoadPermill, getName, getOptions, getSearchInfo, init, isInit, newGame, play, ponderHit, quit, search, setDebugMode, setHashSizeOption, setOption, setOption, setOwnBookOption, setPosition, setPosition, setThreadsOption, stop
boolean isWhitesTurn()
String getStartPosition()
GameState getGameState()
GameState
.List<String> getMoveHistory()
List<String> getLegalMoves()
boolean isQuiet()
boolean setGame(String pgn)
pgn
- A PGN string representation of a chess game.void setPlayers(String whitePlayer, String blackPlayer)
whitePlayer
- The name of the white player.blackPlayer
- The name of the black player.void setEvent(String event)
event
- The event at which the game is taking place.void setSite(String site)
site
- The site where the game is taking place.void setControllerMode(boolean on)
on
- Whether the engine should run in controller mode.void drawByAgreement()
void whiteForfeit()
void blackForfeit()
String convertPACNToSAN(String move)
move
- The move in PACN.String convertSANToPACN(String move)
move
- The move in SAN.String toFEN()
String toPGN()
default String unplayLastMove()
default long perft(int depth)
depth
- The depth at which the leaf nodes are to be counted.default Set<Map.Entry<String,Long>> divide(int depth)
depth
- The perft depth. Perft to a depth of this minus one will be executed for each legal move from the current position.Copyright © 2020. All rights reserved.