pub struct RectangularBoard {
pub width: usize,
pub height: usize,
pub board: Vec<Vec<bool>>,
/* private fields */
}Fields§
§width: usize§height: usize§board: Vec<Vec<bool>>Implementations§
Source§impl RectangularBoard
impl RectangularBoard
pub fn new(width: usize, height: usize) -> Self
Sourcepub fn l_board(n: usize, scale: usize) -> Self
pub fn l_board(n: usize, scale: usize) -> Self
Generates a new L-tetromino shaped board.
This is a two step process - first we make an L shape with long side having length n, and then we replace each box with a scale^2 box.
Sourcepub fn t_board(n: usize, scale: usize) -> Self
pub fn t_board(n: usize, scale: usize) -> Self
Generates a new T-tetromino shaped board.
This is a two step process - first we make a T shape where the two tils have length n, and then we replace each box with a scale^2 box.
Sourcepub fn is_all_marked(&self) -> bool
pub fn is_all_marked(&self) -> bool
pub fn place_tile( &self, tile_collection: &TileCollection, ) -> Vec<RectangularBoard>
Trait Implementations§
Source§impl Clone for RectangularBoard
impl Clone for RectangularBoard
Source§fn clone(&self) -> RectangularBoard
fn clone(&self) -> RectangularBoard
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for RectangularBoard
impl Debug for RectangularBoard
Source§impl Hash for RectangularBoard
impl Hash for RectangularBoard
Source§impl PartialEq for RectangularBoard
impl PartialEq for RectangularBoard
Source§impl Serialize for RectangularBoard
impl Serialize for RectangularBoard
impl Eq for RectangularBoard
impl StructuralPartialEq for RectangularBoard
Auto Trait Implementations§
impl Freeze for RectangularBoard
impl RefUnwindSafe for RectangularBoard
impl Send for RectangularBoard
impl Sync for RectangularBoard
impl Unpin for RectangularBoard
impl UnwindSafe for RectangularBoard
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more