Commit Graph

12 Commits

Author SHA1 Message Date
8b3202fac0 add CFLAGS -Wshadow and -funroll-loops, fix related common-test.h 2024-04-17 08:21:20 +02:00
f0acdb6a66 pos_ok(): always set BUG_ON and WARN_ON 2024-04-16 12:32:37 +02:00
660722fadc cleanup 2024-04-10 12:53:31 +02:00
f2ce20a504 add bb_pawn_attacks[][], bb_shift() 2024-04-09 08:10:53 +02:00
edcc87be5a a few more perft debug tests 2024-03-27 12:41:38 +01:00
08ba989170 is_legal: fix check+pinned and knight check; perft-test + perft2() 2024-03-26 17:43:59 +01:00
ce2e0e8459 add forgotten changes in bitboard-switch branch (git is so... difficult) 2024-03-23 17:41:15 +01:00
856e3e52da add movedo-test 2024-03-21 07:00:20 +01:00
aba0113344 add piece-test 2024-03-15 09:04:44 +01:00
6ee4cd1642 cleanup 2024-03-11 16:12: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