Struct binoxxo::field::Board
[−]
[src]
pub struct Board { /* fields omitted */ }
A sqaure binoxxo board with a side length and its fields.
Methods
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 Debug for Board
[src]
fn fmt(&self, __arg_0: &mut Formatter) -> Result
[src]
Formats the value using the given formatter. Read more
impl PartialEq for Board
[src]
fn eq(&self, __arg_0: &Board) -> bool
[src]
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &Board) -> bool
[src]
This method tests for !=
.