mirror of
https://github.com/HChaZZY/Stockfish.git
synced 2025-12-22 01:56:58 +08:00
Cleanup and optimize Position::has_mate_threat()
There is a functional change because we now skip more moves and because do_move() / undo_move() is well known to be not reversible we end up with a change in node count, although there is actually no change but a bit speed up. Signed-off-by: Marco Costalba <mcostalba@gmail.com>
This commit is contained in:
@@ -264,8 +264,8 @@ public:
|
||||
bool is_mate() const;
|
||||
bool is_draw() const;
|
||||
|
||||
// Check if one side threatens a mate in one
|
||||
bool has_mate_threat(Color c);
|
||||
// Check if side to move could be mated in one
|
||||
bool has_mate_threat();
|
||||
|
||||
// Number of plies since the last non-reversible move
|
||||
int rule_50_counter() const;
|
||||
|
||||
Reference in New Issue
Block a user