#ifndef mygrid_h #define mygrid_h #include #include using namespace std; const int _NR=100; //MAX ROWS const int _NC=100; //MAX COLS //Grid_Load // Load a Maze Grid from stdin //Params: // grid: 2D Array // rStart,cStart,rFinish,cFinish: COO row, cols of start cell and Target Cell // NRows:Effective Maze Rows // NCols:Effective Maze cols void Grid_Load(int grid[_NR][_NC], int &rStart, int &cStart, int &rFinish, int &cFinish, int &NRows, int &NCols); //Grid_Show // Display a Maze //Params: // out: stream to display // grid: Maze // NRows:Effective Maze Rows // NCols:Effective Maze cols // map: mapping display (i.e: 1 -> ASCII(219)) // NM: map Num Rows //Example: // int map[4][2]; // map[0][0]=1; map[0][1]=219; // map[1][0]=0; map[1][1]=32; // map[2][0]=2; map[2][1]=int('S'); // map[3][0]=3; map[3][1]=int('F'); void Grid_Show(ostream &out,int grid[_NR][_NC],int NRows, int NCols,int map[][2],int NM); #endif