public int countBombs(int x, int y) {
        if (x < 0 || x >= size || y < 0 || y >= size) {
            throw new IllegalArgumentException(
                    "Non valid coordinates are being accessed");
        }
        List<Cell> neighbours = getNeighbours(x, y);
        int count = 0;
        for (Cell cell : neighbours) {
            if (cell.hasBomb()) {
                count++;
            }
        }
        return count;
    }