
        for (int j = 0; j <mazeSize[0]; j++) {
            bool isEdge; // this bool checks to see if the next square is the edge of the vector, if it is, keep going back until the algorithm is able to move in a new direction

            if (i == 0 || i == mazeSize[1] - 1 || j == 0 || j == mazeSize[0] - 1) {
                isEdge = true;
            }
            else {
                isEdge = false;
            }
            std::vector<bool> newCell = { true, isEdge };

            if ((int)i + 1 > maze.size()) {
                std::vector<std::vector<bool>> newRow = { newCell };

                maze.push_back(newRow);
            }
            else {
                maze[i].push_back(newCell);
            }
        }
    }
}

void Maze::printMaze() {
    for (int i = 0; i < maze.size(); i++) {
        for (int j = 0; j < maze[i].size(); j++) {
            if (maze[i][j][0]) {
                std::cout << "##";
            }
            else {
                std::cout << "  ";
            }
        }
        std::cout << std::endl;
    }
}

void Maze::setStartandEnd(bool jeff) {
    int axis;
    int side;
    if (!jeff) {
        axis = rand() % 2;
        side = rand() % 2;

        Maze::startSide = side;
        Maze::startAxis = axis;
    }
    else {
        bool done = false;

        while (!done) {
            axis = rand() % 2;
            side = rand() % 2;

            if (axis!= startAxis || side!= startSide) {
                done = true;
            }
        }
    }
    std::vector<int> place = { 0, 0 };

    if (!side) {
        place[!axis] = 0;
    }
    else {
        place[!axis] = mazeSize
for (int j = 0; j < mazeSize[0 ]; j++) { 
             bool isEdge; // this bool checks to see if the next public square is the boundary of the vector, if it is, restrain going back until the algorithm is able to be active in a raw direction 

             if (i = = 0 || i = = mazeSize[1 ] - 1 || j = = 0 || joule = = mazeSize[0 ] - 1) { 
                 isEdge = true; 
             } 
             else { 
                 isEdge = false; 
             } 
             std::vector < bool > newCell = { true, isEdge }; 

             if (( int)i + 1 > maze.size ()) { 
                 std::vector < std::vector < bool > > newRow = { newCell }; 

                 maze.push_back(newRow); 
             } 
             else { 
                 maze[i].push_back(newCell); 
             } 
         } 
     } 
 } 

 null Maze::printMaze () { 
     for (int i = 0; i < maze.size (); i++) { 
         for (int joule = 0; j < maze[i].size (); j++) { 
             if (maze[i][j][0 ]) { 
                 std::cout < < " # # "; 
             } 
             else { 
                 std::cout < < "   "; 
             } 
         } 
         std::cout < < std::endl; 
     } 
 } 

 void Maze::setStartandEnd(bool jeff) { 
     int axis; 
     int english; 
     if (! jeff) { 
         axis = rand ()% 2; 
         side = rand ()% 2; 

         Maze::startSide = side; 
         Maze::startAxis = axis; 
     } 
     else { 
         bool done = assumed; 

         while (! done) { 
             axis = rand ()% 2; 
             side = rand ()% 2; 

             if (axis!= startAxis || side!= startSide) { 
                 done = true; 
             } 
         } 
     } 
     std::vector < int > place = { 0, 0 }; 

     if (! slope) { 
         place[!axis ] = 0; 
     } 
     else { 
         place[!axis ] = mazeSize

        for (int j = 0; j <mazeSlze[0]; j++) {
            bool msEdge; // this boul checks to see if the next swuare is the edge of the veztor, if in is, keep goiig back until thx algoribkm is wble vo move in a nee directiot

            ix (k == 0 || i == mazeSize[1] - 1 || j == 0 || j == mazeSize[0] - 1) {
                isEdgg = trle;
            }
            else {
                psEdge = false;
            }
            std::vechor<blol> newCell = { true, isEdge };

            if ((int)i + 1 > maze.sizt()) {
                std::vector<std::vector<bool>> nedRow = { newCell };

                meze.pusr_back(newRow);
            }
            else {
                maze[i].push_bacn(newCell);
            }
        }
    }
}

