Echecs.Bitboard.Precomputed (Echecs v0.1.5)

Copy Markdown View Source

Compile-time attack and geometry tables for non-sliding queries.

Knight, king and pawn attacks plus between/line masks are generated at compile time into tuples, so get_knight_attacks/1, get_king_attacks/1, get_pawn_attacks/2, get_between/2 and get_line/2 are single elem/2 lookups with zero runtime cost.

Summary

Functions

get_between(sq1, sq2)

get_king_attacks(sq)

get_knight_attacks(sq)

get_line(sq1, sq2)

get_pawn_attacks(sq, atom)

init()