Echecs.Bitboard (Echecs v0.1.5)

Copy Markdown View Source

Legacy struct-based bitboard container, superseded by the Echecs.Board tuple representation used throughout the engine.

Kept for compatibility; new code should use the tuple board API.

Summary

Functions

Returns the bitboard for a specific piece type and color

Returns true if bit at index is set

Prints the bitboard for debugging

Updates the aggregate bitboards (white_pieces, black_pieces, all_pieces)

Types

t()

@type t() :: %Echecs.Bitboard{
  all_pieces: term(),
  black_bishops: term(),
  black_king: term(),
  black_knights: term(),
  black_pawns: term(),
  black_pieces: term(),
  black_queens: term(),
  black_rooks: term(),
  white_bishops: term(),
  white_king: term(),
  white_knights: term(),
  white_pawns: term(),
  white_pieces: term(),
  white_queens: term(),
  white_rooks: term()
}

Functions

get_piece_bb(bb, atom1, atom2)

Returns the bitboard for a specific piece type and color

new()

occupied?(bb, index)

Returns true if bit at index is set

print(bb)

Prints the bitboard for debugging

update_aggregates(bb)

Updates the aggregate bitboards (white_pieces, black_pieces, all_pieces)