xxxxxxxxxx
void generateDiceRolls(const ScoringSystem& sys, std::vector<int>& rolls, size_t index)
{
if (index == rolls.size())
{
// Reached the end - all the dice have been rolled
sys.GetGameResult(rolls);
}
else
{
// For each value of a die at this index, generate dice rolls for the rest of them
for (int i = 0; i < 6; i++)
{
rolls[index] = i;
generateDiceRolls(sys, rolls, index + 1);
}
}
}
void Evaluate(const ScoringSystem& sys)
{
std::vector<int> rolls(9); // Change 9 to however many dice you want to use
generateDiceRolls(sys, rolls, 0);
}