Skip to content

chessmaker.chess.piece_utils

[view_source]

is_in_board

def is_in_board(board: Board, position: Position) -> bool

[view_source]

iterate_until_blocked

def iterate_until_blocked(piece: Piece, direction: tuple[int, int]) -> Iterable[Position]

[view_source]

get_diagonals_until_blocked

def get_diagonals_until_blocked(piece: Piece) -> Iterable[Position]

[view_source]

get_horizontal_until_blocked

def get_horizontal_until_blocked(piece: Piece) -> Iterable[Position]

[view_source]

get_vertical_until_blocked

def get_vertical_until_blocked(piece: Piece) -> Iterable[Position]

[view_source]

get_straight_until_blocked

def get_straight_until_blocked(piece: Piece) -> Iterable[Position]

[view_source]

filter_uncapturable_positions

def filter_uncapturable_positions(piece: Piece, positions: Iterable[Position]) -> Iterable[Position]

[view_source]

positions_to_move_options

def positions_to_move_options(board: Board, positions: Iterable[Position]) -> Iterable[MoveOption]

[view_source]