Struct hexe_core::fen::Fen
[−]
[src]
pub struct Fen { pub pieces: PieceMap, pub color: Color, pub castling: Rights, pub en_passant: Option<Square>, pub halfmoves: u32, pub fullmoves: u32, }
A type that can be used to parse Forsyth–Edwards Notation (FEN).
Fields
pieces: PieceMap
The pieces on the board.
color: Color
The active color.
castling: Rights
The castling rights.
en_passant: Option<Square>
The en passant target square.
halfmoves: u32
The number of halfmoves since the last capture or pawn advance.
fullmoves: u32
The fullmove number.
Methods
impl Fen
[src]
pub const STARTING: Fen
STARTING: Fen = Fen{pieces: <PieceMap>::STANDARD, color: Color::White, castling: <Rights>::FULL, en_passant: None, halfmoves: 0, fullmoves: 1,}
FEN for the starting position. It is equivalent to:
rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1
pub const EMPTY: Fen
EMPTY: Fen = Fen{pieces: <PieceMap>::EMPTY, color: Color::White, castling: <Rights>::EMPTY, en_passant: None, halfmoves: 0, fullmoves: 1,}
FEN for the empty position. It is equivalent to:
8/8/8/8/8/8/8/8 w - - 0 1
Trait Implementations
impl Clone for Fen
[src]
fn clone(&self) -> Fen
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl PartialEq for Fen
[src]
fn eq(&self, __arg_0: &Fen) -> bool
[src]
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &Fen) -> bool
[src]
This method tests for !=
.