Commit graph

35 commits

Author SHA1 Message Date
Bruno BELANYI 500e6fd22f Add 'Color::slide_board_with_blockers' 2022-07-22 10:36:59 +02:00
Bruno BELANYI b3222276ab Improve 'board::BitboardIterator'
All checks were successful
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'
All checks were successful
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 66e5109157 Statically assert zero-cost invariants
All checks were successful
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 74d2a2cf6a Add 'Bitboard::{LIGHT,DARK}_SQUARES
All checks were successful
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
Bruno BELANYI db0a7e9f60 Add 'Rank::{up,down}' 2022-07-17 21:26:03 +02:00
Bruno BELANYI 63228c2d9e Add 'File::{left,right}' 2022-07-17 21:26:03 +02:00
Bruno BELANYI 87473908cf Add 'Square' constructor from 'File', 'Rank' 2022-07-17 21:26:03 +02:00
Bruno BELANYI 77b15edc36 Don't return 'Bitboard' from 'Square::{file,rank}' 2022-07-17 21:26:03 +02:00
Bruno BELANYI bb04368f41 Add 'File' enum 2022-07-16 14:41:07 +02:00
Bruno BELANYI 4eff49f367 Add 'Rank' enum 2022-07-16 14:41:07 +02:00
Bruno BELANYI 41903be143 Introduce 'Bitboard::ALL' 2022-07-16 14:41:07 +02:00
Bruno BELANYI 3c157efe84 Add bitboard iteration
Introduce 'BitboardIterator', use it to implement 'IntoIterator' for
'Bitboard'.
2022-07-16 14:41:07 +02:00
Bruno BELANYI 4bc597439e Move 'board::bitboard' into folder module
I will be adding a 'BitboardIterator' type, and it makes more sense to
use a folder for this module at this point.
2022-07-16 14:41:07 +02:00
Bruno BELANYI 755e891b17 Add 'Bitboard' and 'Square' definitions 2022-07-16 14:41:07 +02:00
Bruno BELANYI 2c36ee266d Move binary crate into 'bin' folder 2022-07-15 21:32:39 +02:00
Bruno BELANYI 2ad2927b14 Bootstrap build system 2022-07-15 19:56:01 +02:00