board

Types

pub type BoardBB {
  BoardBB(
    black_king_bitboard: bitboard.Bitboard,
    black_queen_bitboard: bitboard.Bitboard,
    black_rook_bitboard: bitboard.Bitboard,
    black_bishop_bitboard: bitboard.Bitboard,
    black_knight_bitboard: bitboard.Bitboard,
    black_pawns_bitboard: bitboard.Bitboard,
    white_king_bitboard: bitboard.Bitboard,
    white_queen_bitboard: bitboard.Bitboard,
    white_rook_bitboard: bitboard.Bitboard,
    white_bishop_bitboard: bitboard.Bitboard,
    white_knight_bitboard: bitboard.Bitboard,
    white_pawns_bitboard: bitboard.Bitboard,
  )
}

Constructors

  • BoardBB(
      black_king_bitboard: bitboard.Bitboard,
      black_queen_bitboard: bitboard.Bitboard,
      black_rook_bitboard: bitboard.Bitboard,
      black_bishop_bitboard: bitboard.Bitboard,
      black_knight_bitboard: bitboard.Bitboard,
      black_pawns_bitboard: bitboard.Bitboard,
      white_king_bitboard: bitboard.Bitboard,
      white_queen_bitboard: bitboard.Bitboard,
      white_rook_bitboard: bitboard.Bitboard,
      white_bishop_bitboard: bitboard.Bitboard,
      white_knight_bitboard: bitboard.Bitboard,
      white_pawns_bitboard: bitboard.Bitboard,
    )

Functions

pub fn from_position(position: Position) -> Bitboard
pub fn get_piece_at_position(
  board: BoardBB,
  position: Position,
) -> Option(Piece)
pub fn get_positions(bitboard: Bitboard) -> List(Position)
pub fn get_positions_inner(
  bitboard: Bitboard,
  count: Int,
) -> List(Position)
pub fn remove_piece_at_position(
  board: BoardBB,
  position: Position,
) -> Option(BoardBB)
pub fn set_piece_at_position(
  board: BoardBB,
  position: Position,
  piece: Piece,
) -> BoardBB
Search Document