Bruno BELANYI
0222ec4c2d
Add 'Color::iter'
2022-07-27 23:36:53 +02:00
Bruno BELANYI
d97e7d646e
Move 'Magic' into 'seer::movegen::magic'
2022-07-27 23:36:53 +02:00
Bruno BELANYI
7dbe48ad23
Add '# Safety' section to 'unsafe fn' doc
2022-07-25 16:42:46 +02:00
Bruno BELANYI
2eb7e4c8ef
Allow some clippy warnings
2022-07-25 16:42:46 +02:00
Bruno BELANYI
1a0aa5fddb
Remove superfluous 'format!' call
2022-07-25 16:42:46 +02:00
Bruno BELANYI
a04b1f3a42
Add magic bitboard generation
2022-07-25 16:42:46 +02:00
Bruno BELANYI
3f00c6d1fc
Make 'Magic' fields 'pub(crate)'
2022-07-25 16:42:46 +02:00
Bruno BELANYI
5bee69c38e
Add 'flake check' stage to CI
...
Now that the 'pre-commit' is in another stage, add this one back in.
2022-07-25 16:42:46 +02:00
Bruno BELANYI
ae1c3322d5
Remove 'pre-commit' check from flake
...
Since trying to run it results into a failure due to 'clippy' trying to
fetch the network inside the build sandbox, remove it from the 'checks'
for now, but do keep it around for its 'shellHook'.
2022-07-25 16:41:27 +02:00
Bruno BELANYI
c8d7c17711
Fix pre-commit check in CI
...
Now that we have actual dependencies, we need to run 'pre-commit run'
outside of the build sandbox.
2022-07-25 16:36:44 +02:00
Bruno BELANYI
7a120cee83
Add 'random' dependency
2022-07-24 16:34:12 +02:00
Bruno BELANYI
acbbfc7c8b
Add magic mask generation
2022-07-24 16:34:12 +02:00
Bruno BELANYI
6b0563b1bd
Add 'Magic' type
2022-07-24 16:34:12 +02:00
Bruno BELANYI
847e18dac1
Add naive pawn move generation
2022-07-24 16:34:12 +02:00
Bruno BELANYI
dbe3539a66
Add naive rook move generation
2022-07-22 10:37:12 +02:00
Bruno BELANYI
5101d8c285
Add naive bishop move generation
2022-07-22 10:37:12 +02:00
Bruno BELANYI
76f3c41110
Add naive knight move generation
2022-07-22 10:37:12 +02:00
Bruno BELANYI
8428ac0028
Add naive king move generation
2022-07-22 10:37:12 +02:00
Bruno BELANYI
e3ea602bb9
Remove spurious links in 'Square' documentation
2022-07-22 10:37:12 +02:00
Bruno BELANYI
8fdbdd1f61
Remove spurious links in 'Bitboard' documentation
2022-07-22 10:36:59 +02:00
Bruno BELANYI
fa68be533a
Add 'Bitboard::iter_powerset'
2022-07-22 10:36:59 +02:00
Bruno BELANYI
2b9b637ab5
Add 'Piece' enum
2022-07-22 10:36:59 +02:00
Bruno BELANYI
337b8f61f4
Add 'NUM_VARIANTS' constant to all 'board' enums
2022-07-22 10:36:59 +02:00
Bruno BELANYI
2c140d0481
Consistently use 'Self' type in 'impl' blocks
2022-07-22 10:36:59 +02:00
Bruno BELANYI
3f4c23321f
Fix typo in 'board::Color' documentation
2022-07-22 10:36:59 +02:00
Bruno BELANYI
500e6fd22f
Add 'Color::slide_board_with_blockers'
2022-07-22 10:36:59 +02:00
Bruno BELANYI
b3222276ab
Improve 'board::BitboardIterator'
...
continuous-integration/drone/push Build is passing
* Accurate 'size_hint'.
* Exact size.
* Fused iterator (keeps returning 'None' after returning 'None' once).
2022-07-18 18:21:16 +02:00
Bruno BELANYI
7c8dce8f49
Add 'Color::{forward,backward}_direction'
2022-07-18 17:37:24 +02:00
Bruno BELANYI
aa3b464bb8
Add 'CastleRights::unmoved_rooks'
continuous-integration/drone/push Build is passing
2022-07-18 13:50:23 +02:00
Bruno BELANYI
c5949fb01e
Add 'CastleRights::without_{king,queen}_side'
2022-07-18 13:38:52 +02:00
Bruno BELANYI
562182d26b
Add 'CastleRights::has_{king,queen}_side'
2022-07-18 13:28:23 +02:00
Bruno BELANYI
63c5d2dc34
Add 'CastleRights' enum
2022-07-18 13:27:03 +02:00
Bruno BELANYI
e0c667d090
Add 'Color' enum
2022-07-18 13:22:04 +02:00
Bruno BELANYI
3a6c4113fc
Rename 'board::direction{s,}'
2022-07-18 13:11:37 +02:00
Bruno BELANYI
fcf309fad4
Fix 'cargo clippy' launched by hand
...
continuous-integration/drone/push Build is passing
Mis-matching 'rustc' versions lead to errors.
2022-07-18 11:50:08 +02:00
Bruno BELANYI
66e5109157
Statically assert zero-cost invariants
...
continuous-integration/drone/push Build is passing
Since some or all of those invariants will come in handy to ensure we
use as little memory as possible, to maximize the speed of the move
generation later on.
2022-07-18 11:05:41 +02:00
Bruno BELANYI
ca4603ff02
Add 'static_assert' macro
2022-07-18 11:04:52 +02:00
Bruno BELANYI
d132e3779e
Enable 'doCheck' in nix package
2022-07-18 10:04:47 +02:00
Bruno BELANYI
74d2a2cf6a
Add 'Bitboard::{LIGHT,DARK}_SQUARES
continuous-integration/drone/push Build is passing
2022-07-18 10:01:23 +02:00
Bruno BELANYI
f1f6198e5f
Make use of 'Bitboard::is_empty'
2022-07-18 10:01:23 +02:00
Bruno BELANYI
057b383f8c
Add 'Bitboard::is_empty'
2022-07-18 00:33:24 +02:00
Bruno BELANYI
0dde0d5dbd
Add 'Direction::slide_{square,board}'
2022-07-18 00:33:24 +02:00
Bruno BELANYI
896f615bba
Add 'Bitboard::{ANTI_,}DIAGONAL'
2022-07-18 00:33:24 +02:00
Bruno BELANYI
8e92bc2370
Add 'Direction::move_square'
2022-07-18 00:33:24 +02:00
Bruno BELANYI
52d3974063
Add 'Direction::iter_{rook,bishop,royalty,knight}'
2022-07-18 00:33:24 +02:00
Bruno BELANYI
8b27d302d7
Add 'Direction::move_board'
...
Encapsulates the way to move a piece on a board, avoiding the need to
mask and shift by hand.
2022-07-18 00:33:24 +02:00
Bruno BELANYI
4e98678ccd
Add 'board::Direction' enum
2022-07-18 00:33:24 +02:00
Bruno BELANYI
e8b5c9f73c
Use 'Square::index' in 'Square::{file,rank}_index'
2022-07-18 00:33:24 +02:00
Bruno BELANYI
17b8ee5eb3
Add 'Square::index'
2022-07-18 00:33:24 +02:00
Bruno BELANYI
61e7a4e8d1
Add 'Bitboard::count'
2022-07-18 00:33:24 +02:00