Programming Challenge: Dice Roller

sniper24
2019-05-16T17:40:47Z

Its been a while since we did one of these, which is a shame.

Create a program that takes is an input of the type: "d6 + 3" or "2d20 - 5", and return a valid roll.
The result should display both the actual rolls as well as the final result. The program should accept any valid roll of the type 'xdx'
Bonuses:

Multiplication "d6 * 3"

Division "d12 / 6"

Polish notation "4d6 * (5d4 - 3)"

As a side note, it would be really cool if weekly programming challenges became a thing

Comments URL: https://tildes.net/~comp/dgd/programming_challenge_dice_roller

Votes: 33

Comments: 34