File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ pub struct HistoryTable {
1111}
1212
1313/// Safe calculation of the bonus applied to quiet moves that are inserted into the history table.
14- /// This uses `wrapping_mul ` and `wrapping_sub` to safely calculate the value.
14+ /// This uses `wrappinag_mul ` and `wrapping_sub` to safely calculate the value.
1515///
1616/// # Arguments
1717///
@@ -22,8 +22,8 @@ pub struct HistoryTable {
2222/// The calculated history score.
2323pub ( crate ) fn calculate_bonus_for_depth ( depth : i16 ) -> i16 {
2424 depth
25- . wrapping_mul ( Score :: HISTORY_MULT )
26- . wrapping_sub ( Score :: HISTORY_OFFSET )
25+ . saturating_mul ( Score :: HISTORY_MULT )
26+ . saturating_sub ( Score :: HISTORY_OFFSET )
2727}
2828
2929impl HistoryTable {
@@ -122,3 +122,4 @@ mod tests {
122122 }
123123 }
124124}
125+
You can’t perform that action at this time.
0 commit comments