Package-level declarations
This is the main package, bringing together all the core features for working with chess games. Here you’ll find the primary classes for setting up and managing a chess game.
Types
Link copied to clipboard
class ChessGame(board: Board = Board.Companion.initialBoard(), gameState: GameState = GameState.Companion.newGame(), moveHistory: MutableList<Move> = mutableListOf(), currentMoveIndex: Int = -1, positionHistory: MutableList<String> = mutableListOf())
The ChessGame class represents a complete chess game, managing the board state, move history, and game logic. It provides methods for making moves, undoing/redoing moves, loading/saving positions in FEN/PGN formats, and querying the game's status. This class encapsulates the rules and mechanics of chess, ensuring valid gameplay and tracking the progression of the game.