Skip to content

Cannot create castling move from string #11

@lennertcl

Description

@lennertcl

With the current implementation, I have not succeeded in generating a castling move.
O-O / O-O-O doesn't work.
e1h1 sends the king to h1 on top of the rook (the rook is removed).

Move(const std::string& move) {
this->move = (create_square(File(move[0] - 'a'), Rank(move[1] - '1')) << 6) |
	create_square(File(move[2] - 'a'), Rank(move[3] - '1'));
}

I would like to pull request with a check for O-O or O-O-O.
An update to some function to move the pieces might also be necessary.

I would also like to add a namespace (surge/nkarve_surge?), because I had a clash with some other library that also used a constant named HFILE.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions