Commit Graph

44 Commits

Author SHA1 Message Date
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
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
dc6ceb3407 Makefile cleanup 2024-02-29 10:05:44 +01:00
a8e3ec70f8 add square attackers fct 2024-02-29 09:18:19 +01:00
e50d9a73e6 Makefile: cleanup 2024-02-26 19:11:46 +01:00
ccc0dfd2f6 temp commit for machine transfer 2024-02-22 09:37:02 +01:00
568b39e366 add movegen draft, add king square in pos_t, BRQKN move gen (untested) 2024-02-20 21:00:45 +01:00
bc28a900be update brlib 2024-02-15 10:14:17 +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
1929d4bb1f bb migration: add util, update fen/fen-test + partial pos + piece 2024-02-07 22:08:24 +01:00
033d95ce26 Makefile: delegate some brlib targets to submodule Makefile 2024-02-05 07:55:37 +01:00
1aa419392e adapt to brlib 0.3 2024-01-06 19:54:22 +01:00
558be57c58 update Makefile for brlib, bit_for_each new API 2024-01-01 09:56:09 +01:00
ab629fdfa0 adapt Makefile/env.sh to new brlib tree 2023-12-29 17:49:17 +01:00
cb9c81e8f9 edit env.sh 2023-12-29 08:31:30 +01:00
072f3ced9b Makefile/.gitignore: cleanup (cont.) 2023-12-15 09:17:12 +01:00
e2d32a7300 Makefile: Hure rewriting/simplification (!) 2023-12-13 21:31:01 +01:00
be790056f6 Makefile: fix/simplify binaries generation 2023-12-11 15:02:31 +01:00
f2d4f07069 valgrind: ignore libreadline errors 2023-07-14 08:35:47 +02:00
b1e6461f6f Add DEBUG_DEBUG_C 2023-07-10 13:10:53 +02:00
7952a34c88 Add pos negamax function 2023-07-07 15:53:26 +02:00
a08b006b98 Add pre-processor and assembly generation 2023-07-06 12:19:00 +02:00
fe5b21aad9 add CPPFLAGS in bin compile 2023-07-01 20:55:05 +02:00
bab3ea95b9 Makefile: cleanup, separate sections, better bin gen, add ccls/valgrind 2023-06-29 09:48:55 +02:00
9b25a6ba8c Makefile deps improved, improve Emacs dir locals. 2023-06-24 12:14:02 +02:00
cb94ca52b9 rename to brchess 2023-06-22 16:07:16 +02:00
5bf5d6bae9 bodichess main loop (move gen/eval/fen init/print pos/print moves) 2021-11-14 11:35:03 +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
7c98f0d4c5 piece_t change, pack piece_details, conversion piece: mask<=>number 2021-11-10 15:54:13 +01:00
5623dc78a5 dummy eval func (pieces + square control), bit ops, shorter int types 2021-11-09 20:57:18 +01:00
d38e2f4543 Occupancy & square control bitboards + continue printf->logX 2021-11-08 08:38:38 +01:00
0e117bc2f9 move from printf to logX() - unfinished. 2021-11-03 12:39:23 +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
f3124e728b pool.c: remove pool (list_head) offset, std: c99 -> gnu99 2021-10-30 11:42:01 +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