Struct render_cerke_board::Field[][src]

pub struct Field { /* fields omitted */ }

Implementations

impl Field[src]

#[must_use]
pub fn to_logical(&self) -> LogicalField
[src]

impl Field[src]

pub fn delete_focus(&mut self)[src]

pub fn place_from_hop1zuo1(
    &mut self,
    coord: Coord,
    side: Side,
    color: Color,
    profession: Profession
) -> Result<(), OperationError>
[src]

Errors

Will return Err if either:

  • coord is already occupied
  • the side’s hop1zuo1 does not contain the piece specified by the color and profession

pub fn move_to_opponent_hop1zuo1(
    &mut self,
    coord: Coord
) -> Result<(), OperationError>
[src]

Errors

Will return Err if either:

  • coord is empty
  • coord is occupied by a Tam2

pub fn move_to_empty_square(
    &mut self,
    to: Coord,
    from: Coord
) -> Result<(), OperationError>
[src]

Errors

Will return Err if either:

  • from is empty
  • to is already occupied

pub fn relocate_stepping(&mut self, to: Coord) -> Result<(), OperationError>[src]

Errors

Will return Err if no piece is floating

pub fn descend_from_stepping(&mut self, to: Coord) -> Result<(), OperationError>[src]

Errors

Will return Err if to is already occupied.

pub fn step_on_occupied(
    &mut self,
    to: Coord,
    from: Coord
) -> Result<(), OperationError>
[src]

Errors

Will return Err if either :

  • the from is an empty square
  • the to is an empty square
  • self.floating is already occupied

#[must_use]
pub fn render(&self, down_side: Side) -> RgbImage
[src]

#[must_use]
pub fn new(piece_dimension: u32, padding: u32) -> Field
[src]

Trait Implementations

impl Default for Field[src]

Auto Trait Implementations

impl RefUnwindSafe for Field

impl Send for Field

impl Sync for Field

impl Unpin for Field

impl UnwindSafe for Field

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Pointable for T

type Init = T

The type for initializers.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,