// Example code from Lecture 12: Finding the location of our
//   first player ('B') on our 8x8 world (Approach 2)


// Pre-conditions: input 8x8 world of chars, 1 "query" char to
//                 find on the world, and two pass-by-reference
//                 ints -- called x and y -- to record the
//                 location of the query
// Post-conditions: function changes x and y to the x- and y-
//                  coordinates of the query char inside the
//                  world

void find(char world[][8], char query, int &x, int &y)
{
 for(int i=0; i<8; i++)
 {  // check each row
   for(int j=0; j<8; j++)
   { // check each column
     if(world[i][j]==query) // record the location of the query
       x=i;  y=j;
   }
 }
}