Enum shakmaty::Move [−][src]
#[repr(align(4))]
pub enum Move {
Normal {
role: Role,
from: Square,
capture: Option<Role>,
to: Square,
promotion: Option<Role>,
},
EnPassant {
from: Square,
to: Square,
},
Castle {
king: Square,
rook: Square,
},
Put {
role: Role,
to: Square,
},
}
Expand description
Information about a move.
Variants
Normal
EnPassant
Castle
Put
Implementations
Gets the target square. For castling moves this is the corresponding rook square.
Checks if the move is a capture.
Checks if the move is en passant.
Checks if the move zeros the half-move clock.
Gets the castling side.
Checks if the move is a promotion.
See Uci::from_move()
.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Move
impl UnwindSafe for Move
Blanket Implementations
Mutably borrows from an owned value. Read more