pub fn init_from_vec(&mut self, cells: &Vec<Cell>, cursor: Option<Cursor>) {
        if cells.len() != self.rows * self.columns {
            panic!("Invalid number of cells.");
        }
        self.grid.init_from_vec(cells);
        self.add_cursor(cursor);
    }
/// Initializes board with cells and cursor (optional).
///
/// The cells will be filled from vector by rows.
///
/// # Panics
///
/// Panics `cells` contain wrong number of elements.
///
/// # Examples
///
/// ```no_run
/// let mut board = Board::new(2, 2, 1, 1, false, None));
/// board.init_from_vec(&vec![Cell::Empty, Cell::Char('x'), Cell::Empty, Cell::Char('o')],
///                     None);
/// ```
Initializes board with cells and cursor (optional).
The cells will be filled from vector by rows.
Initializes board with cells and cursor ( optional ) . The cells will be filled from vector by rows .
pub fn init_from_vec(&mut self, cells: &Vec<Cell>, cursor: Option<Cursor>) {
        if cells.len() != self.rows * self.columns {
            panic!("Invalid number of cells.");
        }
        self.grid.init_from_vec(cells);
        self.add_cursor(cursor);
    }
pub fn init_from_vec ( & mut self , cells : & Vec < Cell > , cursor : Option < Cursor > ) { if cells . len ( ) != self . rows * self . columns { panic ! ( " " ) ; } self . grid . init_from_vec ( cells ) ; self . add_cursor ( cursor ) ; }
Initializes board with cells and cursor (optional).
Initializes board with cells and cursor ( optional ) .
&mut self
cells
&Vec<Cell>
cursor
Option<Cursor>
&mut self
cells
&Vec<Cell>
cursor
Option<Cursor>
panics
Panics `cells` contain wrong number of elements.
Panics ` cells ` contain wrong number of elements .
examples
None