Class OpeningBook

java.lang.Object
io.github.colonelparrot.jchessify.OpeningBook

public class OpeningBook extends Object
Top-level API for reading from the opening book
Lines beginning with '#' are regarded as comments
Each entry must be on a new line, moves in SAN format seperated by space

See the default opening book as an example
Version:
1.0.0
  • Constructor Details

    • OpeningBook

      public OpeningBook(String path)
      Creates the opening book
      Parameters:
      path - path of the opening book
  • Method Details

    • close

      public void close()
      free the resources used
    • findNextMove

      public String findNextMove(String san)
      Finds the next best move, according to the opening book
      Parameters:
      san - the SAN representation of the game
      Returns:
      a String containing the SAN move, or null if no move was found