Struct chessground::Pos
[−]
pub struct Pos { /* fields omitted */ }
A position configuration.
- Piece positions
- Legal move hints
- Check hint
- Last move hint
Methods
impl Pos
[src]
fn new<P: Position>(p: &P) -> Pos
Create a new position configuration.
fn from_board(board: Board) -> Pos
Create a position configuration from a board, without any other hints.
fn set_last_move(&mut self, m: Option<&Move>)
Set the hint for the last move, so that it can be highlighted on the board.
fn with_last_move(self, m: &Move) -> Self
fn set_check(&mut self, king: Option<Square>)
Set the check hint.
fn with_check(self, king: Square) -> Pos
fn set_legals(&mut self, legals: MoveList)
Set the legal move hints.