mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 01:37:36 +00:00
LibChess: Forbid King moving into check by a pawn on the home rank
A player can no longer move the King piece into any position on their home rank if the move would place the King in check. A player can also no longer ignore a check position when in check by a pawn on their home rank. The player must now resolve the check during their move.
This commit is contained in:
parent
6365b44773
commit
d4c34d50c9
2 changed files with 60 additions and 25 deletions
|
@ -159,6 +159,7 @@ public:
|
|||
|
||||
private:
|
||||
bool is_legal_no_check(const Move&, Colour colour) const;
|
||||
bool is_legal_promotion(const Move&, Colour colour) const;
|
||||
bool apply_illegal_move(const Move&, Colour colour);
|
||||
|
||||
Piece m_board[8][8];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue