pub enum Setup {
Normal,
Custom(&'static str),
}Expand description
Chessboard setup
Variants§
Normal
Default board setup
Custom(&'static str)
Custom setup (experimental usage)
Note: Castling turns are not possible in custom setups
Format for the custom setup is:
(`Square`,`Player`,`Piece` )+
Square- Must be specified with lowercase letters: e.g.
a1
- Must be specified with lowercase letters: e.g.
Playerwfor Whitebfor Black
PieceP: PawnR: RookB: BishopN: KnightQ: QueenK: King - Note: game always must have two kings
Below is an example of how default chess setup looks like:
let default_setup =
"a1,w,R b1,w,N c1,w,B d1,w,Q e1,w,K f1,w,B g1,w,N h1,w,R \
a2,w,P b2,w,P c2,w,P d2,w,P e2,w,P f2,w,P g2,w,P h2,w,P \
a7,b,P b7,b,P c7,b,P d7,b,P e7,b,P f7,b,P g7,b,P h7,b,P \
a8,b,R b8,b,N c8,b,B d8,b,Q e8,b,K f8,b,B g8,b,N h8,b,R";Trait Implementations§
Auto Trait Implementations§
impl Freeze for Setup
impl RefUnwindSafe for Setup
impl Send for Setup
impl Sync for Setup
impl Unpin for Setup
impl UnwindSafe for Setup
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more