private static void calcNrMines(char[][] m, int r, int c) {
        int rowEdgeIndex = m.length - 1;
        int colEdgeIndex = m[0].length - 1;
        if (c == 0) {
            if (r == 0) { // top left corner
                m[r][c] = getNrMinesCornerCase(m, r, c, 1, 1);
            } else if (r == rowEdgeIndex) { // bottom left corner
                m[r][c] = getNrMinesCornerCase(m, r, c, -1, 1);
            } else { // in between left
                m[r][c] = getNrMinesLRInBetwCase(m, r, c, 1);
            }
        } else if (c == colEdgeIndex) {
            if (r == 0) { // top right corner
                m[r][c] = getNrMinesCornerCase(m, r, c, 1, -1);
            } else if (r == rowEdgeIndex) { // bottom right corner
                m[r][c] = getNrMinesCornerCase(m, r, c, -1, -1);
            } else { // in between right
                m[r][c] = getNrMinesLRInBetwCase(m, r, c, -1);
            }
        } else {
            if (r == 0) { // in between top
                m[r][c] = getNrMinesTDInBetwCase(m, r, c, 1);
            } else if (r == rowEdgeIndex) { // in between bottom
                m[r][c] = getNrMinesTDInBetwCase(m, r, c, -1);
            } else { // in between in between
                m[r][c] = getNrMinesBBCase(m, r, c);
            }
        }
    }