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) -> Int
pub fn get_all_positions(
  board: BoardBB,
) -> Result(List(Position), a)
pub fn get_piece_at_position(
  board: BoardBB,
  position: Position,
) -> Option(Piece)
pub fn get_positions(
  bitboard: Int,
) -> Result(List(Position), String)
pub fn get_positions_inner(
  bitboard: Int,
  count: Int,
) -> Result(List(Position), String)
pub fn remove_piece_at_position(
  board: BoardBB,
  position: Position,
) -> Result(BoardBB, String)
pub fn set_piece_at_position(
  board: BoardBB,
  position: Position,
  piece: Piece,
) -> BoardBB
Search Document