new pos/bb funcs, legal(), better castling gen, etc. [see commit details]
- new sq_pinners
- new pseudo_is_legal() (unfinished)
- improve castling pseudo move gen
- more position and lower level bitboard helper funcs:
- pos_{_occ,between_occ,between_count,pinners}
- bb_{rank,file,rel_rank,_sq_aligned,_sq_between)
- rename some bitboard globals
- replace bb ranks/files enums with defines (issue with clang)
-> Need to find a way to use enum safely
- tests:
- add common-test.h
- new attack-test.c
This commit is contained in:
@@ -132,17 +132,17 @@ static bitboard_t hyperbola_moves(const bitboard_t pieces, const square_t sq,
|
||||
|
||||
static bitboard_t hyperbola_file_moves(bitboard_t occ, square_t sq)
|
||||
{
|
||||
return hyperbola_moves(occ, sq, bb_file[sq]);
|
||||
return hyperbola_moves(occ, sq, bb_sqfile[sq]);
|
||||
}
|
||||
|
||||
static bitboard_t hyperbola_diag_moves(bitboard_t occ, square_t sq)
|
||||
{
|
||||
return hyperbola_moves(occ, sq, bb_diag[sq]);
|
||||
return hyperbola_moves(occ, sq, bb_sqdiag[sq]);
|
||||
}
|
||||
|
||||
static bitboard_t hyperbola_anti_moves(bitboard_t occ, square_t sq)
|
||||
{
|
||||
return hyperbola_moves(occ, sq, bb_anti[sq]);
|
||||
return hyperbola_moves(occ, sq, bb_sqanti[sq]);
|
||||
}
|
||||
|
||||
bitboard_t hyperbola_bishop_moves(bitboard_t occ, square_t sq)
|
||||
|
||||
Reference in New Issue
Block a user