I was wondering if, for the purpose of a simple game, it was possible to poll an event that would effectively roll a number of dice, compare the results, select a number of results that equaled a certain number or higher, and compare it to a similar but different set rolled at the same time.
Would this be feasible in c++, or would it be simpler/more reliable to use something else, such as lua or Java?
Edit: I'm not looking for code snippets of anything. Just an opinion on feasibility, maybe a hint or two on the correct words to lead me to finding the answer.
In this game, each player rolls a number of six sided dice depending on a number of modifiers. In general, success is counted on 4, 5, 6. In some cases, this can change to be anywhere from 2-6 to just 6's.
In many situations, 6 counts as two successes and adds an extra die(can go on theoretically infinitely).
I need to be able to roll a number of dice(exact number dependant on situation and is variable), count the successes, compare them to the other player's roll, and be able to account for exploding sixes.
Four successes on 4 are no better than four on 5, right?
This is pretty simple: in a loop: generate a number, pass it to grading function which will return amount of successes this throw brings and if you need to increase loop size.