Package-level declarations
Types
Represents a single player's move on the board. It does not store information about the origin position, as its primary purpose is move representation. Its string representation is the full algebraic notation of the move as used in the UCI protocol (e.g., "e2e4", "a7a8q"). It is immutable.
Exception thrown when inconsistencies occur in functionalities related to move validation or generation logic.
Properties
The square exposed to an en passant capture, if one exists. Returns null if no en passant capture is possible in the current position.
The side (Side.WHITE or Side.BLACK) whose turn it is to move.
Functions
Creates a new Game instance configured for analysis. Uses Game.GameMode.ANALYSIS with Game.ThreeRepetitionsMode.AWARE and Game.FiftyMovesRuleMode.AWARE, making the game fully mutable.
Creates a new Game instance with fully customizable parameters. Allows setting the game mode, rule enforcement, initial FEN, and PGN tags.
Deletes all moves that preceded the provided node in the main line. The node (and its position) becomes the new effective start of the game, creating a new RootNode.
Deletes all moves (the main line continuation and any variations) that follow the provided node. The node provided remains in the game.
Deletes the provided node and all subsequent moves/variations in its subtree. The move represented by the node is effectively removed from the game.
Returns true if the evaluated Move is legal in the current position, and false otherwise.
Returns true if the move specified in the given notation is legal in the current position. If no notation is specified, Notation.UCI is assumed.
Retrieves the new Position that results from executing the provided legal Move. Throws a MoveException if the provided move is not legal in the current position.
Retrieves the new Position that results from executing the move specified in the given notation. Throws a MoveException if the move is not legal. If no notation is provided, Notation.UCI is assumed.
Creates a Move object from its UCI notation string (e.g., "e7e8q").
Creates a Move object from the specified origin and target squares (using Int as the squares types).
Creates a Move object from the origin square, target square, and the promotion piece, using Square and Piece enum constants.
Creates a Move object from the specified origin and target squares (using Int as the squares types) and the promotion piece.
Parses a string containing one or more games in Portable Game Notation (PGN) format. Games are returned in Game.GameMode.ANALYSIS mode, making them mutable for subsequent use.
Creates a new Game instance configured for strict competitive match play. Uses Game.GameMode.MATCH with strict enforcement for the three-fold repetition and 50-move rules.