Commit Graph

21 Commits

Author SHA1 Message Date
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