Skip to content
This repository has been archived by the owner on Oct 8, 2024. It is now read-only.

Commit

Permalink
Merge branch 'main' into tt-move-ordering
Browse files Browse the repository at this point in the history
  • Loading branch information
dannyhammer committed Aug 19, 2024
2 parents 8dcfbd1 + fcb8287 commit cd9236c
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions brogle_core/src/position.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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).
Expand Down

0 comments on commit cd9236c

Please sign in to comment.