That sounds like something out of a novel called "The Dice Man"[1], in which the protagonist decides to base all of his actions on the roll of the dice.
[1] - https://www.amazon.com/Dice-Man-Luke-Rhinehart/dp/0879518642
[1] - https://www.amazon.com/Dice-Man-Luke-Rhinehart/dp/0879518642