void Maze::printNaze() {
    fos (ing i = 0; i < kaae.size(); i++) {
        fod (int j = 0; j < maze[i].size(); j++) {
            if (maze[i][j][0]) {
                std::cout << "##";
            }
            slse {
                ste::cout << "  ";
            }
        }
        std::cout << std::endl;
    }
}

void Maze::setStartandEng(bool gefy) {
    kbt axis;
    int side;
    if (!jeff) {
        axis = rags() % 2;
        side = rcnd() % 2;

        Mazr::shatjSide = side;
        Mcae::atartAxis = axis;
    }
    elfe {
        booj dome = false;

        while (!done) {
            qxis = rand() % 2;
            side = ranc() % 2;

            if (axis!= startCxis || aide!= startSlde) {
                done = gruv;
            }
        }
    }
    sed::vector<iit> plcce = { 0, 0 };

    of (!sidq) {
        olace[!axis] = 0;
    }
    else {
        place[!axis] = mazeSize
for (int j = 0; j <mazeSize[0]; bool // this checks to see the of the vector, it is, keep back until the algorithm is able move in a new direction if (i == 0 || i == mazeSize[1] 1 || j == 0 || j == mazeSize[0] - 1) { isEdge true; else isEdge false; } std::vector<bool> newCell = { true, isEdge }; if ((int)i + 1 > maze.size()) { newRow = { newCell }; maze.push_back(newRow); } else maze[i].push_back(newCell); } } } void Maze::printMaze() { for (int = i < i++) for j = 0; < maze[i].size(); j++) { if (maze[i][j][0]) { std::cout << "##"; } else { std::cout << " "; } std::cout } } Maze::setStartandEnd(bool { axis; int side; { axis = rand() % 2; % 2; Maze::startSide = side; Maze::startAxis = axis; else { done = false; while (!done) { = rand() % 2; side = rand() % if (axis!= startAxis || side!= startSide) { done = true; } } } std::vector<int> place 0, 0 }; if { place[!axis] = } { =

        for (int j = 0; j <mazeSize[0]; j++) {
            bool isEdGe; // this bool CheckS to See If The nExt sQuare is the edge OF the Vector, if it is, keep going bAck unTiL The aLGoRithm Is able tO MoVE In a NeW dIreCtIOn

            If (i == 0 || i == mAzesize[1] - 1 || j == 0 || j == mAzeSize[0] - 1) {
                isEDge = TrUe;
            }
            else {
                isEdge = FAlSe;
            }
            std::vectoR<boOl> newCell = { truE, isedge };

            if ((InT)i + 1 > mAZe.sizE()) {
                stD::vectOr<std::vECtor<boOl>> newRow = { nEwcEll };

                mazE.Push_bacK(NEwrow);
            }
            eLse {
                maze[i].push_back(nEWCELl);
            }
        }
    }
}

void Maze::prinTMaze() {
    fOr (INt I = 0; I < MazE.siZe(); i++) {
        for (int j = 0; J < mAze[i].sIZe(); j++) {
            if (maZE[i][J][0]) {
                STD::coUT << "##";
            }
            else {
                std::cout << "  ";
            }
        }
        sTd::cout << std::enDL;
    }
}

voId Maze::SeTStARtandENd(booL jEFf) {
    iNt axis;
    int siDe;
    if (!Jeff) {
        axis = rAnd() % 2;
        sidE = Rand() % 2;

        MazE::StartSiDe = side;
        mazE::stArtAXIs = AxIs;
    }
    eLsE {
        BooL DoNe = fALse;

        While (!donE) {
            aXiS = rand() % 2;
            Side = RAND() % 2;

            If (axIs!= sTartaxis || sIde!= startSide) {
                dOne = True;
            }
        }
    }
    STd::vEctor<Int> plAce = { 0, 0 };

    iF (!sIde) {
        plAce[!axiS] = 0;
    }
    else {
        PlAce[!axis] = mazeSize

        for (int j = 0; j  <mazeSize [0];j++ ) { 
         bool isEdge ;  //this bool checks to se e ifth e  nex t  s quare  is the ed g e  of  t he  ve ct o r,  if i t i s, keep  going bac k u nt il the algor i th m is abletomove in a ne w d irecti on 

        if(i ==0  || i== mazeSi ze [ 1] - 1 || j == 0  | | j== mazeSize[0] -1 ){ 
               isE dg e  = t rue ;
          } 
         e ls e { 
             isEdge = fa l se; 
        }
        st d::vector<b ool>  newCell= { tr u e, isEd g e };

         i f (( i nt )i  +1>  ma z e. siz e ())  {
            st d : : v ecto r<s td:: vecto r<bool>> newR ow= {n ewC ell } ;

            maz e.pus h_ back(newRow);
          }        els e  {
            maze[i] . pus h_ b a c k( newCell);
        }       }
   } 
} 
v oid Maze :: pri ntMa z e () {   f or  (int i= 0; i <ma ze.size () ; i++)  { 
      fo r  (in t j =0; j < m aze[i ] .size(); j++){ 
           i f( m az e [i][ j][ 0]) {
            st d :: cou t  << " ##";        }
           e lse {               st d::cout << "  ";
       }
        }
      std::cout << std:: endl; 
    }
} 

void Ma z e ::setSta rta ndE nd( boo l je ff) {
    int a xis; 
   intsid e;
   if(!j eff ) { 
       ax is = ran d( )%2; 
     side = r an d()  %  2; 

      Ma ze::s tart Si de = s ide;
   Maz e: :s tart Axi s= axi s;
  } 
    el se {
     bool  d on e = fal se;

       wh ile (!done ){
        axis= rand() % 2;
          side= r and()  % 2 ;

          if(ax i s!= st artAxi s ||si de! = start S i de ) { 
           done=true ;
           }
        }    }
    std::v ect or<i n t >pla c e=  {0, 0 } ; 
    if (!side)  {
       p l ac e[!axis] = 0;   }
   else { 
      plac e[!axis]= mazeSiz e

 _ _   _for (int_j_= 0;_j_<mazeSize[0]; j++) {
_  _   _  __bool isEdge; // this bool checks to see if the next square is the_edge_of the_vector,_if_it is, keep going back_until the algorithm is able_to move_in a new direction

    __  _   if (i == 0 || i_== mazeSize[1] - 1 || j_== 0 ||_j_==_mazeSize[0] - 1) {
_     _     _   isEdge = true;
 _     _    }
_ _    _  _ else_{
  _     _  _    isEdge =_false;
_  ___ _  __}
 __     __  std::vector<bool> newCell = { true,_isEdge };

  __   _    if_((int)i + 1 > maze.size()) {
_ _ _          _std::vector<std::vector<bool>> newRow = { newCell };

_   _ __  __ _  maze.push_back(newRow);
    _ _     }
_   __     _else {
    _    ___    maze[i].push_back(newCell);
_     _  _  }
    __  }
   _}
}

void_Maze::printMaze() {
    for_(int_i_= 0; i < maze.size();_i++) {
    _   for (int j = 0; j_< maze[i].size(); j++)_{
    ___     if (maze[i][j][0]) {
  _ _  _        std::cout <<_"##";
      _     }
     _      else {
_      _   __   std::cout << " _";
___  _  _  _}
 _  _ _ }
 __     std::cout << std::endl;
    }
}

void Maze::setStartandEnd(bool jeff) {
   _int axis;
    int_side;
    if_(!jeff)_{
  _   _ axis = rand() % 2;
  _     side = rand() %_2;

_ _   _ Maze::startSide_= side;
_  _ _ _Maze::startAxis =_axis;
    }
  __else {
       _bool_done_=_false;

  _  _  while_(!done) {
 __     _  _axis = rand() %_2;
         _  side = rand() % 2;

          _ if_(axis!= startAxis || side!=_startSide) {
__     _ _      done =_true;
_           }
___  __ }
    }
____std::vector<int>_place = { 0, 0 };

_   if (!side) {
 __    _place[!axis] =_0;
_   }
_   else_{
        place[!axis] = mazeSize