Struct binoxxo::field::Board [−][src]
A sqaure binoxxo board with a side length and its fields.
Implementations
impl Board
[src]
pub fn new(size: usize) -> Board
[src]
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.
fn from_str(b: &str) -> Result<Board, String>
[src]
impl PartialEq<Board> for Board
[src]
impl StructuralPartialEq for Board
[src]
impl ToString for Board
[src]
Auto Trait Implementations
impl RefUnwindSafe for Board
[src]
impl Send for Board
[src]
impl Sync for Board
[src]
impl Unpin for Board
[src]
impl UnwindSafe for Board
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,