Trait FigureTrait

Source
pub trait FigureTrait {
    // Required methods
    fn symbol(self) -> &'static str;
    fn base_figure(self) -> Figure;
    fn lancer_direction(self) -> usize;
}
Expand description

FigureTrait adds methods to Figure

Required Methods§

Source

fn symbol(self) -> &'static str

returns the fen symbol for the figure ( lower case )

Source

fn base_figure(self) -> Figure

returns the base figure of the figure, same as figure except for lancers, where it is LANCER

Source

fn lancer_direction(self) -> usize

return the lancer direction of the figure provided that it is a lancer

Implementors§