Skip to content

FRC support#216

Open
Quinniboi10 wants to merge 5 commits intoaronpetko:mainfrom
Quinniboi10:frc
Open

FRC support#216
Quinniboi10 wants to merge 5 commits intoaronpetko:mainfrom
Quinniboi10:frc

Conversation

@Quinniboi10
Copy link

I lost my marbles switching to KxR encoding
Bench: 1718488

Bench: 1718488
Bench: 1718488
src/chess/fen.cc Outdated
const File file = static_cast<File>(std::tolower(ch) - 'a');
const Square kingSq = state.King(std::islower(ch) ? Color::kBlack : Color::kWhite).GetLsb();

if (std::isupper(ch))
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do something like

const Color color = std::isupper(ch);
state.castle_rights.SetCastlingRights(color, ..., Square::FromRankFile(color == Color::kWhite ? kRank1 : kRank8, file));

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

snake case please

return flags;
}

[[nodiscard]] Square CastleSq(Color turn, CastleSide side) const {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CastleSquare instead please


[[nodiscard]] U8 AsU8() const {
return rights_;
constexpr U8 blackQ = 0b1;
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

kBlackQueen,
etc..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants