Commit Graph

28 Commits

Author SHA1 Message Date
91abc3e26d convert piece_t, square_t etc. to u8 (no more typed enum. See C23 ?). 2024-07-03 08:49:54 +02:00
da489bad65 update include syntax 2024-06-25 13:07:33 +02:00
d81dca6e23 add sq_line array, bb_sq_aligned3, renamed sq_manh to sq_taxi 2024-03-11 16:04:45 +01:00
87e7695873 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
2024-03-10 10:58:14 +01:00
b351d198b8 sq_attackers() + others (see dedails). Ready for move do/undo ?
- add many "const" in func parameters
- attack.c: sq_attackers()
- move print_board_raw from position.c to to board.c
- move some fen_check() tests to pos_check()
- add REL_RANK() macro. TODO: add one more for bitboards
- fen.c: more tests for FEN validity
- position.c: add pos_checkers() and pos_check()
- tests: add common-test.h (for shared FEN positions access)
2024-03-04 21:34:29 +01:00
a499893f32 add board_print, board_print_mask 2024-03-02 07:10:23 +01:00
8f0840fc2f add functions documentation - should be done earlier !! 2024-02-29 09:31:00 +01:00
d00eab54e7 board.h: fix sq_make/sq_file 2024-02-22 09:13:12 +01:00
568b39e366 add movegen draft, add king square in pos_t, BRQKN move gen (untested) 2024-02-20 21:00:45 +01:00
403e625cbe add hyperbola-quintessence.[ch]}, rank move gen, + file/rook/queen 2024-02-15 10:15:13 +01:00
3e828ed29b add bitboard_print_multi(), file/rank/diag/antidiag masks generation 2024-02-12 21:34:42 +01:00
d5906b1fb9 start bitboard init (see commit details)
- bitboard.c: make attacks for knight/king
- square macros (BB, BBfile, BBrank) renamed sq_make, sq_file,
  sq_rank, moved to board.h (and become temporarily inline funcs)
- different macros/defs moved to "correct place" (bitboard/board/piece):
  board.[ch]: everything related to board/square
  bitboard.[ch]: everything related to bitboards
  piece.[ch]: everything related to pieces
2024-02-11 20:47:09 +01:00
1929d4bb1f bb migration: add util, update fen/fen-test + partial pos + piece 2024-02-07 22:08:24 +01:00
7b18c11cd4 Set back board.h file 2024-02-05 08:38:09 +01:00
15b004651f Copy board.h into temp-migration-bitboard/board.h 2024-02-05 08:38:09 +01:00
c7e2aec77c Move bitboards constants to bitboard.h 2023-07-13 09:48:16 +02:00
cb94ca52b9 rename to brchess 2023-06-22 16:07:16 +02:00
05a64ec742 simplify 0x88 macros / remove redundant chessdefs.h equivalent ones 2021-11-20 16:15:45 +01:00
a28cd5c492 pod_dup(): duplicate also pieces list 2021-11-15 11:23:37 +01:00
451afea6b5 refactor position: now contains board (not board *) 2021-11-12 20:22:20 +01:00
4365838276 simplify bitboard macros & move_gen use bitboard for occupied square 2021-11-12 12:28:44 +01:00
28164beb37 board.h: add square defs for both 0x88 & bitboards 2021-11-12 10:57:47 +01:00
d38e2f4543 Occupancy & square control bitboards + continue printf->logX 2021-11-08 08:38:38 +01:00
c7faa88bfa structures forward declarations 2021-11-04 13:06:24 +01:00
2f701c4bd5 pseudo-moves for pieces (not pawns nor special moves) 2021-10-31 12:16:11 +01:00
4bba067cd6 Add player's pieces list management + change board def. 2021-10-30 22:03:17 +02:00
7bdc428485 add license information & rename typedefs 2021-10-29 09:00:10 +02:00
264459dc0f initial files 2021-10-27 16:09:56 +02:00