CS 107 - 7/22/15 Before we can call a function, the function must be declared. "Before" means closer to the top (i.e. line 1) of the source code file int f2 (int v1, int v2); // a "forward declaration" or "function prototype" int f1 () { } int f2 (int v1, int v2) { } int main () { } The Boggle Algorithm: For (i = -1; i <= 1; i++ ) For (j = -1; j <= 1; j++ ) If ( bgboard[x+i][y+j] is unused && bgboard[x+i][y+j] == word.at(pos) ) If ( bgfind (bgboard, x+i, y+j, word, pos+1) == true ) Return true could be rewritten as If ( bgboard[x-1][y-1] is unused && bgboard[x-1][y-1] == word.at(pos) ) If ( bgfind (bgboard, x-1, y-1, word, pos+1) == true ) Return true If ( bgboard[x-1][y] is unused && bgboard[x-1][y] == word.at(pos) ) If ( bgfind (bgboard, x-1, y, word, pos+1) == true ) Return true If ( bgboard[x-1][y+1] is unused && bgboard[x-1][y+1] == word.at(pos) ) If ( bgfind (bgboard, x-1, y+1, word, pos+1) == true ) Return true If ( bgboard[x][y-1] is unused && bgboard[x][y-1] == word.at(pos) ) If ( bgfind (bgboard, x, y-1, word, pos+1) == true ) Return true If ( bgboard[x][y] is unused && bgboard[x][y] == word.at(pos) ) If ( bgfind (bgboard, x, y, word, pos+1) == true ) Return true .... If ( bgboard[x+1][y+1] is unused && bgboard[x+1][y+1] == word.at(pos) ) If ( bgfind (bgboard, x+1, y+1, word, pos+1) == true ) Return true