Module binbo_board

Data Types

atom_color()

atom_color() = white | black

atom_piece_type()

atom_piece_type() = pawn | knight | bishop | rook | queen | king

castling_rook_squares()

castling_rook_squares() = {7, 5} | {63, 61} | {0, 3} | {56, 59}

color()

color() = 0 | 16

distance()

distance() = 0..7

empty_square()

empty_square() = 0

file()

file() = 0..7

piece()

piece() = 1 | 2 | 3 | 4 | 5 | 6 | 17 | 18 | 19 | 20 | 21 | 22

piece_type()

piece_type() = 1 | 2 | 3 | 4 | 5 | 6

rank()

rank() = 0..7

rank_number()

rank_number() = 1..8

-type rank_char() :: $1 | $2 | $3 | $4 | $5 | $6 | $7 | $8.

side_castling()

side_castling() = 1 | 2 | 4 | 8

square_index()

square_index() = 0..63

square_notation()

square_notation() = <<_:16>>

a1 .. h8

unicode_char()

unicode_char() = 9817 | 9816 | 9815 | 9814 | 9813 | 9812 | 9823 | 9822 | 9821 | 9820 | 9819 | 9818

Function Index

board_tuple/1
castling_list/0
castling_rook_squares/1
enemy_color/1
file_list/0
file_of_index/1
index_list/0
index_to_notation/1
int_move/2
int_move/3
int_move_from/1
int_move_to/1
is_valid_square_notation/1
notation_to_index/1
notation_to_index/2
pieces/0
rank_number/1
rank_of_index/1
side_list/0
sq_distance/2

Function Details

board_tuple/1

board_tuple(Value::term()) -> tuple()

castling_list/0

castling_list() -> [binbo_position:castling()]

castling_rook_squares/1

castling_rook_squares(CastlingFlag::side_castling()) -> castling_rook_squares()

enemy_color/1

enemy_color(Color::0) -> 16

enemy_color(Color::16) -> 0

file_list/0

file_list() -> [file()]

file_of_index/1

file_of_index(Idx::square_index()) -> file()

index_list/0

index_list() -> [square_index()]

index_to_notation/1

index_to_notation(Idx::square_index()) -> square_notation()

int_move/2

int_move(FromIdx::square_index(), ToIdx::square_index()) -> non_neg_integer()

int_move/3

int_move(FromIdx::square_index(), ToIdx::square_index(), PromoType::2 | 3 | 4 | 5) -> non_neg_integer()

int_move_from/1

int_move_from(Move::non_neg_integer()) -> square_index()

int_move_to/1

int_move_to(Move::non_neg_integer()) -> square_index()

is_valid_square_notation/1

is_valid_square_notation(Sq::binary()) -> boolean()

notation_to_index/1

notation_to_index(X1::square_notation()) -> square_index()

notation_to_index/2

notation_to_index(F::97..104, R::49..56) -> square_index()

pieces/0

pieces() -> [piece()]

rank_number/1

rank_number(Idx::square_index()) -> rank_number()

rank_of_index/1

rank_of_index(Idx::square_index()) -> rank()

side_list/0

side_list() -> [color()]

sq_distance/2

sq_distance(Idx1::square_index(), Idx2::square_index()) -> distance()


Generated by EDoc