From fcb8287e03f7069c36c4428e657c0f14aa368e34 Mon Sep 17 00:00:00 2001 From: "Danny (craptop)" Date: Mon, 19 Aug 2024 06:12:53 -0600 Subject: [PATCH] fix: fixed draw by 50 --- brogle_core/src/position.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/brogle_core/src/position.rs b/brogle_core/src/position.rs index 836f93f..8d2c0a9 100644 --- a/brogle_core/src/position.rs +++ b/brogle_core/src/position.rs @@ -413,9 +413,11 @@ impl Position { &self.key } - /// Returns `true` if the half-move counter is 50 or greater. + /// Returns `true` if the half-move counter is 100 or greater. + /// + /// Since "half-move" increases with ply, the 50-move rule takes effect at 100 ply. pub const fn can_draw_by_fifty(&self) -> bool { - self.halfmove() >= 50 + self.halfmove() >= 100 } /// Toggles the current player from White to Black (or vice versa).