This repository has been archived by the owner on Oct 8, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: removed duplicate code from search/negamax
- Loading branch information
1 parent
e8e4910
commit bb395d7
Showing
4 changed files
with
82 additions
and
153 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,11 @@ | ||
/// Wrapper over `i32` for scoring positions | ||
pub type Score = i32; | ||
|
||
/// Largest possible score ever achievable | ||
pub const INF: Score = i16::MAX as Score; | ||
pub const INF: i32 = i16::MAX as i32; | ||
|
||
/// Score of mate in 1 move | ||
pub const MATE: Score = INF - 1; | ||
pub const MATE: i32 = INF - 1; | ||
|
||
/// Maximum depth that can be searched | ||
pub const MAX_DEPTH: u32 = 255; | ||
|
||
/// Maximum possible score for mate | ||
pub const MAX_MATE: Score = MATE - MAX_DEPTH as Score; | ||
pub const MAX_MATE: i32 = MATE - MAX_DEPTH as i32; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.