34 Commits

Author SHA1 Message Date
f7a6e582ed movegen: add pos_gen_legal() to simplify code 2024-08-05 08:40:03 +02:00
7ce64c3aee rename hyperbola-quintessence files to hq 2024-07-06 19:16:47 +02:00
23051cb427 rename hyperbola functions to hq 2024-07-06 19:11:56 +02:00
902c224aa9 simplify promotion generation 2024-07-02 17:28:35 +02:00
a2451d79db finish fitting move_t in 16 bits 2024-07-01 13:56:13 +02:00
ffd5d056cc move_t flags: mask -> value, unique castling flag (1 bit saved) 2024-06-25 15:33:56 +02:00
d1cc7a8066 movegen: cleanup + change casling/king moves handling 2024-06-24 09:00:24 +02:00
dfecad9ea6 cleanup 2024-06-17 07:38:43 +02:00
ec2d2291d4 clean move_t: Remove capture/dpush/promotion flags, captured piece 2024-06-12 07:45:22 +02:00
431baa43d4 cleanup 2024-05-30 10:47:02 +02:00
ec64e2e44d replace pawn_shift_xxx with bb_pawns_attacks 2024-05-28 09:40:20 +02:00
32ade1777f ren macros mask->BIT/C64->U64, del pinners/checkers/blockers in state_s 2024-05-06 07:41:27 +02:00
2505217c70 rename pos_all_legal() to pos_legal_dup(), new pos_legal() 2024-04-17 09:13:21 +02:00
0330696f87 pseudo_is_legal(): use sq_is_attacked() instead of sq_attackers() 2024-04-13 06:52:27 +02:00
ab31274d17 movegen: add some generic fonctions 2024-04-11 10:03:35 +02:00
e78eae21e6 cleanup move_do() 2024-04-10 12:57:08 +02:00
e8240c6cab move_make_promotions(), clean move_do(), pos_gen_pseudomoves() 2024-04-09 08:15:43 +02:00
027aa2c132 bb: bb_{first_bb,next,multiple{}, chessdefs: relative sq diffs 2024-04-04 10:03:43 +02:00
65fe74c9c5 movegen: don't separate promotions, perft: loop uses next_legal() 2024-03-27 12:52:39 +01:00
09afd98971 fen2pos: no more pos_checkers etc... position.c: pos_check -> pos_ok (bool) 2024-03-27 12:40:16 +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
3a06407d5a move: exclusive M_CAPTURE / M_EN_PASSANT 2024-03-20 09:58:42 +01:00
49705bc707 rename few macros to lowercase, add M_DPUSH move flag 2024-03-19 18:30:10 +01:00
8527c3dee1 movegen: separate all captures (easier later handling) 2024-03-18 10:21:25 +01:00
748953a767 move-gen: separate pawn capture from en-passant (easier later testing) 2024-03-18 09:13:51 +01:00
49302c7a60 lowercase move flags macros 2024-03-17 17:33:48 +01:00
9d40a53aea simplify pos_next_legal() 2024-03-16 12:14:59 +01:00
260d8d34bd move.h: simplify flags. movegen.c: add pos_next_legal() 2024-03-16 10:06:55 +01:00
92dcb1e778 fix king move in pos_is_legal() 2024-03-15 09:12:42 +01:00
17d1dc52f9 movegen: pseudo_is_legal() and pos_legalmoves() 2024-03-12 10:45:20 +01:00
890cb05296 add move_make_promote_capture and move_make_capture 2024-03-11 16:10:16 +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