These bool methods flip the coin and return whether the flip is heads or tails, respectively. The Coin class could also support Coin::NumFlips like the corresponding method in the class Dice.
Many other details need to be filled in here.
More details will emerge as you write your own description.
An initializer list is required because the class Dice doesn't have a default/parameterless constructor.
0
+ 0
-------
But the answer will never be correct since the value returned by
Answer is the string "*** error ***". These values are
set in the constructor Question::Question.
That prevent a file from being included more than once by the preprocessor. The actual values defined and tested may not be _STRING_H, but the idea applies regardless of the value.
Then to create a question about artists/groups construct a Question object as follows:
What group created The_Joshua_Tree ? U2 yes, that's correct What group created A_Live_One ? fish no, try one more time What group created A_Live_One ? whales no, correct answer is Phish
position += 2*die.Roll() - 1;
since 2*die.Roll() is either 0 or 2, the right-hand-side of the expression evaluates to either -1 or +1.
Another approach might use a coin or two-sided die to determine whether the north/south OR the east/west direction would change. Another two sided die could determine up/down or left/right.
For RandomWalk2D the function RandomWalk2D:TakeStep would need to be modified to use a four-sided Dice rather than the RandGen variable (although it's possible to use RandInt instead of RandReal, but the Dice class takes care of this for you).