[moves] Implement From<GeneratedMove> for Move
For easy conversion of a GeneratedMove to a Move.
This commit is contained in:
parent
8f42a4c94e
commit
f8a3d5831e
1 changed files with 6 additions and 0 deletions
|
@ -36,6 +36,12 @@ impl std::fmt::Display for GeneratedMove {
|
|||
}
|
||||
}
|
||||
|
||||
impl From<GeneratedMove> for Move {
|
||||
fn from(value: GeneratedMove) -> Self {
|
||||
value.ply
|
||||
}
|
||||
}
|
||||
|
||||
impl From<Move> for GeneratedMove {
|
||||
fn from(value: Move) -> Self {
|
||||
GeneratedMove { ply: value }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue