So player A rolls nA 6-sided dice and player be rolls nB 6-sided dice, you add up the scores and you want to know the probability of A winning, B winning and A and B getting the same score?
EDIT: In case that's what you were asking for, here's some code:
void compute_probabilities(int nA, int nB, double &prob_A_winning, double &prob_B_winning) {
const int size = (nA + nB) * 5 + 1;
std::vector<double> prob(size);
prob[0] = 1.0;
for (int i = 1; i < size; ++i)
prob[i] = 0.0;
for (int i = 0; i < nA + nB; ++i) {
for (int k = size - 1; k >= 0; --k) {
double p = 0.0;
for (int s = std::max(k - 5, 0); s <= k; ++s)
p += (1.0/6.0) * prob[s];
prob[k] = p;
}
}
/*
// Debugging output
for (int i = 0; i < size; ++i)
std::cout << i << ' ' << prob[i] << '\n';
*/
int threshold = 6*nB - nA;
prob_A_winning = prob_B_winning = 0.0;
int i;
for (i = 0; i < threshold; ++i)
prob_B_winning += prob[i];
for (++i; i < size; ++i)
prob_A_winning += prob[i];
}