Skip to content

FRC support#216

Open
Quinniboi10 wants to merge 5 commits into
aronpetko:mainfrom
Quinniboi10:frc
Open

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

Conversation

@Quinniboi10

Copy link
Copy Markdown

I lost my marbles switching to KxR encoding
Bench: 1718488

Bench: 1718488
Bench: 1718488
Comment thread 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
Copy Markdown
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
Copy Markdown
Owner

Choose a reason for hiding this comment

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

snake case please

Comment thread src/chess/fen.cc Outdated
Comment thread src/chess/move.cc
Comment thread src/chess/board.h Outdated
return flags;
}

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

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

CastleSquare instead please

Comment thread src/chess/board.h Outdated

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

Copy link
Copy Markdown
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