pub fn connect_neighbors(&mut self, i1: usize, i2: usize) {
      if i2 + self.width == i1 {
         self.connect_cell_north(i1);
      } else if i2 == i1 + self.width {
         self.connect_cell_south(i1);
      } else if i2 == i1 + 1 {
         self.connect_cell_east(i1);
      } else {
         self.connect_cell_west(i1);
      }
   }
/// If the cells are not neighbors, an incorrect connection will be made
If the cells are not neighbors, an incorrect connection will be made
If the cells are not neighbors an incorrect connection will be made
pub fn connect_neighbors(&mut self, i1: usize, i2: usize) {
      if i2 + self.width == i1 {
         self.connect_cell_north(i1);
      } else if i2 == i1 + self.width {
         self.connect_cell_south(i1);
      } else if i2 == i1 + 1 {
         self.connect_cell_east(i1);
      } else {
         self.connect_cell_west(i1);
      }
   }
pub fn connect_neighbors ( & mut self , i1 : usize , i2 : usize ) { if i2 + self . width == i1 { self . connect_cell_north ( i1 ) ; } else if i2 == i1 + self . width { self . connect_cell_south ( i1 ) ; } else if i2 == i1 + 1 { self . connect_cell_east ( i1 ) ; } else { self . connect_cell_west ( i1 ) ; } }
If the cells are not neighbors, an incorrect connection will be made
If the cells are not neighbors an incorrect connection will be made
&mut self
i1
usize
i2
usize