simu.cpp
/************************************************************************/
/*                                                                      */
/* Checks to make sure the new coordinates are in bounds.               */
/* If they are not, then it sets the coords to the boundry              */
/* instead of going out of bounds                                       */
/*                                                                      */
/************************************************************************/
Checks to make sure the new coordinates are in bounds.
If they are not, then it sets the coords to the boundry
instead of going out of bounds
Checks to make sure the new coordinates are in bounds . If they are not then it sets the coords to the boundry instead of going out of bounds
int simu::boundsCheck(const int& var) {
    if (var < gridSize + 1 && gridSize > -1) return var;
    else if (var >= gridSize) return gridSize;
    else if (var <= -2) return -99;
}
int simu :: boundsCheck ( const int & var ) { if ( var < gridSize + 1 && gridSize > - 1 ) return var ; else if ( var >= gridSize ) return gridSize ; else if ( var <= -2 ) return -99 ; }
Checks to make sure the new coordinates are in bounds.
Checks to make sure the new coordinates are in bounds .