Why is there an algorithm for dice rolls instead of a random number generator set for numbers 1-6?
1 person has this question
8 months ago
Disclaimer I have never seen any risk source code. What follows is speculation based on my programming experience and what SMG has said.
Algorithm here may refer to the random generator itself. PRNGs are programs that other programs (like risk) can use as a utility. SMG may have written their own PRNG rather than use an already existing one.
Speaking more broadly algorithm may refer to the functions (or perhaps just blocks of code) in the game in which battles are conducted or where the PRNG is called. So the loops (one for each possible attacker and defender die number) where dice variables are assigned values from the PRNG and then used to determine the appropriate effect on the armies in the battle can be referred to as an algorithm.
So a random number generator is used for the dice rolls. On at least on occasion SMG replaced the dice algorithm but both algorithms old and new used/use a random number generator.