group3.c
int g3_countOutwards(const struct connect4 *game, int row, int col, int dx, int dy, char piece) {
    //Where you are moving to
    int newRow = row + dy;
    int newCol = col + dx;
    //Stop when you hit the edge of the board or you have found a blank
    if (!g3_isOnBoard(newRow, newCol) || game->board[newRow][newCol] != piece) return 0;
    //Continue onwards otherwise
    return 1 + g3_countOutwards(game, newRow, newCol, dx, dy, piece); // really cool recursion :'''''''''''')
}
/* Recursively count the number of pieces in a direction given from a position */
Recursively count the number of pieces in a direction given from a position
Recursively count the number of pieces in a direction given from a position
int g3_countOutwards(const struct connect4 *game, int row, int col, int dx, int dy, char piece) {
    int newRow = row + dy;
    int newCol = col + dx;
    if (!g3_isOnBoard(newRow, newCol) || game->board[newRow][newCol] != piece) return 0;
    return 1 + g3_countOutwards(game, newRow, newCol, dx, dy, piece); 
}
int g3_countOutwards ( const struct connect4 * game , int row , int col , int dx , int dy , char piece ) { int newRow = row + dy ; int newCol = col + dx ; if ( ! g3_isOnBoard ( newRow , newCol ) || game -> board [ newRow ] [ newCol ] != piece ) return 0 ; return 1 + g3_countOutwards ( game , newRow , newCol , dx , dy , piece ) ; }
Recursively count the number of pieces in a direction given from a position
Recursively count the number of pieces in a direction given from a position
//Where you are moving to //Stop when you hit the edge of the board or you have found a blank //Continue onwards otherwise // really cool recursion :'''''''''''')