Add half-move clock validation
This commit is contained in:
parent
2853cec7c9
commit
ef3a1e4695
2 changed files with 20 additions and 0 deletions
|
|
@ -21,6 +21,8 @@ pub enum InvalidError {
|
|||
OverlappingColors,
|
||||
/// The pre-computed combined occupancy boards does not match the other boards.
|
||||
ErroneousCombinedOccupancy,
|
||||
/// Half-move clock is higher than total number of plies.
|
||||
HalfMoveClockTooHigh,
|
||||
}
|
||||
|
||||
impl std::fmt::Display for InvalidError {
|
||||
|
|
@ -42,6 +44,7 @@ impl std::fmt::Display for InvalidError {
|
|||
Self::ErroneousCombinedOccupancy => {
|
||||
"The pre-computed combined occupancy boards does not match the other boards."
|
||||
}
|
||||
Self::HalfMoveClockTooHigh => "Half-move clock is higher than total number of plies.",
|
||||
};
|
||||
write!(f, "{}", error_msg)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue