public class PolyglotBook extends OpeningBook
OpeningBook.SelectionModel
bookStream, path, secondaryBook
Constructor and Description |
---|
PolyglotBook(String filePath)
It instantiates a Book object on the opening book file specified by filePath; if the file cannot be accessed, an IOException is
thrown.
|
PolyglotBook(String filePath,
String secondaryBookFilePath)
It instantiates a PolyglotBook object on the opening book files specified by filePath and secondaryBookFilePath (as an alternative book
for when out of the main book); if the main opening book file cannot be accessed, an IOException is thrown, if the secondary opening
book file cannot be accessed, it is not set.
|
Modifier and Type | Method and Description |
---|---|
Move |
getMove(Position pos,
OpeningBook.SelectionModel selection)
Picks and returns an opening move for the Position0 from all the relevant entries found in the PolyGlot book based on the specified
mathematical model for selection.
|
close, getPrimaryFilePath, getSecondaryFilePath
public PolyglotBook(String filePath) throws Exception
filePath
- The path to the book.Exception
- If the book cannot be accessed.public PolyglotBook(String filePath, String secondaryBookFilePath) throws Exception
filePath
- The file path to the primary book.secondaryBookFilePath
- The file path to the secondary book.IOException
- If the books cannot be read.URISyntaxException
- If the file paths are illegal.Exception
public Move getMove(Position pos, OpeningBook.SelectionModel selection) throws Exception
OpeningBook
getMove
in class OpeningBook
pos
- The position for which an opening move is sought.selection
- The mathematical model to be applied when selecting the move.Exception
- If anything goes wrong.Copyright © 2020. All rights reserved.