Package-level declarations

Manages the flow of the chess game: turn management, special moves (castling, en passant), and game end conditions ( checkmate, stalemate, draw, etc.).

Types

Link copied to clipboard
data class CastlingAvailability(val kingside: Boolean, val queenside: Boolean)

Represents the castling rights for a player.

Link copied to clipboard
sealed class GameResult

Represents the result of a chess game.

Link copied to clipboard
data class GameState(val currentPlayer: PieceColor, val castlingRights: Map<PieceColor, CastlingAvailability>, val enPassantTargetSquare: Square?, val halfMoveClock: Int, val fullMoveNumber: Int)

Represents the state of a chess game at a given moment.

Link copied to clipboard
object GameUtils

Utility functions for chess game logic, including move application, check detection, attack detection, and insufficient material checks.

Link copied to clipboard
data class PgnGame(val tags: Map<String, String> = emptyMap(), val moves: List<String> = emptyList(), val result: String = "*")

Represents a chess game in PGN (Portable Game Notation) format.