Struct binoxxo::field::Board[][src]

pub struct Board { /* fields omitted */ }

A sqaure binoxxo board with a side length and its fields.

Implementations

impl Board[src]

pub fn new(size: usize) -> Board[src]

Creates a new binoxxo board of side length size.

Panics

Panics if size is odd or 0.

pub fn clear(&mut self, x: usize, y: usize)[src]

Sets field at column x and row y to Empty.

Panics

Panics if x or y are out-of-bounds (larger or equal to get_size). Panics if field at given coordinates is already Empty.

pub fn set(&mut self, x: usize, y: usize, field: Field)[src]

Sets field at column x and row y to field.

Panics

Panics if x or y are out-of-bounds (larger or equal to get_size). Panics if field is Empty.

pub fn get(&self, x: usize, y: usize) -> Field[src]

Returns field at column x and row y to field.

Panics

Panics if x or y are out-of-bounds (larger or equal to get_size).

pub fn get_size(&self) -> usize[src]

Returns side length of board size.

Trait Implementations

impl Clone for Board[src]

impl Debug for Board[src]

impl FromStr for Board[src]

type Err = String

The associated error which can be returned from parsing.

impl PartialEq<Board> for Board[src]

impl StructuralPartialEq for Board[src]

impl ToString for Board[src]

Auto Trait Implementations

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> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

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>,