Commit Graph

47 Commits

Author SHA1 Message Date
374116b1e7 simplify pos_set_checkers_pinners_blockers() (cont'd) 2024-04-10 15:59:24 +02:00
711306c92a simplify/improve pos_set_checkers_pinners_blockers() 2024-04-10 12:54:47 +02:00
4816b4a53a experiment: add pos_set_checkers_pinners_blockers() 2024-03-30 18:45:13 +01:00
09afd98971 fen2pos: no more pos_checkers etc... position.c: pos_check -> pos_ok (bool) 2024-03-27 12:40:16 +01:00
70d6c23c00 position add: pos_set_pinners_blockers() 2024-03-26 17:31:44 +01:00
ce2e0e8459 add forgotten changes in bitboard-switch branch (git is so... difficult) 2024-03-23 17:41:15 +01:00
51a348c1e4 add pos_cmp (as a debug check after move_{do,undo}) 2024-03-21 06:58:56 +01:00
49705bc707 rename few macros to lowercase, add M_DPUSH move flag 2024-03-19 18:30:10 +01:00
9c2e76442d add a struct_group for move_do() irreversible changes 2024-03-17 17:34:21 +01:00
c8aea61529 pos_checkers(): add occ parameter 2024-03-15 09:11:28 +01:00
cc3754ae00 add position blockers 2024-03-12 10:44:25 +01:00
b7fdcca66d pos_check(): add adjacent kings test 2024-03-11 16:11:51 +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
4d8f69e8c9 position: raw_board_print in octal, fix mask in pos_set_sq/pos_clr_sq 2024-02-22 08:35:26 +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
4f25c1416d re-organize defines / few bug fix 2024-02-10 09:16:59 +01:00
d6f2497bb0 rename typedefs - temp commit for computer change 2024-02-08 09:50:14 +01:00
1929d4bb1f bb migration: add util, update fen/fen-test + partial pos + piece 2024-02-07 22:08:24 +01:00
3798dbad4b Set back position.c file 2024-02-05 08:38:11 +01:00
5b536df4b9 Copy position.c into temp-migration-bitboard/position.c 2024-02-05 08:38:11 +01:00
48b5420830 Add check array in position structure 2023-07-25 06:54:33 +02:00
3de87daa5a bug fix in pos_dup() 2023-07-12 21:30:24 +02:00
ed9b9cc646 add nodes_count and moves_{generated,counted} in pos struct 2023-07-11 22:22:33 +02:00
65f1bef987 cleanup 2023-07-09 16:22:42 +02:00
0df87ff41c Add bestmove in pos struct, add pos_check() 2023-07-09 15:36:14 +02:00
120a459206 add pos_del function 2023-07-07 15:53:57 +02:00
183e9ef2be Improve move gen, delete ling pos, 3 steps moves generation 2023-07-07 02:21:14 +02:00
6f7a04cc89 Add move_do (dup position), remove &board in move struct 2023-07-06 12:22:26 +02:00
09ceca44e5 pos: keep possibility to have opponent moves (NULL move) 2023-06-25 16:02:23 +02:00
1154f141c9 start bitboard integration 2023-06-22 16:08:57 +02:00
05a64ec742 simplify 0x88 macros / remove redundant chessdefs.h equivalent ones 2021-11-20 16:15:45 +01:00
bf520b6c71 fuckulated movegenerator into a good coregenerator
Need to test all edge cases for new position after move (castle/en passant/promotion).
En passant crashes, likely easy fix.
castle/promotion new position untested.

Yoda: A feature branch absolutely necessary was.
Me: With that Truth I agree.
2021-11-15 19:36:19 +01:00
a28cd5c492 pod_dup(): duplicate also pieces list 2021-11-15 11:23:37 +01:00
f0e1836f2f add memstats / clear lists when new fen position 2021-11-14 16:03:36 +01:00
451afea6b5 refactor position: now contains board (not board *) 2021-11-12 20:22:20 +01:00
bd7d9f8551 add memory pool for positions 2021-11-12 18:33:39 +01:00
bd88da013c pos: added mobility. move_gen: hangle castling 2021-11-12 11:00:59 +01:00
7c98f0d4c5 piece_t change, pack piece_details, conversion piece: mask<=>number 2021-11-10 15:54:13 +01:00
d38e2f4543 Occupancy & square control bitboards + continue printf->logX 2021-11-08 08:38:38 +01:00
16c0c06095 remove piece2char/piece2string (global var instead) 2021-10-31 13:44:08 +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